Difference between revisions of "Terraform plan"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
  
  
=== Error: undeclared resource ===
+
=== No changes. Infrastructure is up-to-date ===
  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
 
  Refreshing Terraform state in-memory prior to plan...
 
  Refreshing Terraform state in-memory prior to plan...
Line 27: Line 17:
 
  actions need to be performed.
 
  actions need to be performed.
  
 +
=== 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
 
  terraform plan
 
   
 
   

Revision as of 08:10, 2 September 2021

Examples

No changes. Infrastructure is up-to-date

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.

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: