You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plan shows changes. In our larger terraform repos with dozens of data resources, this causes a huge amount of noise in the plan output, even when no actual infrastructure changes are going to be made. There seems to be no way to disable the output to show only changes.
Steps to Reproduce
Make sure you have valid AWS credentials set up in ~/.aws/credentials
Save the below script as data_source_lookup.sh:
#!/usr/bin/env bash
cat <<"EOF" | docker run -i --rm -v ~/.aws:/root/.aws --entrypoint sh $1cat <<TFCODE > /plan.tfprovider "aws" { region = "us-east-1" version = "~> 3.2" }data "aws_availability_zones" "available" {}TFCODEterraform initterraform planEOF
Mark the script as executable: chmod +x data_source_lookup.sh
Run the plan with hashicorp/terraform:0.12.29 container and see there is no diff:
$ ./data_source_lookup.sh hashicorp/terraform:0.12.29
Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 3.2.0...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
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.
data.aws_availability_zones.available: Refreshing state...
------------------------------------------------------------------------
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.
Run the plan with hashicorp/terraform:0.13.0 container and see the diff:
$ ./data_source_lookup.sh hashicorp/terraform:0.13.0
Initializing the backend...
Initializing provider plugins...
- Finding hashicorp/aws versions matching "~> 3.2"...
- Installing hashicorp/aws v3.2.0...
- Installed hashicorp/aws v3.2.0 (signed by HashiCorp)
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
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.
data.aws_availability_zones.available: Refreshing state...
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
<= read (data resources)
Terraform will perform the following actions:
# data.aws_availability_zones.available will be read during apply
# (config refers to values not yet known)
<= data "aws_availability_zones" "available" {
group_names = [
"us-east-1",
]
~ id = "2020-08-14 16:39:32.726054182 +0000 UTC" -> "2020-08-14 16:39:34.61159939 +0000 UTC"
names = [
"us-east-1a",
"us-east-1b",
"us-east-1c",
"us-east-1d",
"us-east-1e",
"us-east-1f",
]
zone_ids = [
"use1-az4",
"use1-az6",
"use1-az1",
"use1-az2",
"use1-az3",
"use1-az5",
]
}
Plan: 0 to add, 0 to change, 0 to destroy.
------------------------------------------------------------------------
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Sep 14, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
Expected Behavior
The plan should have showed no changes.
Actual Behavior
The plan shows changes. In our larger terraform repos with dozens of
data
resources, this causes a huge amount of noise in the plan output, even when no actual infrastructure changes are going to be made. There seems to be no way to disable the output to show only changes.Steps to Reproduce
~/.aws/credentials
data_source_lookup.sh
:chmod +x data_source_lookup.sh
hashicorp/terraform:0.12.29
container and see there is no diff:hashicorp/terraform:0.13.0
container and see the diff:Additional Context
References
#17034
The text was updated successfully, but these errors were encountered: