Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# terraform validate will catch typo in resource reference
resource "aws_s3_bukcet" "wrong_resource" {
name = "my-bucket"
# terraform validate will catch wrong CIDR
resource "aws_vpc" "default" {
cidr_block = ""
resource "aws_instance" "web" {
# .. however, non existing instance type is not caught by terraform validate
instance_type = "t200.micro"
ami = "ami-0db61e5fa6d1a815a"
vpc_security_group_ids = []
subnet_id =
provisioner "remote-exec" {
inline = [
"sudo apt-get -y update",
"sudo apt-get -y install nginx",
"sudo service nginx start",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment