Terraform plan execution errors

From wikieduonline
Revision as of 15:58, 6 September 2021 by Chmod14 (talk | contribs) (Created page with "=== Error: undeclared resource === terraform plan ╷ │ Error: Reference to undeclared resource │ │ on main.tf line 9, in resource "aws_instance" "example": │...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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: