Skip to content

Commit 112debf

Browse files
authored
fix dependecy and add workspace_id as a new output (#98)
1 parent eb9d342 commit 112debf

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

modules/aws-exfiltration-protection/s3.tf

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ resource "aws_s3_bucket_ownership_controls" "state" {
2121
}
2222

2323
resource "aws_s3_bucket_acl" "acl" {
24-
bucket = aws_s3_bucket.root_storage_bucket.id
25-
acl = "private"
24+
bucket = aws_s3_bucket.root_storage_bucket.id
25+
acl = "private"
26+
depends_on = [aws_s3_bucket_ownership_controls.state]
2627
}
2728

2829
resource "aws_s3_bucket_server_side_encryption_configuration" "root_storage_bucket" {
@@ -48,4 +49,4 @@ resource "aws_s3_bucket_policy" "root_bucket_policy" {
4849
bucket = aws_s3_bucket.root_storage_bucket.id
4950
policy = data.databricks_aws_bucket_policy.this.json
5051
depends_on = [aws_s3_bucket_public_access_block.root_storage_bucket]
51-
}
52+
}

modules/aws-workspace-basic/outputs.tf

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ output "databricks_host" {
55
output "databricks_token" {
66
value = databricks_mws_workspaces.this.token[0].token_value
77
sensitive = true
8-
}
8+
}
9+
10+
output "workspace_id" {
11+
value = databricks_mws_workspaces.this.workspace_id
12+
}

modules/aws-workspace-basic/s3.tf

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ resource "aws_s3_bucket_ownership_controls" "state" {
2121
}
2222

2323
resource "aws_s3_bucket_acl" "acl" {
24-
bucket = aws_s3_bucket.root_storage_bucket.id
25-
acl = "private"
24+
bucket = aws_s3_bucket.root_storage_bucket.id
25+
acl = "private"
26+
depends_on = [aws_s3_bucket_ownership_controls.state]
2627
}
2728

2829
resource "aws_s3_bucket_server_side_encryption_configuration" "root_storage_bucket" {
@@ -47,4 +48,4 @@ resource "aws_s3_bucket_policy" "root_bucket_policy" {
4748
bucket = aws_s3_bucket.root_storage_bucket.id
4849
policy = data.databricks_aws_bucket_policy.this.json
4950
depends_on = [aws_s3_bucket_public_access_block.root_storage_bucket]
50-
}
51+
}

modules/aws-workspace-with-firewall/s3.tf

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_s3_bucket" "root_storage_bucket" {
2-
bucket = "${local.prefix}-rootbucket"
2+
bucket = "${local.prefix}-rootbucket"
33
force_destroy = true
44
tags = merge(var.tags, {
55
Name = "${local.prefix}-rootbucket"
@@ -40,11 +40,12 @@ resource "aws_s3_bucket_ownership_controls" "state" {
4040
resource "aws_s3_bucket_acl" "root_storage_bucket" {
4141
bucket = aws_s3_bucket.root_storage_bucket.id
4242
acl = "private"
43+
depends_on = [aws_s3_bucket_ownership_controls.state]
4344
}
4445

4546
resource "aws_s3_bucket_versioning" "versioning_example" {
46-
bucket = aws_s3_bucket.root_storage_bucket.id
47+
bucket = aws_s3_bucket.root_storage_bucket.id
4748
versioning_configuration {
4849
status = "Disabled"
4950
}
50-
}
51+
}

0 commit comments

Comments
 (0)