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

Creating google_dns_record_set with rrdatas from google_dns_keys data source causes replacement due to case differences #9093

Labels

Comments

@MontyD
Copy link

MontyD commented May 6, 2021

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 me too comments, 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.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v0.13.6
+ provider registry.terraform.io/hashicorp/google v3.66.1
+ provider registry.terraform.io/hashicorp/google-beta v3.66.1

Affected Resource(s)

  • google_dns_record_set

Terraform Configuration Files

data "google_dns_keys" "project" {
  managed_zone = "managed_zone_id"
}

resource "google_dns_record_set" "project_keys" {
  managed_zone = "target_managed_zone_id"
  project      = "target_project"

  name = "google_dns_managed_zone.project.dns_name"
  type = "DS"
  rrdatas = [
    for ksk in data.google_dns_keys.project.key_signing_keys : ksk.ds_record
  ]
  ttl = 300
}

Expected Behaviour

After initial creation google_dns_record_set.project_keys should not be recreated on subsequent applies.

Actual Behaviour

On every apply google_dns_record_set.project_keys is replaced because the rrdatas change case, e.g.:

  # google_dns_record_set.project_keys must be replaced
-/+ resource "google_dns_record_set" "project_keys" {
      ~ id           = "projects/test/managedZones/product/rrsets/test.dev.null./DS" -> (known after apply)
        managed_zone = "product"
        name         = "test.dev.null."
        project      = "test"
      ~ rrdatas      = [ # forces replacement
          - "13244 1 1 55sd323sddf323356huku",
          + "13244 1 1 55SD323SDDF323356HUKU",
        ]
        ttl          = 300
        type         = "DS"
    }

Steps to Reproduce

  1. terraform apply
  2. terraform apply for a second time and see that the google_dns_record_set is recreated.
@MontyD MontyD added the bug label May 6, 2021
rjw57 added a commit to rjw57/magic-modules that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes hashicorp/terraform-provider-google#9093
@rjw57
Copy link

rjw57 commented May 6, 2021

GoogleCloudPlatform/magic-modules#4769 opened which should fix this

ScottSuarez pushed a commit to GoogleCloudPlatform/magic-modules that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes hashicorp/terraform-provider-google#9093
modular-magician added a commit to modular-magician/terraform-google-conversion that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes hashicorp/terraform-provider-google#9093

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit to GoogleCloudPlatform/terraform-google-conversion that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes hashicorp/terraform-provider-google#9093

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit to modular-magician/terraform-provider-google-beta that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes hashicorp/terraform-provider-google#9093

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes hashicorp#9093

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes #9093

Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit to hashicorp/terraform-provider-google-beta that referenced this issue May 6, 2021
DS records need case change suppression as with "MX" records.

Closes hashicorp/terraform-provider-google#9093

Signed-off-by: Modular Magician <magic-modules@google.com>
@github-actions
Copy link

github-actions bot commented Jun 6, 2021

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.