Skip to content

831 - Terraform Resource

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

maml
{
  provider: "google"
  region: "us-east-1"
  resources: {
    # Network
    vpc: {
      cidr_block: "10.211.0.0/16"
      enable_dns: true
      tags: {
        Name: "tapioca-vpc"
        Environment: "staging"
      }
    }

    # Compute
    instance: {
      ami: "ami-f485fe5a"
      type: "t3.medium"
      key_name: "tune-up-key"
      monitoring: true
      root_volume: {
        size: 50
        type: "gp2"
        encrypted: true
      }
    }

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

See Also