|
@@ -0,0 +1,25 @@
|
|
|
+locals {
|
|
|
+ account_arns = [
|
|
|
+ for account in var.account_list:
|
|
|
+ "arn:${var.aws_partition}:iam::${account}:root"
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+output other {
|
|
|
+ value = local.account_arns
|
|
|
+}
|
|
|
+
|
|
|
+module "shared_ami_key" {
|
|
|
+ source = "../../../submodules/kms/ebs-key"
|
|
|
+
|
|
|
+ name = "shared_ami_key"
|
|
|
+ alias = "alias/shared_ami_key"
|
|
|
+ description = "Key for encrypting the AMIs to be shared with other accounts."
|
|
|
+ tags = merge(var.standard_tags, var.tags)
|
|
|
+ key_admin_arns = [ ]
|
|
|
+ key_user_arns = local.account_arns
|
|
|
+ key_attacher_arns = local.account_arns
|
|
|
+ standard_tags = var.standard_tags
|
|
|
+ aws_account_id = var.aws_account_id
|
|
|
+ aws_partition = var.aws_partition
|
|
|
+}
|