Skip to content

Commit b1e76de

Browse files
authored
Merge pull request #27 from tomarv2/develop
fixing arguments
2 parents 5f22b84 + 3745de1 commit b1e76de

File tree

13 files changed

+54
-44
lines changed

13 files changed

+54
-44
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ repos:
33
rev: v1.48.0
44
hooks:
55
- id: terraform_fmt
6-
# - id: terraform_validate
76
- id: terraform_tflint
87
args:
98
- '--args=--only=terraform_deprecated_interpolation'
109
- '--args=--only=terraform_deprecated_index'
11-
# - '--args=--only=terraform_unused_declarations'
10+
- '--args=--only=terraform_unused_declarations'
1211
- '--args=--only=terraform_comment_syntax'
1312
- '--args=--only=terraform_documented_outputs'
1413
- '--args=--only=terraform_documented_variables'
1514
- '--args=--only=terraform_typed_variables'
1615
- '--args=--only=terraform_module_pinned_source'
1716
- '--args=--only=terraform_naming_convention'
18-
- '--args=--only=terraform_required_providers'
19-
# - '--args=--only=terraform_standard_module_structure'
2017
- '--args=--only=terraform_workspace_remote'
2118

2219
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -28,9 +25,8 @@ repos:
2825
- id: check-yaml
2926

3027
- repo: https://github.com/bridgecrewio/checkov.git
31-
rev: '1.0.864' # change to tag or sha
28+
rev: '2.0.531'
3229
hooks:
3330
- id: checkov
3431
verbose: true
35-
args:
36-
- -d . --framework terraform -o output_format json
32+
args: [-d, '.', --framework, 'terraform']

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CHANGELOG
2+
3+
## [v0.0.9](https://github.com/tomarv2/terraform-databricks-aws-workspace/releases/tag/v0.0.9) - 2022-01-28 19:25:12
4+
5+
*No description*
6+
7+
### Bug Fixes
8+
9+
- general:
10+
- fixing broken link in readme ([70da157](https://github.com/tomarv2/terraform-databricks-aws-workspace/commit/70da15703f048f4b880be1d415eb22db2047d7ee)) ([#4](https://github.com/tomarv2/terraform-databricks-aws-workspace/pull/4))
11+
12+
\* *This CHANGELOG was automatically generated by [auto-generate-changelog](https://github.com/BobAnkh/auto-generate-changelog)*

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
>
2626
> :point_right: Databricks account password: `databricks_account_password`
2727
>
28-
> :point_right: Databricks account id, `databricks_account_id` can be found on the top right corner of the page, once you're logged in.
28+
> :point_right: Databricks account id, `databricks_account_id` can be found on the bottom left corner of the page, once you're logged in.
2929
>
3030
> :point_right: Part 2: Terraform module for [Databricks Workspace management](https://github.com/tomarv2/terraform-databricks-workspace-management)
3131
@@ -36,7 +36,7 @@
3636
## Versions
3737

3838
- Module tested for Terraform 1.0.1.
39-
- `databrickslabs/databricks` provider version [0.3.5](https://registry.terraform.io/providers/databrickslabs/databricks/latest)
39+
- `databrickslabs/databricks` provider version [0.4.7](https://registry.terraform.io/providers/databrickslabs/databricks/latest)
4040
- AWS provider version [3.47](https://registry.terraform.io/providers/hashicorp/aws/latest).
4141
- `main` branch: Provider versions not pinned to keep up with Terraform releases.
4242
- `tags` releases: Tags are pinned with versions (use <a href="https://github.com/tomarv2/terraform-databricks-aws-workspace/tags" alt="GitHub tag">

examples/sample/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ module "databricks_workspace" {
44
# NOTE: One of the below is required:
55
# - 'profile_for_iam' - for IAM creation (if none is provided 'default' is used)
66
# - 'existing_role_name'
7-
profile_for_iam = "iam-admin"
8-
existing_role_name = "arn:aws:iam::123456789012:role/demo-role"
9-
aws_region = "us-east-2"
7+
profile_for_iam = "iam-admin"
8+
#existing_role_name = "arn:aws:iam::123456789012:role/demo-role"
9+
aws_region = "us-east-1"
1010
databricks_account_username = "example@example.com"
1111
databricks_account_password = "sample123!"
1212
databricks_account_id = "1234567-1234-1234-1234-1234567"

examples/sample/outputs.tf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ output "databricks_deployment_name" {
5757
/*
5858
output "pat_token" {
5959
description = "databricks pat"
60-
value = module.databricks_workspace.pat_token
61-
}
62-
63-
64-
output "pat_token_duration" {
65-
description = "databricks pat"
66-
value = module.databricks_workspace.pat_token_duration
60+
value = module.databricks_workspace.databricks_token
61+
sensitive = true
6762
}
6863
*/

main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module "vpc" {
22
source = "git::git@github.com:tomarv2/terraform-aws-vpc.git?ref=v0.0.4"
33

4+
aws_region = var.aws_region
45
enable_dns_hostnames = true
56
enable_nat_gateway = true
67
single_nat_gateway = true
@@ -25,12 +26,11 @@ module "vpc" {
2526
}
2627

2728
module "iam_role" {
28-
source = "git::git@github.com:tomarv2/terraform-aws-iam-role.git//modules/iam_role_external?ref=v0.0.4"
29+
source = "git::git@github.com:tomarv2/terraform-aws-iam-role.git//modules/iam_role_external?ref=v0.0.7"
2930

3031
count = var.existing_role_name == null ? 1 : 0
3132

3233
assume_role_policy = data.databricks_aws_assume_role_policy.this.json
33-
external_id = var.databricks_account_id
3434
# -----------------------------------------
3535
# Do not change the teamid, prjid once set.
3636
teamid = var.teamid
@@ -60,9 +60,8 @@ module "iam_policies" {
6060
}
6161

6262
module "s3" {
63-
source = "git::git@github.com:tomarv2/terraform-aws-s3.git?ref=v0.0.3"
63+
source = "git::git@github.com:tomarv2/terraform-aws-s3.git?ref=v0.0.6"
6464

65-
aws_region = var.aws_region
6665
# -----------------------------------------
6766
# Do not change the teamid, prjid once set.
6867
teamid = var.teamid

mws.tf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
resource "databricks_mws_networks" "this" {
2-
provider = databricks.mws
2+
provider = databricks.mws
3+
34
account_id = var.databricks_account_id
45
network_name = "${var.teamid}-${var.prjid}-${local.suffix}"
56
security_group_ids = [module.vpc.default_security_group_id]
@@ -8,7 +9,8 @@ resource "databricks_mws_networks" "this" {
89
}
910

1011
resource "databricks_mws_credentials" "this" {
11-
provider = databricks.mws
12+
provider = databricks.mws
13+
1214
account_id = var.databricks_account_id
1315
role_arn = var.existing_role_name != null ? var.existing_role_name : join("", module.iam_role.*.iam_role_arn)
1416
credentials_name = "${var.teamid}-${var.prjid}-${local.suffix}"
@@ -17,8 +19,9 @@ resource "databricks_mws_credentials" "this" {
1719
}
1820

1921
resource "databricks_mws_storage_configurations" "this" {
20-
provider = databricks.mws
22+
provider = databricks.mws
23+
2124
account_id = var.databricks_account_id
22-
bucket_name = module.s3.s3_bucket_name
25+
bucket_name = module.s3.bucket_name
2326
storage_configuration_name = "${var.teamid}-${var.prjid}-${local.suffix}"
2427
}

outputs.tf

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ output "inline_policy_id" {
2929

3030
output "s3_bucket_name" {
3131
description = "s3 bucket name"
32-
value = module.s3.s3_bucket_name
32+
value = module.s3.bucket_name
3333
}
3434

3535
output "s3_bucket_arn" {
3636
description = "s3 bucket arn"
37-
value = module.s3.s3_bucket_arn
37+
value = module.s3.bucket_arn
3838
}
3939

4040
output "s3_bucket_id" {
4141
description = "s3 bucket id"
42-
value = module.s3.s3_bucket_id
42+
value = module.s3.bucket_id
4343
}
4444

4545
output "databricks_mws_credentials_id" {
@@ -93,10 +93,4 @@ output "databricks_token" {
9393
value = databricks_token.pat.id
9494
sensitive = true
9595
}
96-
97-
98-
output "pat_token_duration" {
99-
description = "databricks pat"
100-
value = databricks_token.pat.lifetime_seconds
101-
}
10296
*/

pat_token.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
/*
55
resource "databricks_token" "pat" {
6-
provider = databricks.created_workspace
6+
provider = databricks.created_workspace
77
88
comment = "Terraform managed: ${var.teamid}-${var.prjid}"
99
lifetime_seconds = 86400

s3.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
data "databricks_aws_bucket_policy" "this" {
2-
bucket = module.s3.s3_bucket_name
2+
bucket = module.s3.bucket_name
33
}
44

55
resource "aws_s3_bucket_policy" "root_bucket_policy" {
6-
bucket = module.s3.s3_bucket_id
6+
bucket = module.s3.bucket_id
77
policy = data.databricks_aws_bucket_policy.this.json
88
depends_on = [databricks_mws_networks.this]
99
}

0 commit comments

Comments
 (0)