Quellcode durchsuchen

Fixes amis.tf symlink

Brad Poulton vor 4 Jahren
Ursprung
Commit
ad5b767e2d
3 geänderte Dateien mit 18 neuen und 106 gelöschten Zeilen
  1. 17 1
      base/amis.tf
  2. 0 105
      base/bastion/amis.tf
  3. 1 0
      base/bastion/amis.tf

+ 17 - 1
base/amis.tf

@@ -5,6 +5,22 @@ locals {
     "master"     = data.aws_ami.master.image_id,
     #    "ubuntu1804" = data.aws_ami.ubuntu1804.image_id,
   }
+  # We need some data from the block devices
+  block_device_mappings = {
+    "base"       = {
+      for bd in data.aws_ami.base.block_device_mappings:
+        bd.device_name => bd
+    }
+    "minion"     = {
+      for bd in data.aws_ami.minion.block_device_mappings:
+        bd.device_name => bd
+    }
+    "master"     = {
+      for bd in data.aws_ami.master.block_device_mappings:
+        bd.device_name => bd
+    }
+    #    "ubuntu1804" = data.aws_ami.ubuntu1804.image_id,
+  }
 }
 
 data "aws_ami" "base" {
@@ -67,7 +83,7 @@ data "aws_ami" "master" {
   }
 }
 
-# not presently in commercial
+# Not presently in commercial
 #data "aws_ami" "ubuntu1804" {
 #  most_recent = true
 #  owners = [ var.common_services_account ]

+ 0 - 105
base/bastion/amis.tf

@@ -1,105 +0,0 @@
-locals {
-  ami_map = {
-    "base"       = data.aws_ami.base.image_id,
-    "minion"     = data.aws_ami.minion.image_id,
-    "master"     = data.aws_ami.master.image_id,
-    #    "ubuntu1804" = data.aws_ami.ubuntu1804.image_id,
-  }
-  # We need some data from the block devices
-  block_device_mappings = {
-    "base"       = {
-      for bd in data.aws_ami.base.block_device_mappings:
-        bd.device_name => bd
-    }
-    "minion"     = {
-      for bd in data.aws_ami.minion.block_device_mappings:
-        bd.device_name => bd
-    }
-    "master"     = {
-      for bd in data.aws_ami.master.block_device_mappings:
-        bd.device_name => bd
-    }
-    #    "ubuntu1804" = data.aws_ami.ubuntu1804.image_id,
-  }
-}
-
-data "aws_ami" "base" {
-  most_recent = true
-  owners = [ var.common_services_account ]
-
-  filter {
-    name   = "virtualization-type"
-    values = ["hvm"]
-  }
-
-  filter {
-    name = "root-device-type"
-    values = ["ebs"]
-  }
-
-  filter {
-    name = "name"
-    values = [ "MSOC_RedHat_Base_*" ]
-  }
-}
-
-data "aws_ami" "minion" {
-  most_recent = true
-  owners = [ var.common_services_account ]
-
-  filter {
-    name   = "virtualization-type"
-    values = ["hvm"]
-  }
-
-  filter {
-    name = "root-device-type"
-    values = ["ebs"]
-  }
-
-  filter {
-    name = "name"
-    values = [ "MSOC_RedHat_Minion_*" ]
-  }
-}
-
-data "aws_ami" "master" {
-  most_recent = true
-  owners = [ var.common_services_account ]
-
-  filter {
-    name   = "virtualization-type"
-    values = ["hvm"]
-  }
-
-  filter {
-    name = "root-device-type"
-    values = ["ebs"]
-  }
-
-  filter {
-    name = "name"
-    values = [ "MSOC_RedHat_Master_*" ]
-  }
-}
-
-# Not presently in commercial
-#data "aws_ami" "ubuntu1804" {
-#  most_recent = true
-#  owners = [ var.common_services_account ]
-#
-#  filter {
-#    name   = "virtualization-type"
-#    values = ["hvm"]
-#  }
-#
-#  filter {
-#    name = "root-device-type"
-#    values = ["ebs"]
-#  }
-#
-#  filter {
-#    name = "name"
-#    values = [ "MSOC_Ubuntu_1804_*" ]
-#  }
-#}

+ 1 - 0
base/bastion/amis.tf

@@ -0,0 +1 @@
+../amis.tf