Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
786bbc4b4b |
@@ -44,7 +44,6 @@ terraform.rc
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
k8s-key*
|
k8s-key*
|
||||||
*admin-key*
|
|
||||||
STARTHERE
|
STARTHERE
|
||||||
inventory
|
inventory
|
||||||
|
|
||||||
|
|||||||
+1
-5
@@ -22,10 +22,6 @@ VM_NAME_PREFIX="$(
|
|||||||
tail -n 1 | \
|
tail -n 1 | \
|
||||||
sed 's/^.*=\s*"\(.*\)"/\1/g')"
|
sed 's/^.*=\s*"\(.*\)"/\1/g')"
|
||||||
|
|
||||||
PUBLIC_IP_OUTPUT="groups_hostnames_ips"
|
|
||||||
PRIVATE_IP_OUTPUT="groups_hostnames_private_ips"
|
|
||||||
IP_TYPE="$PRIVATE_IP_OUTPUT"
|
|
||||||
|
|
||||||
# This command stores the output data in the format below.
|
# This command stores the output data in the format below.
|
||||||
# [
|
# [
|
||||||
# {
|
# {
|
||||||
@@ -52,7 +48,7 @@ IP_TYPE="$PRIVATE_IP_OUTPUT"
|
|||||||
# }
|
# }
|
||||||
# ]
|
# ]
|
||||||
DATA="$(terraform show -json | \
|
DATA="$(terraform show -json | \
|
||||||
jq '.values.outputs.'"$IP_TYPE"'.value | to_entries |
|
jq '.values.outputs.groups_hostnames_ips.value | to_entries |
|
||||||
map({group: .key, vms:.value | to_entries |
|
map({group: .key, vms:.value | to_entries |
|
||||||
map({hostname:.key,ip:.value})})')"
|
map({hostname:.key,ip:.value})})')"
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,21 @@
|
|||||||
|
terraform {
|
||||||
|
required_version = ">= 1.0.8"
|
||||||
|
required_providers {
|
||||||
|
libvirt = {
|
||||||
|
source = "dmacvicar/libvirt"
|
||||||
|
version = "0.6.11"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
nodes-config = {
|
nodes-config = {
|
||||||
"master" = {
|
"master" = {
|
||||||
base-image = var.ubuntu-ami
|
base-image = var.centos8-ami
|
||||||
num = 1
|
num = 1
|
||||||
},
|
},
|
||||||
"worker" = {
|
"worker" = {
|
||||||
base-image = var.ubuntu-ami
|
base-image = var.centos8-ami
|
||||||
num = 2
|
num = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,6 +43,10 @@ module "cloud-init-config" {
|
|||||||
# libvirt modules/resources.
|
# libvirt modules/resources.
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
provider "aws" {
|
||||||
|
region = "us-east-2"
|
||||||
|
}
|
||||||
|
|
||||||
# This module will grab the latest ami for a variety of distros. Uncomment to
|
# This module will grab the latest ami for a variety of distros. Uncomment to
|
||||||
# get a list of the latest AMIs for our supported distros.
|
# get a list of the latest AMIs for our supported distros.
|
||||||
# module "aws-amis" {
|
# module "aws-amis" {
|
||||||
@@ -43,29 +56,14 @@ module "cloud-init-config" {
|
|||||||
# value = module.aws-amis.amis
|
# value = module.aws-amis.amis
|
||||||
# }
|
# }
|
||||||
|
|
||||||
################################################################################
|
module "aws-network" {
|
||||||
# AWS Networking
|
source = "./modules/aws-network"
|
||||||
# Use of the 2 modules below to create resources for the AWS network.
|
name-prefix = var.vm-name-prefix
|
||||||
# aws-network-from-scratch will build the AWS network from scratch.
|
vpc-cidr-block = var.aws-vpc-cidr-block
|
||||||
# aws-network-existing will query AWS for an existing VPC.
|
subnet-cidr-block = var.aws-subnet-cidr-block
|
||||||
################################################################################
|
admin-ips = var.admin-ips
|
||||||
|
|
||||||
# module "aws-network-from-scratch" {
|
|
||||||
# source = "./modules/aws-network-from-scratch"
|
|
||||||
# name-prefix = var.vm-name-prefix
|
|
||||||
# vpc-cidr-block = var.aws-vpc-cidr-block
|
|
||||||
# subnet-cidr-block = var.aws-subnet-cidr-block
|
|
||||||
# admin-ips = var.admin-ips
|
|
||||||
# }
|
|
||||||
|
|
||||||
module "aws-network-existing" {
|
|
||||||
source = "./modules/aws-network-existing"
|
|
||||||
default-vpc-name = var.aws-existing-vpc-name
|
|
||||||
default-security-group-name = var.aws-existing-sg-name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# This key pair is not actually used. Keys are added to the nodes via cloud-init
|
# This key pair is not actually used. Keys are added to the nodes via cloud-init
|
||||||
# instead. We just add this here that this key will show up in the AWS console."
|
# instead. We just add this here that this key will show up in the AWS console."
|
||||||
resource "aws_key_pair" "key" {
|
resource "aws_key_pair" "key" {
|
||||||
@@ -81,8 +79,8 @@ module "nodes" {
|
|||||||
source = "./modules/aws-nodes"
|
source = "./modules/aws-nodes"
|
||||||
ami = each.value.base-image
|
ami = each.value.base-image
|
||||||
ec2-instance-type = var.aws-ec2-instance-type
|
ec2-instance-type = var.aws-ec2-instance-type
|
||||||
subnet-id = module.aws-network-existing.k8s-subnets-ids[0]
|
subnet-id = module.aws-network.subnet.id
|
||||||
security-group-ids = [module.aws-network-existing.default-sg.id]
|
security-group-ids = [module.aws-network.default-security-group.id]
|
||||||
user-datas = lookup(module.cloud-init-config, each.key, null).user-datas
|
user-datas = lookup(module.cloud-init-config, each.key, null).user-datas
|
||||||
num-nodes = each.value.num
|
num-nodes = each.value.num
|
||||||
name-prefix = "${var.vm-name-prefix}-${each.key}"
|
name-prefix = "${var.vm-name-prefix}-${each.key}"
|
||||||
@@ -134,9 +132,3 @@ module "nodes" {
|
|||||||
output "groups_hostnames_ips" {
|
output "groups_hostnames_ips" {
|
||||||
value = { for type, node in module.nodes : type => zipmap(node.names, node.ips) }
|
value = { for type, node in module.nodes : type => zipmap(node.names, node.ips) }
|
||||||
}
|
}
|
||||||
|
|
||||||
# This will outpus a map of group => [{hostname, private_ip}].
|
|
||||||
# TODO Figure out how what to do about private_ips for libvirt.
|
|
||||||
output "groups_hostnames_private_ips" {
|
|
||||||
value = { for type, node in module.nodes : type => zipmap(node.names, node.private_ips) }
|
|
||||||
}
|
|
||||||
|
|||||||
+16
-37
@@ -1,52 +1,31 @@
|
|||||||
locals {
|
locals {
|
||||||
amis = {
|
amis = {
|
||||||
amzn2 = {
|
amzn2 = {
|
||||||
# us-east-2
|
owner-id = "137112412989"
|
||||||
# owner-id = "137112412989"
|
|
||||||
# us-gov-west-1
|
|
||||||
owner-id = "045324592363"
|
|
||||||
name = "amzn2-ami-hvm-2*x86_64-gp2"
|
name = "amzn2-ami-hvm-2*x86_64-gp2"
|
||||||
},
|
},
|
||||||
ubuntu = {
|
ubuntu = {
|
||||||
# us-east-2
|
owner-id = "099720109477"
|
||||||
# owner-id = "099720109477"
|
|
||||||
# us-gov-west-1
|
|
||||||
owner-id = "513442679011"
|
|
||||||
name = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"
|
name = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"
|
||||||
},
|
},
|
||||||
# centos7 = {
|
centos7 = {
|
||||||
# # us-east-2
|
owner-id = "125523088429"
|
||||||
# # owner-id = "125523088429"
|
name = "CentOS 7.*x86_64"
|
||||||
# # us-gov-west-1
|
},
|
||||||
# # owner-id = THERE IS NO CENTOS7 IMAGE in us-gov-west-1!!
|
centos8 = {
|
||||||
# name = "CentOS 7.*x86_64"
|
owner-id = "125523088429"
|
||||||
# },
|
name = "CentOS 8.*x86_64"
|
||||||
# centos8 = {
|
},
|
||||||
# # us-east-2
|
arch = {
|
||||||
# # owner-id = "125523088429"
|
owner-id = "093273469852"
|
||||||
# # us-gov-west-1
|
name = "arch-linux-lts-hvm*x86_64-ebs"
|
||||||
# # owner-id = THERE IS NO CENTOS8 IMAGE in us-gov-west-1!!
|
},
|
||||||
# name = "CentOS 8.*x86_64"
|
|
||||||
# },
|
|
||||||
# arch = {
|
|
||||||
# # us-east-2
|
|
||||||
# # owner-id = "093273469852"
|
|
||||||
# # us-gov-west-1
|
|
||||||
# # owner-id = THERE IS NO ARCH IMAGE in us-gov-west-1!!
|
|
||||||
# name = "arch-linux-lts-hvm*x86_64-ebs"
|
|
||||||
# },
|
|
||||||
rhel7 = {
|
rhel7 = {
|
||||||
# us-east-2
|
owner-id = "309956199498"
|
||||||
# owner-id = "309956199498"
|
|
||||||
# us-gov-west-1
|
|
||||||
owner-id = "219670896067"
|
|
||||||
name = "RHEL-7.*HVM*x86_64*GP2"
|
name = "RHEL-7.*HVM*x86_64*GP2"
|
||||||
},
|
},
|
||||||
rhel8 = {
|
rhel8 = {
|
||||||
# us-east-2
|
owner-id = "309956199498"
|
||||||
# owner-id = "309956199498"
|
|
||||||
# us-gov-west-1
|
|
||||||
owner-id = "219670896067"
|
|
||||||
name = "RHEL-8.*HVM*x86_64*GP2"
|
name = "RHEL-8.*HVM*x86_64*GP2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
locals {
|
|
||||||
az-to-subnets = {
|
|
||||||
for s in data.aws_subnet.subnets : s.availability_zone => s.id...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
data "aws_vpc" "default" {
|
|
||||||
tags = {
|
|
||||||
Name = var.default-vpc-name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
data "aws_subnets" "subnet-ids" {
|
|
||||||
filter {
|
|
||||||
name = "vpc-id"
|
|
||||||
values = [data.aws_vpc.default.id]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
data "aws_subnet" "subnets" {
|
|
||||||
for_each = toset(data.aws_subnets.subnet-ids.ids)
|
|
||||||
id = each.key
|
|
||||||
}
|
|
||||||
|
|
||||||
data "aws_security_group" "default" {
|
|
||||||
name = var.default-security-group-name
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
output "default-vpc" {
|
|
||||||
value = data.aws_vpc.default
|
|
||||||
}
|
|
||||||
|
|
||||||
output "default-sg" {
|
|
||||||
value = data.aws_security_group.default
|
|
||||||
}
|
|
||||||
|
|
||||||
output "subnets" {
|
|
||||||
description = "An array of all subnets in default-vpc."
|
|
||||||
value = data.aws_subnet.subnets
|
|
||||||
}
|
|
||||||
|
|
||||||
output "k8s-subnets-ids" {
|
|
||||||
description = "An array of subnets to be used for k8s VMs. These subnets were chosen by selecting a single subnet from each availability_zone."
|
|
||||||
value = [for k,v in local.az-to-subnets : v[0]]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "az-to-subnets" {
|
|
||||||
description = "A map of availability zone to array of subnets that are in thet availability zone."
|
|
||||||
value = local.az-to-subnets
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
variable "default-security-group-name" {
|
|
||||||
description = "The name of the existing default security group. This module will query AWS for a security group with this name,"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "default-vpc-name" {
|
|
||||||
description = "The name of the existing default VPC. This module will query AWS for a VPC with this name,"
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
resource "aws_vpc" "vpc" {
|
|
||||||
cidr_block = var.vpc-cidr-block
|
|
||||||
tags = {
|
|
||||||
Name = "${var.name-prefix}-vpc"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_subnet" "subnet" {
|
|
||||||
vpc_id = aws_vpc.vpc.id
|
|
||||||
cidr_block = var.subnet-cidr-block
|
|
||||||
# availability_zone = var.avail_zone
|
|
||||||
tags = {
|
|
||||||
Name = "${var.name-prefix}-subnet"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_default_security_group" "sg" {
|
|
||||||
vpc_id = aws_vpc.vpc.id
|
|
||||||
|
|
||||||
ingress {
|
|
||||||
from_port = 22
|
|
||||||
to_port = 22
|
|
||||||
protocol = "tcp"
|
|
||||||
cidr_blocks = var.admin-ips
|
|
||||||
}
|
|
||||||
|
|
||||||
egress {
|
|
||||||
from_port = 0
|
|
||||||
to_port = 0
|
|
||||||
protocol = "-1"
|
|
||||||
cidr_blocks = ["0.0.0.0/0"]
|
|
||||||
prefix_list_ids = []
|
|
||||||
}
|
|
||||||
|
|
||||||
tags = {
|
|
||||||
Name = "${var.name-prefix}-ssh-from-admins-sg"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_internet_gateway" "igw" {
|
|
||||||
vpc_id = aws_vpc.vpc.id
|
|
||||||
tags = {
|
|
||||||
Name = "${var.name-prefix}-igw"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_default_route_table" "route-table" {
|
|
||||||
default_route_table_id = aws_vpc.vpc.main_route_table_id
|
|
||||||
|
|
||||||
route {
|
|
||||||
cidr_block = "0.0.0.0/0"
|
|
||||||
gateway_id = aws_internet_gateway.igw.id
|
|
||||||
}
|
|
||||||
|
|
||||||
# default route, mapping VPC CIDR block to "local", created implicitly and
|
|
||||||
# cannot be specified.
|
|
||||||
|
|
||||||
tags = {
|
|
||||||
Name = "${var.name-prefix}-route-table"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Associate subnet with Route Table
|
|
||||||
resource "aws_route_table_association" "a-rtb-subnet" {
|
|
||||||
subnet_id = aws_subnet.subnet.id
|
|
||||||
route_table_id = aws_default_route_table.route-table.id
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
output "vpc" {
|
|
||||||
value = aws_vpc.vpc
|
|
||||||
}
|
|
||||||
|
|
||||||
output "subnet" {
|
|
||||||
value = aws_subnet.subnet
|
|
||||||
}
|
|
||||||
|
|
||||||
output "default-security-group" {
|
|
||||||
value = aws_default_security_group.sg
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
variable "admin-ips" {
|
|
||||||
description = "A list of ips or cidr blocks that are allowed to connect to the nodes."
|
|
||||||
type = list(string)
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "name-prefix" {
|
|
||||||
default = "tf"
|
|
||||||
description = "This prefix will be used in all the names of the resources creates in our AWS network."
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "subnet-cidr-block" {
|
|
||||||
default = "10.0.1.0/24"
|
|
||||||
description = "The address space to be used for this subnet."
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "vpc-cidr-block" {
|
|
||||||
default = "10.0.0.0/16"
|
|
||||||
description = "The address space to be used for out networks VPC."
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
resource "aws_instance" "nodes" {
|
resource "aws_instance" "nodes" {
|
||||||
ami = var.ami
|
ami = var.ami
|
||||||
instance_type = var.ec2-instance-type
|
instance_type = var.ec2-instance-type
|
||||||
# TODO Make this a variable.
|
# key_name = aws_key_pair.debug1.key_name
|
||||||
associate_public_ip_address = true
|
associate_public_ip_address = true
|
||||||
subnet_id = var.subnet-id
|
subnet_id = var.subnet-id
|
||||||
vpc_security_group_ids = var.security-group-ids
|
vpc_security_group_ids = var.security-group-ids
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ output "ips" {
|
|||||||
value = aws_instance.nodes.*.public_ip
|
value = aws_instance.nodes.*.public_ip
|
||||||
}
|
}
|
||||||
|
|
||||||
output "private_ips" {
|
|
||||||
value = aws_instance.nodes.*.private_ip
|
|
||||||
}
|
|
||||||
|
|
||||||
output "names" {
|
output "names" {
|
||||||
value = aws_instance.nodes.*.tags.Name
|
value = aws_instance.nodes.*.tags.Name
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,76 +0,0 @@
|
|||||||
|
|
||||||
provider "aws" {
|
|
||||||
region = "us-gov-west-1"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
terraform {
|
|
||||||
required_version = ">= 1.0.8"
|
|
||||||
|
|
||||||
backend "s3" {
|
|
||||||
|
|
||||||
bucket = "mss-terraform-state"
|
|
||||||
key = "global/s3/terraform.tfstate"
|
|
||||||
region = "us-gov-west-1"
|
|
||||||
|
|
||||||
dynamodb_table = "mss-terraform-state-lock"
|
|
||||||
encrypt = true
|
|
||||||
|
|
||||||
}
|
|
||||||
required_providers {
|
|
||||||
libvirt = {
|
|
||||||
source = "dmacvicar/libvirt"
|
|
||||||
version = "0.6.11"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##
|
|
||||||
#S3 bucket create to hold our TFState file so we can all share env settings
|
|
||||||
resource "aws_s3_bucket" "terraform_state" {
|
|
||||||
bucket = "mss-terraform-state"
|
|
||||||
|
|
||||||
# enable versioning for the state files
|
|
||||||
versioning {
|
|
||||||
enabled = true
|
|
||||||
}
|
|
||||||
|
|
||||||
#enable server-side encryption
|
|
||||||
server_side_encryption_configuration {
|
|
||||||
|
|
||||||
rule {
|
|
||||||
apply_server_side_encryption_by_default {
|
|
||||||
sse_algorithm = "AES256"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
##
|
|
||||||
# no sql database used so that we can lock the TFstate file in the S3 bucket to ensure two people
|
|
||||||
# are not running a terraform command at the same time
|
|
||||||
resource "aws_dynamodb_table" "terraform_locks" {
|
|
||||||
name = "mss-terraform-state-lock"
|
|
||||||
billing_mode = "PAY_PER_REQUEST"
|
|
||||||
hash_key = "LockID"
|
|
||||||
|
|
||||||
attribute {
|
|
||||||
name = "LockID"
|
|
||||||
type = "S"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
##
|
|
||||||
# output variable to give details on the s3 bucket created
|
|
||||||
#TODO: move to output.tf
|
|
||||||
output "s3_bucket_arn" {
|
|
||||||
value = aws_s3_bucket.terraform_state.arn
|
|
||||||
description = "The ARN of the S3 bucket"
|
|
||||||
}
|
|
||||||
+4
-36
@@ -1,5 +1,4 @@
|
|||||||
variable "admin-ips" {
|
variable "admin-ips" {
|
||||||
default = ["0.0.0.0/0"]
|
|
||||||
description = "A list of ips or cidr blocks that are allowed to connect to the nodes."
|
description = "A list of ips or cidr blocks that are allowed to connect to the nodes."
|
||||||
type = list(string)
|
type = list(string)
|
||||||
}
|
}
|
||||||
@@ -9,21 +8,6 @@ variable "aws-ec2-instance-type" {
|
|||||||
description = "The AWS instance type to use for all nodes."
|
description = "The AWS instance type to use for all nodes."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "aws-existing-sg-name" {
|
|
||||||
default = "change-me-if-using-aws-network-existing"
|
|
||||||
description = "The name of the existing security group when using aws-network-existing."
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "aws-existing-vpc-name" {
|
|
||||||
default = "change-me-if-using-aws-network-existing"
|
|
||||||
description = "The name of the existing VPC when using aws-network-existing."
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "aws-region" {
|
|
||||||
default = "us-east-1"
|
|
||||||
description = "The AWS region to use."
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "aws-subnet-cidr-block" {
|
variable "aws-subnet-cidr-block" {
|
||||||
default = "10.0.1.0/24"
|
default = "10.0.1.0/24"
|
||||||
description = "The address space to be used for this subnet."
|
description = "The address space to be used for this subnet."
|
||||||
@@ -44,7 +28,6 @@ variable "disk-image-pool-name" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
variable "libvirt-connection-url" {
|
variable "libvirt-connection-url" {
|
||||||
default = "nobody@localhost"
|
|
||||||
description = "The libvirt connection URI, ie. qemu+ssh://<user>@<host>/system"
|
description = "The libvirt connection URI, ie. qemu+ssh://<user>@<host>/system"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,46 +90,31 @@ variable "vm-name-prefix" {
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
variable "amzn2-ami" {
|
variable "amzn2-ami" {
|
||||||
# us-east-2
|
default = "ami-0dd0ccab7e2801812"
|
||||||
# default = "ami-0dd0ccab7e2801812"
|
|
||||||
# us-gov-west-1
|
|
||||||
default = "ami-098bf51d9a35299f0"
|
|
||||||
description = "The AMI to use for Amazon Linux 2."
|
description = "The AMI to use for Amazon Linux 2."
|
||||||
}
|
}
|
||||||
variable "ubuntu-ami" {
|
variable "ubuntu-ami" {
|
||||||
# us-east-2
|
default = "ami-06c7d6c0987eaa46c"
|
||||||
# default = "ami-06c7d6c0987eaa46c"
|
|
||||||
# us-gov-west-1
|
|
||||||
default = "ami-087ee83c8de303181"
|
|
||||||
description = "The AMI to use for Ubuntu."
|
description = "The AMI to use for Ubuntu."
|
||||||
}
|
}
|
||||||
variable "centos7-ami" {
|
variable "centos7-ami" {
|
||||||
# us-east-2
|
|
||||||
default = "ami-00f8e2c955f7ffa9b"
|
default = "ami-00f8e2c955f7ffa9b"
|
||||||
description = "The AMI to use for CentOS 7."
|
description = "The AMI to use for CentOS 7."
|
||||||
}
|
}
|
||||||
variable "centos8-ami" {
|
variable "centos8-ami" {
|
||||||
# us-east-2
|
|
||||||
default = "ami-057cacbfbbb471bb3"
|
default = "ami-057cacbfbbb471bb3"
|
||||||
description = "The AMI to use for CentOS 8."
|
description = "The AMI to use for CentOS 8."
|
||||||
}
|
}
|
||||||
variable "arch-ami" {
|
variable "arch-ami" {
|
||||||
# us-east-2
|
|
||||||
default = "ami-02653f06de985e3ba"
|
default = "ami-02653f06de985e3ba"
|
||||||
description = "The AMI to use for Arch Linux."
|
description = "The AMI to use for Arch Linux."
|
||||||
}
|
}
|
||||||
variable "rhel7-ami" {
|
variable "rhel7-ami" {
|
||||||
# us-east-2
|
default = "ami-0a509b3c2a4d05b3f"
|
||||||
# default = "ami-0a509b3c2a4d05b3f"
|
|
||||||
# us-gov-west-1
|
|
||||||
default = "ami-04ccdf5793086ea95"
|
|
||||||
description = "The AMI to use for RHEL 7."
|
description = "The AMI to use for RHEL 7."
|
||||||
}
|
}
|
||||||
variable "rhel8-ami" {
|
variable "rhel8-ami" {
|
||||||
# us-east-2
|
default = "ami-0d871ca8a77af2948"
|
||||||
# default = "ami-0d871ca8a77af2948"
|
|
||||||
# us-gov-west-1
|
|
||||||
default = "ami-0b1f10cd1cd107dd2"
|
|
||||||
description = "The AMI to use for RHEL 8."
|
description = "The AMI to use for RHEL 8."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user