Skip to content

Support full resource names in autokey_config.folder #2747

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

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 <[email protected]>

[upstream:ba356a39c6c948916aab77da2dc0cab22b95d70a]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner September 4, 2024 15:49
@modular-magician modular-magician requested review from shuyama1 and removed request for a team September 4, 2024 15:49
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@modular-magician modular-magician merged commit 818436a into GoogleCloudPlatform:main Sep 4, 2024
4 of 6 checks passed
@modular-magician modular-magician deleted the downstream-pr-ba356a39c6c948916aab77da2dc0cab22b95d70a branch November 18, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant