Skip to content

Commit 732c833

Browse files
committed
[NRL-853] Fix perms errors with AWSCC resources for backup restore testing
1 parent e716136 commit 732c833

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

terraform/account-wide-infrastructure/dev/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ provider "aws" {
1010
workspace = terraform.workspace
1111
}
1212
}
13+
}
14+
15+
provider "awscc" {
16+
region = local.region
1317

18+
assume_role = {
19+
role_arn = "arn:aws:iam::${var.assume_account}:role/${var.assume_role}"
20+
}
1421
}
1522

1623
terraform {

terraform/account-wide-infrastructure/modules/backup-source/backup_restore_testing.tf_disabled renamed to terraform/account-wide-infrastructure/modules/backup-source/backup_restore_testing.tf

File renamed without changes.

terraform/account-wide-infrastructure/modules/backup-source/kms.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ data "aws_iam_policy_document" "backup_key_policy" {
2525
statement {
2626
sid = "EnableIAMUserPermissions"
2727
principals {
28-
type = "AWS"
29-
identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root", data.aws_caller_identity.current.arn]
28+
type = "AWS"
29+
identifiers = [
30+
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:root",
31+
var.terraform_role_arn
32+
]
3033
}
3134
actions = ["kms:*"]
3235
resources = ["*"]

terraform/account-wide-infrastructure/modules/permissions-store-bucket/vars.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ variable "enable_bucket_force_destroy" {
1111

1212
variable "enable_backups" {
1313
type = bool
14-
descirption = "enable AWS cloud backups"
14+
description = "enable AWS cloud backups"
1515
default = false
1616
}

0 commit comments

Comments
 (0)