Variables
Variable types
Input Variables
variable "instance_name" { description = "Value of the Name tag for the EC2 instance" type = string default = "ExampleAppServerInstance" } # In .tf configuration file where u need to use the variable make changes using `var.variable_name` resource "aws_instance" "app_server" { ami = "ami-08d70e59c07c61a3a" instance_type = "t2.micro" tags = { Name = var.instance_name } }
Output Variables
Last updated