Skip to content

Commit

Permalink
Template infra deploy #7279138802
Browse files Browse the repository at this point in the history
  • Loading branch information
nava-platform-bot committed Dec 20, 2023
1 parent 5b24180 commit 09ba721
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .template-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
628dfc343ede77bcee3db4a483dee9e60918083a
c9a30f3172e19c7fbb2b0b0544ec8784281430ef
9 changes: 9 additions & 0 deletions infra/test/infra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/gruntwork-io/terratest/modules/random"
"github.com/gruntwork-io/terratest/modules/shell"
"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/stretchr/testify/require"
)

var uniqueId = strings.ToLower(random.UniqueId())
Expand Down Expand Up @@ -136,6 +137,14 @@ func EnableDestroyService(t *testing.T, terraformOptions *terraform.Options) {
},
WorkingDir: "../../",
})

// Clone the options and set targets to only apply to the buckets
terraformOptions, err := terraformOptions.Clone()
require.NoError(t, err)
terraformOptions.Targets = []string{
"module.service.aws_s3_bucket.access_logs",
"module.storage.aws_s3_bucket.storage",
}
terraform.Apply(t, terraformOptions)
fmt.Println("::endgroup::")
}
Expand Down

0 comments on commit 09ba721

Please sign in to comment.