Skip to content

Add ControlPlaneAccess support for Apigee #12825

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

akspi
Copy link
Contributor

@akspi akspi commented Jan 21, 2025

Adds support for ControlPlaneAccess for Terraform

Manual Test

➜  akshaypai@feferson:~$ cat main.tf 
resource "google_apigee_control_plane_access" "apigee_control_plane_access" {
  name       = "<redacted-project-id>"
  synchronizer_identities = [
    "serviceAccount:<redacted-sa-email>",
  ]
  analytics_publisher_identities = [
    "serviceAccount:<redacted-sa-email>",
  ]
}
➜  akshaypai@feferson:~$ TF_CLI_CONFIG_FILE="$HOME/tf-dev-override.tfrc" terraform plan
Terraform will perform the following actions:

  # google_apigee_control_plane_access.apigee_control_plane_access will be updated in-place
  ~ resource "google_apigee_control_plane_access" "apigee_control_plane_access" {
      ~ analytics_publisher_identities = [
          + "serviceAccount:<redacted-sa-email>",
        ]
        id                             = "organizations/<redacted-project-id>/controlPlaneAccess"
        name                           = "<redacted-project-id>"
      ~ synchronizer_identities        = [
          + "serviceAccount:<redacted-sa-email>",
        ]
    }
➜  akshaypai@feferson:~$ TF_LOG=DEBUG TF_LOG_PATH=output.log TF_CLI_CONFIG_FILE="$HOME/tf-dev-override.tfrc" terraform apply
google_apigee_control_plane_access.apigee_control_plane_access: Modifying... [id=organizations/<redacted-project-id>/controlPlaneAccess]
google_apigee_control_plane_access.apigee_control_plane_access: Modifications complete after 1s [id=organizations/<redacted-project-id>/controlPlaneAccess]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google: ---[ REQUEST ]---------------------------------------
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google: GET /v1/organizations/<redacted-project-id>/controlPlaneAccess?alt=json HTTP/1.1
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google: Host: apigee.googleapis.com
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google: User-Agent: Terraform/1.10.4 (+https://www.terraform.io) Terraform-Plugin-SDK/2.33.0 terraform-provider-google/dev6
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google: Content-Type: application/json
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google: Accept-Encoding: gzip
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google
2025-01-21T23:34:20.760Z [DEBUG] provider.terraform-provider-google: -----------------------------------------------------
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: 2025/01/21 23:34:21 [DEBUG] Google API Response Details:
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: ---[ RESPONSE ]--------------------------------------
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: HTTP/2.0 200 OK
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: Content-Type: application/json; charset=UTF-8
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: Date: Tue, 21 Jan 2025 23:34:21 GMT
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: Server: ESF
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: Vary: Origin
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: Vary: X-Origin
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: Vary: Referer
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: X-Content-Type-Options: nosniff
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: X-Frame-Options: SAMEORIGIN
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: X-Xss-Protection: 0
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: {
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google:   "synchronizerIdentities": [
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: "serviceAccount:<redacted-sa-email>"
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google:   ],
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google:   "analyticsPublisherIdentities": [
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: "serviceAccount:<redacted-sa-email>"
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google:   ]
2025-01-21T23:34:21.073Z [DEBUG] provider.terraform-provider-google: }

Release Notes

`google_control_plane_access`

@github-actions github-actions bot requested a review from roaks3 January 21, 2025 23:39
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@roaks3, 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
Copy link
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 ( 5 files changed, 567 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 5 files changed, 567 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 79 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 55
Passed tests: 16
Skipped tests: 36
Affected tests: 3

Click here to see the affected service packages
  • apigee

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeControlPlaneAccess_apigeeControlPlaneAccessBasicTestExample
  • TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample
  • TestAccApigeeEnvironment_apigeeEnvironmentUpdateTest

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccApigeeControlPlaneAccess_apigeeControlPlaneAccessBasicTestExample [Error message] [Debug log]
TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample [Error message] [Debug log]
TestAccApigeeEnvironment_apigeeEnvironmentUpdateTest [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

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

Copy link

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

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

The test results seem to indicate that these fields aren't returned from the API, so they may need ignore_read: true

Copy link

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

Copy link

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

Copy link

github-actions bot commented Mar 7, 2025

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

@modular-magician
Copy link
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, 756 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 756 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 81 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 56
Passed tests: 18
Skipped tests: 36
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
  • TestAccApigeeControlPlaneAccess_apigeeControlPlaneAccessBasicTestExample
  • TestAccApigeeControlPlaneAccess_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeControlPlaneAccess_apigeeControlPlaneAccessBasicTestExample [Debug log]
TestAccApigeeControlPlaneAccess_update [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

Copy link

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

Copy link

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

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just some minor suggestions

id_format: 'organizations/{{name}}/controlPlaneAccess'
base_url: ''
self_link: 'organizations/{{name}}/controlPlaneAccess'
create_url: 'organizations/{{name}}/controlPlaneAccess'
Copy link
Contributor

Choose a reason for hiding this comment

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

create_url and update_url can be removed, they default to self_link

Copy link
Contributor

Choose a reason for hiding this comment

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

Was there an issue with removing these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops this was missed. PTAL

@modular-magician
Copy link
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, 721 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 721 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 81 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 57
Passed tests: 18
Skipped tests: 37
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
  • TestAccApigeeControlPlaneAccess_apigeeControlPlaneAccessBasicTestExample
  • TestAccApigeeControlPlaneAccess_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeControlPlaneAccess_apigeeControlPlaneAccessBasicTestExample [Debug log]
TestAccApigeeControlPlaneAccess_update [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

Copy link

github-actions bot commented Apr 2, 2025

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

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

LGTM, just the stray comment that might have been lost in the last commit

@modular-magician
Copy link
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, 721 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 721 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 81 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 57
Passed tests: 20
Skipped tests: 37
Affected tests: 0

Click here to see the affected service packages
  • apigee

🟢 All tests passed!

View the build log

@roaks3 roaks3 added this pull request to the merge queue Apr 2, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 208b384 Apr 2, 2025
24 checks passed
Dawid212 pushed a commit to Dawid212/magic-modules that referenced this pull request Apr 9, 2025
pandirigoog pushed a commit to pandirigoog/magic-modules that referenced this pull request Apr 14, 2025
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.

3 participants