-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi.
I am using variables in the variable.tf file and trying to read the data of it. But even if I leave the variable without a default value, when "terraform plan" command is running, It has a value and seems not using of variables.tf file. what is the problem? I will appreciate.
variables.tf file:
variable "ami_id" {}
variable "instance_type" {}
main.tf file:
resource "aws_instance" "Sahar" {
ami = var.ami_id
instance_type = var.instance_type
terraform apply result:
aws_instance.Sahar will be created
- resource "aws_instance" "Sahar" {
- ami = "ami-0557a15b87f6559cf"
Metadata
Metadata
Assignees
Labels
No labels