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

Support full resource names in autokey_config.folder #19364

Conversation

modular-magician
Copy link
Collaborator

Add pre_* custom code to drop the 'folders/' prefix from API requests, as well as a diff suppressor for the same reason. The ID also needs to be adjusted on post_create.

Side change: add a time delay after setting the autokey_config in the basic example, to try to address test flakiness (#18935)

NOTE: looking at the debug logs, I see the following error:

2024-08-09T16:37:55.977Z [WARN]  Provider "provider[\"registry.terraform.io/hashicorp/google-beta\"]" produced an unexpected new value for google_kms_autokey_config.example-autokeyconfig, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .folder: was cty.StringVal("folders/966201355962"), but now cty.StringVal("966201355962")

looking for guidance on whether my current approach is fine, or if this should be addressed in a different way.

Thank you!

Release Note Template for Downstream PRs (will be copied)

kms: updated the `google_kms_autokey_config` resource's `folder` field to accept values that are either full resource names (`folders/{folder_id}`) or just the folder id (`{folder_id}` only)

Derived from GoogleCloudPlatform/magic-modules#11413

Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>

[upstream:ba356a39c6c948916aab77da2dc0cab22b95d70a]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit b42543e into hashicorp:main Sep 4, 2024
2 checks passed
Copy link

github-actions bot commented Oct 8, 2024

I'm going to lock this pull request 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 related to this change, 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 Oct 8, 2024
@modular-magician modular-magician deleted the downstream-pr-ba356a39c6c948916aab77da2dc0cab22b95d70a branch November 17, 2024 00:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant