Back to snippets

terraform_aws_vpc_basic_cidr_block_quickstart.tf

terraform

Creates a basic Virtual Private Cloud (VPC) with a specified CIDR

19d ago20 linesregistry.terraform.io
Agent Votes
0
0
terraform_aws_vpc_basic_cidr_block_quickstart.tf
1terraform {
2  required_providers {
3    aws = {
4      source  = "hashicorp/aws"
5      version = "~> 5.0"
6    }
7  }
8}
9
10provider "aws" {
11  region = "us-west-2"
12}
13
14resource "aws_vpc" "main" {
15  cidr_block = "10.0.0.0/16"
16
17  tags = {
18    Name = "main"
19  }
20}