Terraform plan execution errors

From wikieduonline
Jump to navigation Jump to search

Error: undeclared resource

 terraform plan
╷
│ Error: Reference to undeclared resource
│
│   on main.tf line 9, in resource "aws_instance" "example":
│    9:   ami               = data.aws_ami.windows.id
│
│ A data resource "aws_ami" "windows" has not been declared in the root module.

No configuration files

terraform plan

Error: No configuration files 

Plan requires configuration to be present. Planning without a configuration
would mark everything for destruction, which is normally not what is desired.
If you would like to destroy everything, run plan with the -destroy option.
Otherwise, create a Terraform configuration file (.tf file) and try again.

Related terms

See also

Advertising: