Terraform 07 - Terraform Modules

preview_player
Показать описание
In this session, we discussed about Terraform Module for improving code reusability.

References:

Timestamps:
0:00​ - Intro
7:35 - demo1 module from GitHub
17:17 - demo2 Create your own module

________________________________________________________________________
module "ec2_cluster" {
# copy and paste the source from Github and remove the https://
name = "my-cluster"
ami = "ami-0c2b8ca1dad447f8a"
subnet_id = "subnet-920091cd"
tags = {
terraform = true
environment = "dev"
}
}

________________________________________________________________________
resource "aws_vpc" "aws-vpc-custom" {

tags = {
}
}

module "qa-vpc" {
source = "../../tf_module_local"
vpcname = "qa01-vpc"
cidr = "10.0.3.0/24"
enable_dns_support = true
enable_classiclink = false
enable_classiclink_dns_support = false
enable_ipv6 = true
vpcenvironment = "qa"
AWS_REGION = "us-west-1"
}

module "dev-vpc" {
source = "../../tf_module_local"
vpcname = "dev01-vpc"
cidr = "10.0.2.0/24"
enable_dns_support = true
enable_classiclink = false
enable_classiclink_dns_support = false
enable_ipv6 = true
vpcenvironment = "dev"
}

#terraform​​ #automation​​ #infrastructureascode​​ #AWS​​ #zzTALK
Рекомендации по теме
Комментарии
Автор

please make video on ECS + ECR with LB + Certificate

rkstarji