module

jonbrouse/module/sample

Terraform Module HCL SAMPLE

Test module

Install
module "module" {
source = "jonbrouse/module/sample"
version = "1.0.1"
}
plain text: /constructs/tfmod-jonbrouse-module-sample/install.txt
⭐ Source on GitHub 📦 Registry page
README

VPC Module This module is called within the infrastructure repository to create a new AWS VPC. Root Module To instantiate the module, create a root module with the following files: __main.tf__ `` module "vpc" { source = "[email protected]:TerraformDesignPattern/vpc.git" aws_account = "${var.aws_account}" availability_zones = "${var.availability_zones}" aws_region = "${var.aws_region}" private_subnets = "${var.private_subnets}" public_subnets = "${var.public_subnets}" vpc_cidr = "${var.vpc_cidr}" vpc_name = "${var.vpc_name}" } ` __variables.tf__ As a personal preference, I try to only define data in variable files. ` variable "aws_accont" {} variable "aws_region" {} variable "vpc_name" {} variable "availability_zones" { default = [ "us-east-1b", "us-east-1c", "us-east-1d" ] } variable "private

Inputs (14)
NameTypeDescriptionDefault
vpc_cidrstringDefine the VPC CIDR block required
environment_namestringName of the enviornment the VPC belongs to required
aws_accountstringThe name of the AWS account in which the VPC is being created required
aws_regionstringThe name of the AWS region in which the VPC will be created required
vpc_namestringThe desired name of the VPC being created required
availability_zoneslistThe AWS availability zones in which subnets will be created[]
enable_dns_hostnamesstringTrue to enable DNS hostnames in the VPCtrue
public_subnetslist[]
aws_region_shortnamesmap{ "ap-northeast-1": "apne1", "ap-nor
enable_dns_supportstringTrue to enable private DNS within the VPCtrue
private_subnetslist[]
private_propagating_vgwslistA list of VGWs the private route table should propagate.[]
public_propagating_vgwslistA list of VGWs the public route table should propagate.[]
map_public_ip_on_launchstringTrue to auto-assign a public IP on launchtrue
Outputs (13)
flow_log_cloudwatch_log_group_name
internet_gateway_id
nat_eips
private_subnet_ids
public_subnet_cidr_blocks
public_subnet_ids
vpc_cidr_block
aws_region_shortname — The AWS region's shortname used when naming resources. i.e. "use1"
vpc_id
private_route_table_ids
private_subnet_cidr_blocks
public_route_table_ids
flow_log_cloudwatch_log_group_arn
Resources (12)
aws_cloudwatch_log_groupaws_eipaws_flow_logaws_iam_roleaws_iam_role_policyaws_internet_gatewayaws_nat_gatewayaws_routeaws_route_tableaws_route_table_associationaws_subnetaws_vpc
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.1
Cloud SAMPLE
Total downloads809
Inputs14
Outputs13
Resources12
Namespacejonbrouse
Updated