From d61d7ac64ecc187107bf11cacbd3e1cf9c94faf5 Mon Sep 17 00:00:00 2001 From: nikpivkin Date: Mon, 23 Sep 2024 22:23:22 +0600 Subject: [PATCH] fix(misconf): change default ACL of digitalocean_spaces_bucket to private Signed-off-by: nikpivkin --- pkg/iac/adapters/terraform/digitalocean/spaces/adapt.go | 2 +- pkg/iac/adapters/terraform/digitalocean/spaces/adapt_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/iac/adapters/terraform/digitalocean/spaces/adapt.go b/pkg/iac/adapters/terraform/digitalocean/spaces/adapt.go index 46d1f25fa386..a1a1c792d647 100644 --- a/pkg/iac/adapters/terraform/digitalocean/spaces/adapt.go +++ b/pkg/iac/adapters/terraform/digitalocean/spaces/adapt.go @@ -24,7 +24,7 @@ func adaptBuckets(modules terraform.Modules) []spaces.Bucket { Metadata: block.GetMetadata(), Name: block.GetAttribute("name").AsStringValueOrDefault("", block), Objects: nil, - ACL: block.GetAttribute("acl").AsStringValueOrDefault("public-read", block), + ACL: block.GetAttribute("acl").AsStringValueOrDefault("private", block), ForceDestroy: block.GetAttribute("force_destroy").AsBoolValueOrDefault(false, block), Versioning: spaces.Versioning{ Metadata: block.GetMetadata(), diff --git a/pkg/iac/adapters/terraform/digitalocean/spaces/adapt_test.go b/pkg/iac/adapters/terraform/digitalocean/spaces/adapt_test.go index cf3fc84e4ff7..e87987a3f473 100644 --- a/pkg/iac/adapters/terraform/digitalocean/spaces/adapt_test.go +++ b/pkg/iac/adapters/terraform/digitalocean/spaces/adapt_test.go @@ -69,7 +69,7 @@ func Test_adaptBuckets(t *testing.T) { Metadata: iacTypes.NewTestMetadata(), Name: iacTypes.String("", iacTypes.NewTestMetadata()), Objects: nil, - ACL: iacTypes.String("public-read", iacTypes.NewTestMetadata()), + ACL: iacTypes.String("private", iacTypes.NewTestMetadata()), ForceDestroy: iacTypes.Bool(false, iacTypes.NewTestMetadata()), Versioning: spaces.Versioning{ Metadata: iacTypes.NewTestMetadata(),