Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 429 Bytes

terraform-variables.md

File metadata and controls

15 lines (13 loc) · 429 Bytes

Terraform Variables

A Terraform variable serves as a parameter to customize the stack or a module.

const imageId = new TerraformVariable(this, "imageId", {
  type: "string",
  default: "ami-abcde123",
  description: "What AMI to use to create an instance",
});
new Instance(this, "hello", {
  ami: imageId.value,
  instanceType: "t2.micro",
});