Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_availability_zones started proposing changes on each apply #14405

Closed
vladimirtiukhtin opened this issue Jul 30, 2020 · 9 comments · Fixed by #14412
Closed

aws_availability_zones started proposing changes on each apply #14405

vladimirtiukhtin opened this issue Jul 30, 2020 · 9 comments · Fixed by #14412
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@vladimirtiukhtin
Copy link

Terraform CLI and Terraform AWS Provider Version

Terraform v0.13.0-rc1
+ provider registry.terraform.io/-/aws v2.70.0
+ provider registry.terraform.io/-/random v2.3.0
+ provider registry.terraform.io/hashicorp/aws v2.70.0
+ provider registry.terraform.io/hashicorp/random v2.3.0

Affected Resource(s)

  • aws_availability_zones

Debug Output

 <= data "aws_availability_zones" "available"  {
        group_names = [
            "eu-west-2",
        ]
      ~ id          = "2020-07-30 12:47:26.4286656 +0000 UTC" -> "2020-07-30 12:47:47.9707994 +0000 UTC"

Expected Behavior

No changes proposed

@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jul 30, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 30, 2020
@bflad
Copy link
Contributor

bflad commented Jul 30, 2020

Hi @vladimirtiukhtin 👋 Thank you for submitting this and sorry you ran into trouble here. Can you please provide the relevant data source configuration?

@vladimirtiukhtin
Copy link
Author

Thanks for the prompt response @bflad. My configuration is incredibly simple

data "aws_availability_zones" "available" {
  state = "available"
}

@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 30, 2020
bflad added a commit that referenced this issue Jul 30, 2020
…omputed instead of Optional

Reference: #14405

Output from acceptance testing:

```
--- PASS: TestAccAWSAvailabilityZones_Filter (7.67s)
--- PASS: TestAccAWSAvailabilityZones_basic (7.83s)
--- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (7.88s)
--- PASS: TestAccAWSAvailabilityZones_stateFilter (7.88s)
--- PASS: TestAccAWSAvailabilityZones_ExcludeNames (9.35s)
--- PASS: TestAccAWSAvailabilityZones_ExcludeZoneIds (9.41s)
```
@bflad
Copy link
Contributor

bflad commented Jul 30, 2020

This should fix it: #14412

I'm guessing there is going to be other instances of this unexpected behavior with other data sources in Terraform 0.13 as well, but its going to be a week or two before we can easily gain more visibility into this type of issue.

bflad added a commit that referenced this issue Jul 31, 2020
…omputed instead of Optional (#14412)

Reference: #14405

Output from acceptance testing:

```
--- PASS: TestAccAWSAvailabilityZones_Filter (7.67s)
--- PASS: TestAccAWSAvailabilityZones_basic (7.83s)
--- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (7.88s)
--- PASS: TestAccAWSAvailabilityZones_stateFilter (7.88s)
--- PASS: TestAccAWSAvailabilityZones_ExcludeNames (9.35s)
--- PASS: TestAccAWSAvailabilityZones_ExcludeZoneIds (9.41s)
```
@bflad bflad added this to the v3.1.0 milestone Jul 31, 2020
@bflad
Copy link
Contributor

bflad commented Jul 31, 2020

The fix for this has been merged and will release with version 3.1.0 of the Terraform AWS Provider, next week. 👍

@ghost
Copy link

ghost commented Aug 7, 2020

This has been released in version 3.1.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@vladimirtiukhtin
Copy link
Author

@bflad I'm afraid the issue still exists in 3.1.0. It looks like the root cause is in ID which became dependant on current data/time
Screen Shot 2020-08-10 at 14 33 10

@vladimirtiukhtin
Copy link
Author

Should we open a new issue or re-open this one?

@jurgenweber
Copy link
Contributor

jurgenweber commented Aug 14, 2020

This still seems to be broken:

$ tf version
Terraform v0.13.0
+ provider registry.terraform.io/hashicorp/aws v3.1.0
+ provider registry.terraform.io/hashicorp/helm v1.2.4
+ provider registry.terraform.io/hashicorp/kubernetes v1.12.0
+ provider registry.terraform.io/hashicorp/local v1.4.0
+ provider registry.terraform.io/hashicorp/null v2.1.2
+ provider registry.terraform.io/hashicorp/random v2.3.0
+ provider registry.terraform.io/hashicorp/template v2.1.2
+ provider registry.terraform.io/hashicorp/tfe v0.20.0

and:

 <= data "aws_availability_zones" "available"  {
        group_names = [
            "ap-southeast-2",
        ]
      ~ id          = "2020-08-14 00:15:16.884539377 +0000 UTC" -> "2020-08-14 00:15:48.674203932 +0000 UTC"
        names       = [
            "ap-southeast-2a",
            "ap-southeast-2b",
            "ap-southeast-2c",
        ]
        state       = "available"
        zone_ids    = [
            "apse2-az3",
            "apse2-az1",
            "apse2-az2",
        ]
    }

it also seems to be that many data providers are suffering from this; I also see it from:

<= data "aws_kms_secrets" "stuff"  {
      ~ id        = "2020-08-14 00:15:19.986658155 +0000 UTC" -> "2020-08-14 00:15:48.477072138 +0000 UTC"
        plaintext = {

and its dumping my secrets to console as plain text!!!!!

also:

#14649

@bflad
Copy link
Contributor

bflad commented Aug 14, 2020

Hi folks 👋

There was some unexpected changes with data source handling that occurred in the Terraform CLI version 0.13.0 release that are causing this additional data source output in addition to the unstable id attribute in the output. There are now larger tracking issues for both sides of this so to consolidate efforts and discussions:

Please upvote and subscribe to those for further updates. 👍 I'm going to lock this issue to encourage any discussion in those.

@hashicorp hashicorp locked and limited conversation to collaborators Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
3 participants