feat: add org-level IAM setup and use ORG_ID in GCP cloud connectors#3936
Open
feat: add org-level IAM setup and use ORG_ID in GCP cloud connectors#3936
Conversation
|
This pull request does not have a backport label. Could you fix it @amirbenun? 🙏
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GCP Infrastructure Manager “cloud connectors” deployment to support optional organization-scope deployments by introducing ORG_ID (renaming from ORGANIZATION_ID) and granting an org-level IAM role when that variable is provided.
Changes:
- Add an optional
ORG_IDparameter tosetup.shand, when set, grantroles/iam.securityAdminat the organization level. - Update
deploy.shto passORG_IDthrough and use it to setscope=organizationsandparent_id=<ORG_ID>. - Update README documentation to reflect the
ORG_IDrename and documentroles/storage.adminfor Terraform state.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| deploy/infrastructure-manager/gcp-cloud-connectors/setup.sh | Adds optional org-level IAM binding (securityAdmin) when ORG_ID is provided. |
| deploy/infrastructure-manager/gcp-cloud-connectors/deploy.sh | Switches org-scope env var usage to ORG_ID and passes it into setup + TF inputs. |
| deploy/infrastructure-manager/gcp-cloud-connectors/README.md | Updates deployment instructions and required permissions to match ORG_ID and new IAM role guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds organization-level IAM setup to the GCP cloud connectors deployment and renames the organization scope environment variable from ORGANIZATION_ID to ORG_ID for consistency. When ORG_ID is set, setup.sh now grants the deployment service account the roles/iam.securityAdmin role at the organization level (instead of roles/resourcemanager.organizationAdmin), and the README is updated to document the storage.admin role for Terraform state and the new variable name. This enables customers to deploy Elastic Cloud Connectors with organization-level monitoring using the recommended, least-privilege securityAdmin role.