Skip to content

apigee: add addons_config to google_apigee_organization#16952

Closed
xuchenma wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
xuchenma:349125349
Closed

apigee: add addons_config to google_apigee_organization#16952
xuchenma wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
xuchenma:349125349

Conversation

@xuchenma

@xuchenma xuchenma commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the addons_config nested block to the google_apigee_organization resource, exposing per-add-on toggles directly on the org resource.

This allows users to configure add-ons at organization creation time. Previously a separate google_apigee_addons_config resource was needed after org creation.

Add-ons supported

  • advanced_api_ops_config
  • integration_config
  • monetization_config
  • api_security_config (with expires_at output)
  • connectors_platform_config (with expires_at output)

Fixes

Fixes: hashicorp/terraform-provider-google#18486

Test Evidence

Existing acceptance test passes unchanged (import verify now ignores addons_config since the API may return default values not present in the config):

--- PASS: TestAccApigeeOrganization_apigeeOrganizationCloudBasicTestExample (1234.98s)
PASS
ok  github.com/hashicorp/terraform-provider-google/google/services/apigee  1235.798s
apigee: added `addons_config` block to `google_apigee_organization` resource to allow configuring add-ons at org creation time

Adds the addonsConfig nested object to the Organization resource YAML,
exposing per-add-on toggles (advanced_api_ops_config, integration_config,
monetization_config, api_security_config, connectors_platform_config)
directly on the google_apigee_organization resource.

This allows users to configure add-ons at org creation time, which was
not previously possible. Previously a separate google_apigee_addons_config
resource was needed after org creation.

Fixes: hashicorp/terraform-provider-google#18486
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Apr 4, 2026
@github-actions github-actions Bot requested a review from shuyama1 April 4, 2026 21:09
@github-actions

github-actions Bot commented Apr 4, 2026

Copy link
Copy Markdown

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

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

Add a custom_check_destroy template for google_apigee_organization that
polls the API until the org returns 404 or enters DELETING state, instead
of immediately declaring it destroyed.

This fixes flaky test failures where CheckDestroy ran before the async
delete completed.

Background: b/242358013 blocks using LRO polling for org deletion (the
LRO endpoint returns 403 once the org is gone). As a workaround, the
custom_check_destroy polls GET /organizations/{name} directly.

Fixes: hashicorp/terraform-provider-google#8758
@modular-magician modular-magician added service/apigee and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Apr 9, 2026
@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 ( 4 files changed, 538 insertions(+), 12 deletions(-))
google-beta provider: Diff ( 4 files changed, 540 insertions(+), 14 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 208 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_apigee_organization (105 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_apigee_organization" "primary" {
  addons_config {
    advanced_api_ops_config {
      enabled = # value needed
    }
    api_security_config {
      enabled = # value needed
    }
    connectors_platform_config {
      enabled = # value needed
    }
    integration_config {
      enabled = # value needed
    }
    monetization_config {
      enabled = # value needed
    }
  }
}

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 73
Passed tests: 33
Skipped tests: 38
Affected tests: 2

Click here to see the affected service packages
  • apigee

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample
  • TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample [Debug log]
TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

@shuyama1 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions

Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @shuyama1 This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

billing_account: 'BILLING_ACCT'
ignore_read_extra:
- 'properties'
- 'addons_config'

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.

why does this field need to ignore read on during import?

- name: 'value'
type: String
description: Value of the property.
- name: 'addonsConfig'

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.

@github-actions

Copy link
Copy Markdown

@xuchenma, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days.

Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

This notification can be disabled with the disable-automatic-closure label.

@github-actions

Copy link
Copy Markdown

@xuchenma, this PR is waiting for action from you. If no action is taken, this PR will be closed in 14 days.

Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

This notification can be disabled with the disable-automatic-closure label.

@github-actions

Copy link
Copy Markdown

@xuchenma, this PR is waiting for action from you. If no action is taken, this PR will be closed in 2 weekdays.

Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

This notification can be disabled with the disable-automatic-closure label.

@github-actions

Copy link
Copy Markdown

@xuchenma, this PR is being closed due to inactivity.

@xuchenma

xuchenma commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Auto-closed for inactivity; GitHub won't allow reopening. Continued in #17855 (rebased). Addressed @shuyama1's review: added explicit addons_config coverage in the disable_vpc_peering org test (create/apply/import pass), and explained the ignore_read_extra — the org GET returns all add-ons with defaults for unset ones, so it's needed to avoid import diffs on API-defaulted entries (the configured fields round-trip cleanly). Also dropped the redundant test_check_destroy (handled on main via #17467). Closing in favor of #17855.

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.

google_apigee_organization resource should have the addons_config field

3 participants