- Providers
- Resources
- Data Sources
resource "aws_instance" "web_server" {
name = "web-server"
ebs_volume {
size = 40
}
}
provide "aws" {
access_key = ""
secret_key = ""
region = "us-east-1"
}
data "aws_ssm_parameter" "ami" {
name = "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2"
}
aws_instance.web_server.name
variable "aws_region" {
type = string
description = "Region to use for AWS resources"
default = "us-east-1"
sensitive = false
}
var.aws_region
locals {
instance_prefix = "globo"
common_tags = {
company = "HeeZJee"
project = var.project
billing = var.billing
}
}
local.instance_prefix
local.common_tags.company
output "public_dns_hostname" {
value = aws_instance.web_server.public_dns
description = "Public DNS hostname web server"
}
- Primitive: string, number, boolean
- Collection: list, set, map
- Structural: tuple, object