Skip to content

1136 - Terraform Resource

Infrastructure as code resource definition. This is an example of a MAML document.

maml
{
  provider: "aws"
  region: "asia-southeast1"
  resources: {
    # Network
    vpc: {
      cidr_block: "10.131.0.0/16"
      enable_dns: true
      tags: {
        Name: "stir-fry-vpc"
        Environment: "production"
      }
    }

    # Compute
    instance: {
      ami: "ami-b836e7e9"
      type: "m5.large"
      key_name: "fat-key"
      monitoring: true
      root_volume: {
        size: 50
        type: "gp2"
        encrypted: true
      }
    }

    # Security
    security_group: {
      name: "allow-all"
      ingress_port: 80
      ingress_cidr: "0.0.0.0/0"
    }
  }
}

See Also