Terraform Registry

기본 문법


<aside> <img src="/icons/compose_gray.svg" alt="/icons/compose_gray.svg" width="40px" /> 기본 문법


variable "example" {
	default = "hello"
}

resource "aws_instance" "example" {
	instance_type = "t2.micro"
	ami           = "ami-abc123"
}

<aside> 📚 arguments(=attribute)


</aside>

<aside> <img src="/icons/archive_gray.svg" alt="/icons/archive_gray.svg" width="40px" /> blocks


<aside> <img src="/icons/rename_gray.svg" alt="/icons/rename_gray.svg" width="40px" /> 최상위 Block type


</aside>

</aside>

</aside>

JSON 문법


<aside> <img src="/icons/compose_gray.svg" alt="/icons/compose_gray.svg" width="40px" /> JSON 문법


{
	"variable": {
		"example": {
			"default": "hello"
		}
	}
}

{
	"resource": {
		"aws_instance": {
			"example": {
				"instance_type": "t2.micro",
				"ami": "ami-abc123"
			}
		}
	}
}