Skip to content
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

Add ControlPlaneAccess support for Apigee #12825

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akspi
Copy link

@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

`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.

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.

2 participants