File tree Expand file tree Collapse file tree 5 files changed +7
-12
lines changed
modules/service-deployment Expand file tree Collapse file tree 5 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ module "deployment" {
4646 }
4747 central_account_resource_name_prefix = var. central_account_resource_name_prefix
4848 central_backup_service_linked_role_arn = local. backup_service_linked_role_arn
49- central_backup_service_role_arn = module. backup_service_role . role . arn
5049 central_deployment_helper_role_arn = module. deployment_helper . lambda_role . arn
5150 central_deployment_helper_topic_name = module. deployment_helper . sns_topic . name
5251 deployment_regions = local. deployment_regions
Original file line number Diff line number Diff line change 11#
2- # Creates a service role for AWS Backup.
2+ # Creates a service role for AWS Backup
3+ # One per deployment to restrict permissions for copying back to member accounts
34#
45
56module "backup_service_role" {
6- source = " ./modules /iam-role"
7+ source = " .. /iam-role"
78
8- name = join (" " , [var . central_account_resource_name_prefix , " backup-service-role" ])
9+ name = join (" " , [local . central_account_resource_name_prefix , " backup-service-role" ])
910 assume_role_policy = jsonencode ({
1011 Version : " 2012-10-17"
1112 Statement : [
@@ -17,7 +18,7 @@ module "backup_service_role" {
1718 Action : " sts:AssumeRole" ,
1819 Condition : {
1920 StringEquals : {
20- " aws:SourceAccount" : local .account_id
21+ " aws:SourceAccount" : var.current .account_id
2122 }
2223 }
2324 }
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ module "backup_ingest_sfn_role" {
107107 " Action" : [
108108 " iam:PassRole"
109109 ],
110- " Resource" : var.central_backup_service_role_arn
110+ " Resource" : module.backup_service_role.role.arn
111111 },
112112 {
113113 Sid : " AllowAssumeRoleInMemberAccounts" ,
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ module "region" {
3333 standard_vaults = local.standard_vaults
3434 }
3535 deployment = {
36- backup_service_role_arn = var.central_backup_service_role_arn
36+ backup_service_role_arn = module.backup_service_role.role.arn
3737 ou_paths_including_children = local.deployment_ou_paths_including_children
3838 }
3939 eventbridge = {
Original file line number Diff line number Diff line change @@ -21,11 +21,6 @@ variable "backup_tag_key" {
2121 }
2222}
2323
24- variable "central_backup_service_role_arn" {
25- description = " The ARN of the central backup service role, used to copy backups between vaults."
26- type = string
27- }
28-
2924variable "central_backup_service_linked_role_arn" {
3025 description = " The ARN of the AWS Backup service-linked role in the central account. Required to be added to custom KMS Key Policies in member accounts."
3126 type = string
You can’t perform that action at this time.
0 commit comments