File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ resource "aws_backup_plan" "main" {
105105 }
106106 }
107107
108+ depends_on = [aws_backup_vault . main ]
109+
108110 tags = var. tags
109111}
110112
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ run "create_vault_with_custom_rules" {
4141 }
4242
4343 assert {
44- condition = length (aws_backup_vault. main . kms_key_arn ) >= 1
44+ condition = length (aws_backup_vault. main [ 0 ] . kms_key_arn ) >= 1
4545 error_message = " Expected Backup Plan to be encrypted by default AWS KMS key."
4646 }
4747
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ run "create_vault_with_predefined_rules" {
2121 }
2222
2323 assert {
24- condition = length (aws_backup_vault. main . kms_key_arn ) >= 1
24+ condition = length (aws_backup_vault. main [ 0 ] . kms_key_arn ) >= 1
2525 error_message = " Expected Backup Plan to be encrypted by default AWS KMS key."
2626 }
2727
@@ -46,7 +46,7 @@ run "create_vault_with_predefined_rules" {
4646 }
4747
4848 assert {
49- condition = length (aws_backup_vault. main . tags ) == 2
49+ condition = length (aws_backup_vault. main [ 0 ] . tags ) == 2
5050 error_message = " Expected Vault to have 2 tags."
5151 }
5252
You can’t perform that action at this time.
0 commit comments