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

google_essential_contacts_contact import does not include required field parent #11124

Closed
DanHyland opened this issue Feb 17, 2022 · 2 comments · Fixed by GoogleCloudPlatform/magic-modules#11995, hashicorp/terraform-provider-google-beta#8423 or #19877

Comments

@DanHyland
Copy link

DanHyland commented Feb 17, 2022

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

0.12.31 (but will happen on all versions)
3.90.1 GCP Provider version (although most likely in all)

Affected Resource(s)

google_essential_contacts_contact (https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/essential_contacts_contact)

Terraform Configuration Files

data "google_project" "project" {
}

resource "google_essential_contacts_contact" "contact" {
  parent = data.google_project.project.id
  email = "[email protected]"
  language_tag = "en-GB"
  notification_category_subscriptions = ["ALL"]
}

Expected Behavior

import should show no diff on correct terraform resource definition

Actual Behavior

Import does not include required field parent, thus causing a force replacement during subsequent plan.

google_essential_contacts_contact.contact["[email protected]"] must be replaced
-/+ resource "google_essential_contacts_contact" "contact" {
        email                               = "[email protected]"
      ~ id                                  = "organizations/12345678910/contacts/4" -> (known after apply)
        language_tag                        = "en-US"
      ~ name                                = "organizations/12345678910/contacts/4" -> (known after apply)
      ~ notification_category_subscriptions = [
            "LEGAL",
        ]
      + parent                              = "organizations/12345678910" # forces replacement

      - timeouts {}
    }

Steps to Reproduce

Import an existing essential contact, see that parent attribute does not get important but is required causing a force replacement on subsequent plan/apply

Important Factoids

parent attribute is required and will always cause a force replacement after all imports. This is not ideal.

References

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/essential_contacts_contact

  • #0000

b/300616972

@DanHyland DanHyland added the bug label Feb 17, 2022
@github-actions github-actions bot added forward/review In review; remove label to forward service/essentialcontacts labels Aug 17, 2023
@edwardmedia edwardmedia removed the forward/review In review; remove label to forward label Sep 14, 2023
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Jul 9, 2024
…1124)

[upstream:e0ef75935164a4a48fb3464bb7bfa91f513db760]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Jul 9, 2024
…8681)

[upstream:e0ef75935164a4a48fb3464bb7bfa91f513db760]

Signed-off-by: Modular Magician <[email protected]>
ttewari pushed a commit to ttewari/magic-modules that referenced this issue Oct 15, 2024
@DanHyland
Copy link
Author

Thank you @slevenick !

Copy link

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 Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.