Skip to content

Add ControlPlaneAccess support for Apigee #9709

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

Conversation

modular-magician
Copy link
Collaborator

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`

Derived from GoogleCloudPlatform/magic-modules#12825

Co-authored-by: Akshay Pai <[email protected]>

[upstream:208b384af6f750bfbf5435eb3749f48aa1de6b0c]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner April 2, 2025 19:52
@modular-magician modular-magician merged commit f245c50 into hashicorp:main Apr 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant