Skip to content

Add Observability Project Settings Resource#16532

Merged
melinath merged 32 commits into
GoogleCloudPlatform:mainfrom
leowonderful:observability-project-settings-resource
Mar 3, 2026
Merged

Add Observability Project Settings Resource#16532
melinath merged 32 commits into
GoogleCloudPlatform:mainfrom
leowonderful:observability-project-settings-resource

Conversation

@leowonderful

@leowonderful leowonderful commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Description:

This PR introduces the google_observability_project_settings resource 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#26239

Release Note Template for Downstream PRs (will be copied)

`google_observability_project_settings` (beta)
`google_observability_project_settings` (beta)

@github-actions github-actions Bot requested a review from melinath February 25, 2026 20:10
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@melinath, 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.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@leowonderful

This comment was marked as resolved.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 301 insertions(+), 94 deletions(-))
google-beta provider: Diff ( 10 files changed, 1376 insertions(+), 12 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 135 insertions(+))

@leowonderful

leowonderful commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

After merging another one of my resources, the compilation for this PR fails:

# github.com/hashicorp/terraform-provider-google-beta/google-beta/services/observability
Error: ../tpgb/google-beta/services/observability/resource_observability_project_settings.go:236:3: too many arguments in call to ObservabilityOperationWaitTime
	have (*"github.com/hashicorp/terraform-provider-google-beta/google-beta/transport".Config, map[string]interface{}, string, string, string, time.Duration)
	want (*"github.com/hashicorp/terraform-provider-google-beta/google-beta/transport".Config, map[string]interface{}, string, string, time.Duration)
Error: ../tpgb/google-beta/services/observability/resource_observability_project_settings.go:385:4: too many arguments in call to ObservabilityOperationWaitTime
	have (*"github.com/hashicorp/terraform-provider-google-beta/google-beta/transport".Config, map[string]interface{}, string, string, string, time.Duration)
	want (*"github.com/hashicorp/terraform-provider-google-beta/google-beta/transport".Config, map[string]interface{}, string, string, time.Duration)

Seems like the autogen can't resolve this and I don't think I can just inject code here, so I turned ObservabilityOperationWaitTime inside observability_operation.go into a variadic function. WDYT, is this OK given the circumstance? It does pass, but I'm not sure if this is the most "correct" way to go about it.

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 12
Passed tests: 12
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • observability

🟢 All tests passed!

View the build log

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, you've run into a weird edge case of the generator! This is easy to work around. In OrganizationSettings.yaml:

  • set async.include_project to true
  • set async.actions to ['create', 'update']. (This is necessary because there's a bug in the template in the case where exclude_delete: true and also async.include_project: true.)

Once you do that you shouldn't need the handwritten operation file.

@melinath

melinath commented Mar 3, 2026

Copy link
Copy Markdown
Member

I've created #16586 to fix the template bug - you'd still need to async.include_project to true but wouldn't need to set async.actions.

@github-actions github-actions Bot requested a review from melinath March 3, 2026 15:51
@modular-magician

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 6 files changed, 303 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 11 files changed, 1362 insertions(+), 9 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 135 insertions(+))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 12
Passed tests: 12
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • observability

🟢 All tests passed!

View the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Terraform support for Observability Project Settings resource

3 participants