mirror of
https://github.com/ghndrx/terraform.git
synced 2026-02-10 14:55:06 +00:00
cleanup folders and files
This commit is contained in:
16
aws/aws_asg/modules/vpc/subnets/us-west/outputs.tf
Normal file
16
aws/aws_asg/modules/vpc/subnets/us-west/outputs.tf
Normal file
@@ -0,0 +1,16 @@
|
||||
# In your vpc/subnets/us-east module
|
||||
|
||||
output "us_west_subnet_1_id" {
|
||||
description = "The ID of the first US East subnet"
|
||||
value = aws_subnet.us_west_subnet_1.id
|
||||
}
|
||||
|
||||
output "us_west_subnet_2_id" {
|
||||
description = "The ID of the second US East subnet"
|
||||
value = aws_subnet.us_west_subnet_2.id
|
||||
}
|
||||
|
||||
output "us_west_subnet_3_id" {
|
||||
description = "The ID of the third US East subnet"
|
||||
value = aws_subnet.us_west_subnet_3.id
|
||||
}
|
||||
36
aws/aws_asg/modules/vpc/subnets/us-west/subnets-west.tf
Normal file
36
aws/aws_asg/modules/vpc/subnets/us-west/subnets-west.tf
Normal file
@@ -0,0 +1,36 @@
|
||||
provider "aws" {
|
||||
region = "us-west-2"
|
||||
}
|
||||
|
||||
resource "aws_subnet" "us_west_subnet_1" {
|
||||
vpc_id = var.vpc_id_west_2
|
||||
cidr_block = var.us_west_subnet_1_cidr_block
|
||||
availability_zone = var.us_west_subnet_1_az
|
||||
tags = {
|
||||
Name = "${var.region}_${var.us_west_subnet_1_az}_subnet"
|
||||
}
|
||||
map_public_ip_on_launch = true
|
||||
depends_on = [var.vpc_id_west_2]
|
||||
}
|
||||
|
||||
resource "aws_subnet" "us_west_subnet_2" {
|
||||
vpc_id = var.vpc_id_west_2
|
||||
cidr_block = var.us_west_subnet_2_cidr_block
|
||||
availability_zone = var.us_west_subnet_2_az
|
||||
tags = {
|
||||
Name = "${var.region}_${var.us_west_subnet_2_az}_subnet"
|
||||
}
|
||||
map_public_ip_on_launch = true
|
||||
depends_on = [var.vpc_id_west_2]
|
||||
}
|
||||
|
||||
resource "aws_subnet" "us_west_subnet_3" {
|
||||
vpc_id = var.vpc_id_west_2
|
||||
cidr_block = var.us_west_subnet_3_cidr_block
|
||||
availability_zone = var.us_west_subnet_3_az
|
||||
tags = {
|
||||
Name = "${var.region}_${var.us_west_subnet_3_az}_subnet"
|
||||
}
|
||||
map_public_ip_on_launch = true
|
||||
depends_on = [var.vpc_id_west_2]
|
||||
}
|
||||
9
aws/aws_asg/modules/vpc/subnets/us-west/terraform.tfvars
Normal file
9
aws/aws_asg/modules/vpc/subnets/us-west/terraform.tfvars
Normal file
@@ -0,0 +1,9 @@
|
||||
region = "us-west-2"
|
||||
us_west_subnet_1_cidr_block = "10.0.1.0/24"
|
||||
us_west_subnet_1_az = "us-west-2a"
|
||||
|
||||
us_west_subnet_2_cidr_block = "10.0.2.0/24"
|
||||
us_west_subnet_2_az = "us-west-2b"
|
||||
|
||||
us_west_subnet_3_cidr_block = "10.0.3.0/24"
|
||||
us_west_subnet_3_az = "us-west-2c"
|
||||
34
aws/aws_asg/modules/vpc/subnets/us-west/variables.tf
Normal file
34
aws/aws_asg/modules/vpc/subnets/us-west/variables.tf
Normal file
@@ -0,0 +1,34 @@
|
||||
variable "us_west_subnet_1_cidr_block" {
|
||||
default = "10.0.1.0/24"
|
||||
}
|
||||
|
||||
variable "us_west_subnet_2_cidr_block" {
|
||||
default = "10.0.2.0/24"
|
||||
}
|
||||
|
||||
variable "us_west_subnet_3_cidr_block" {
|
||||
default = "10.0.3.0/24"
|
||||
}
|
||||
|
||||
|
||||
variable "us_west_subnet_1_az" {
|
||||
default = "us-west-2a"
|
||||
}
|
||||
|
||||
variable "us_west_subnet_2_az" {
|
||||
default = "us-west-2b"
|
||||
}
|
||||
|
||||
variable "us_west_subnet_3_az" {
|
||||
default = "us-west-2c"
|
||||
}
|
||||
|
||||
variable "region" {
|
||||
default = "us-west-2"
|
||||
}
|
||||
|
||||
|
||||
variable "vpc_id_west_2" {
|
||||
description = "The ID of the VPC"
|
||||
type = string
|
||||
}
|
||||
Reference in New Issue
Block a user