Created
February 23, 2023 22:28
-
-
Save jgwerner/7b519b19a9b641c3d8fb684fe181a1db to your computer and use it in GitHub Desktop.
Example output of a main.tf file created by ChatGPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "us-west-2" | |
} | |
resource "aws_vpc" "example" { | |
cidr_block = "10.0.0.0/16" | |
tags = { | |
Name = "example-vpc" | |
} | |
} | |
resource "aws_subnet" "example" { | |
vpc_id = aws_vpc.example.id | |
cidr_block = "10.0.1.0/24" | |
tags = { | |
Name = "example-subnet" | |
} | |
} | |
resource "aws_security_group" "example" { | |
name_prefix = "example-" | |
vpc_id = aws_vpc.example.id | |
ingress { | |
from_port = 0 | |
to_port = 65535 | |
protocol = "tcp" | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
egress { | |
from_port = 0 | |
to_port = 65535 | |
protocol = "tcp" | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
tags = { | |
Name = "example-security-group" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment