Explorar o código

Creates a kms key for sharing amis

Fred Damstra %!s(int64=5) %!d(string=hai) anos
pai
achega
e202d538f8

+ 23 - 0
common/aws-us-gov/afs-mdr-common-services-gov/010-shared-iso-key/terragrunt.hcl

@@ -0,0 +1,23 @@
+locals {
+  environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
+  partition_vars = read_terragrunt_config(find_in_parent_folders("partition.hcl"))
+  region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
+  account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
+  global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
+}
+
+terraform {
+  # Double slash is intentional and required to show root of modules
+  source = "git@github.mdr.defpoint.com:mdr-engineering/xdr-terraform-modules.git//base/kms/shared_ami_key?ref=v0.2.2"
+}
+
+include {
+  path = find_in_parent_folders()
+}
+
+inputs = {
+  tags = {
+    Purpose = "Sharing the AMI amongst accounts"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+}

+ 18 - 0
common/aws-us-gov/afs-mdr-common-services-gov/account.hcl

@@ -0,0 +1,18 @@
+# Set account-wide variables. These are automatically pulled in to configure the remote state bucket in the root
+# terragrunt.hcl configuration.
+locals {
+  account_name   = "afs-mdr-common-services-gov"
+  account_alias  = "afs-mdr-common-services-gov"
+  aws_account_id = "701290387780"
+  instance_termination_protection = false # set to true for production!
+
+  # For CIDR assignment, see https://github.mdr.defpoint.com/mdr-engineering/msoc-infrastructure/wiki/IP-Address-Allocation
+  standard_vpc_cidr = "10.1.132.0/22"
+
+  # For testing
+  create_test_instance = false
+  test_instance_key_name = "TODO" # The key with which to provision the test instance
+
+  # Account Specific Module Variables
+  security_vpc_cidr = "10.1.128.0/22"
+}

+ 23 - 0
common/aws/mdr-common-services/010-shared-iso-key/terragrunt.hcl

@@ -0,0 +1,23 @@
+locals {
+  environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
+  partition_vars = read_terragrunt_config(find_in_parent_folders("partition.hcl"))
+  region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
+  account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
+  global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
+}
+
+terraform {
+  # Double slash is intentional and required to show root of modules
+  source = "git@github.mdr.defpoint.com:mdr-engineering/xdr-terraform-modules.git//base/kms/shared_ami_key?ref=v0.2.2"
+}
+
+include {
+  path = find_in_parent_folders()
+}
+
+inputs = {
+  tags = {
+    Purpose = "Sharing the AMI amongst accounts"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+}