Skip to content

aws_availability_zones proposes changes on each plan and apply #14546

@icollar

Description

@icollar

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

  • Terraform: v0.13.0
  • Terraform AWS Provider: 3.1.0

Affected Resource(s)

  • aws_availability_zones

Note: this might affect other resources that use a timestamp as an id.

Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "3.1.0"
    }
  }
}

provider "aws" {
  region = "eu-west-1"
}

data "aws_availability_zones" "a" {}

Output

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.a: Refreshing state... [id=2020-08-10 20:17:30.88838418 +0000 UTC]

------------------------------------------------------------------------

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.a will be read during apply
  # (config refers to values not yet known)
 <= data "aws_availability_zones" "a"  {
        group_names = [
            "eu-west-1",
        ]
      ~ id          = "2020-08-10 20:31:41.366912564 +0000 UTC" -> "2020-08-10 20:31:42.66423862 +0000 UTC"
        names       = [
            "eu-west-1a",
            "eu-west-1b",
            "eu-west-1c",
        ]
        zone_ids    = [
            "euw1-az1",
            "euw1-az2",
            "euw1-az3",
        ]
    }

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.

Expected Behavior

Data resource should not be considered changed. Executing a plan with -detailed-exitcode should pass.

Actual Behavior

Data resource is be considered changed, causing plan -detailed-exitcode to fail when no resources need updating.

Steps to Reproduce

  1. terraform apply
  2. terraform plan -detailed-exitcode

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    service/ec2Issues and PRs that pertain to the ec2 service.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions