Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "3.14.2"
# ...
}
module "consul" {
source = "git::https://example.com/consul.git?ref=v1.2.0"
}
module "vpc" {
source = "./modules/vpc"
cidr_block = "10.0.0.0/16"
}
output "vpc_id" {
description = "The ID of the VPC"
value = aws_vpc.this.id
}
resource "aws_instance" "web" {
subnet_id = module.vpc.public_subnets[0]
}