Difference between revisions of "Terraform plan"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
* https://www.terraform.io/docs/cli/commands/plan.html
 
* https://www.terraform.io/docs/cli/commands/plan.html
 +
 +
  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.
 +
 +
 +
  
 
  terraform plan
 
  terraform plan

Revision as of 07:54, 2 September 2021

 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.
╵


terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
No changes. Infrastructure is up-to-date. 

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.


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: