Ver Fonte

Merge pull request #10 from mdr-engineering/feature/ftd_MSOCI-1277_shared_iso_key

Creates a kms key for sharing amis
Frederick Damstra há 5 anos atrás
pai
commit
7cf9d7eb2b

+ 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()}/"
+  }
+}

+ 9 - 2
common/aws-us-gov/afs-mdr-common-services-gov/account.hcl

@@ -4,8 +4,15 @@ locals {
   account_name   = "afs-mdr-common-services-gov"
   account_alias  = "afs-mdr-common-services-gov"
   aws_account_id = "701290387780"
-  instance_termination_protection = true # set to true for production!
+  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.128.0/22"
+  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()}/"
+  }
+}