Add Observability Organization Settings Resource#16543
Add Observability Organization Settings Resource#16543leowonderful wants to merge 19 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing doc report (experimental)The following data sources are missing documents:
Errors
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing doc report (experimental)The following data sources are missing documents:
Errors
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🟢 All tests passed! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing doc report (experimental)The following data sources are missing documents:
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🟢 All tests passed! View the build log |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🟢 All tests passed! View the build log |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🟢 All tests passed! View the build log |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🟢 All tests passed! View the build log |
mmv1/templates/terraform/pre_update/observability_organization_settings.go.tmpl
Outdated
Show resolved
Hide resolved
| provider = "google-beta" | ||
| organization = "%{org_id}" | ||
| location = "%{location}" | ||
| kms_key_name = "" |
There was a problem hiding this comment.
"" is an odd thing to specify, should this be omitted instead?
There was a problem hiding this comment.
Is it? My intent was to allow users to also unset fields as needed, we do support this on the API level by accepting empty strings for the kms_key_name and default_storage_location fields to effectively unset them.
If this is highly unusual then I could consider doing away with allowing this.
There was a problem hiding this comment.
In general it's good to be able to do, but it's a bit odd in the data source test to be specifying this
There was a problem hiding this comment.
OK gotcha. I need the resource because I'm trying to keep the Check step tidy by using CheckDataSourceStateMatchesResourceState instead of hardcoding attributes to check, this was just a simple way to initialize the resource in a valid way.
The other way I can initialize the resource validly is by setting default_storage_location, which I've done now. Hopefully this makes more sense?
| } | ||
|
|
||
| # Add a delay to allow the service account to propagate | ||
| resource "time_sleep" "wait_for_sa_propagation" { |
There was a problem hiding this comment.
Calling the read on the org settings datasource causes the SA to be created? That seems like a very weird pattern
There was a problem hiding this comment.
I added this sleep because I observed lazy provisioning, i.e. if we immediately fetch the SA right after reading the datasource, it might not actually be fully propagated yet
This would cause google_kms_crypto_key_iam_member to fail, claiming the principal didn't exist
So doing the read seems to trigger backend creation of the service account, then we have to wait a bit before it can be referenced in IAM
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 7 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Description:
This PR introduces the
google_observability_organization_settingsresource to Magic Modules for the google-beta provider, part of the broader Observability Settings surface for customers to manage observability compliance configurations across the project, folder and organization structures.Fixes hashicorp/terraform-provider-google#26242
Release Note Template for Downstream PRs (will be copied)