CP-42872: trust the dedicated CloudZero connections account on provisioned roles#109
Conversation
…d roles Add the ConnectorsAccountId / connectors_account_id trust principal (483772923246) to the account-onboarding CloudFormation templates and the Terraform modules, matching the existing reactor principal one-for-one, so the dedicated CloudZero connections account can assume the cross-account role. The dev parent template uses the dev connections account (618300337335). CP-42872 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
silvexis
left a comment
There was a problem hiding this comment.
Audit and cloud trail policies are depreciated and not used, no changes should be made to these policies
…ted stacks, align release notes - Remove ConnectorsAccountId param pass to the deprecated cloudtrail_owner and audit nested stacks in connected_account.yaml / connected_account_dev.yaml (those templates were reverted and don't declare the param, which would break every CloudFormation deploy) - Align release notes account IDs with the code (prod 559846027439, dev 483772923246) and drop audit.yaml / cloudtrail_owner.yaml from the modified-files list Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@greptile |
Greptile SummaryThis PR re-introduces the dedicated CloudZero connections account (
Confidence Score: 5/5Safe to merge — the change is a narrow, well-scoped trust-principal addition that is backward compatible and does not alter any permission boundaries. The new principal is added inside the existing trust-policy statement, so the sts:ExternalId condition guards it exactly as it guards the reactor principal. Defaults are set everywhere so re-deploying with no parameter changes produces no user-facing impact. The dev template correctly uses the dev connections account ID, the deprecated templates are explicitly left alone, and the Terraform and CloudFormation changes are consistent with each other. No logic paths were modified — only the list of trusted principals was extended. No files require special attention. Important Files Changed
Reviews (6): Last reviewed commit: "docs: drop "override only if directed" g..." | Re-trigger Greptile |
| variable "connectors_account_id" { | ||
| type = string | ||
| default = "483772923246" | ||
| description = "Additional CloudZero AWS account ID that will assume the cross-account role. Override only if directed by CloudZero support." |
There was a problem hiding this comment.
Can we just remove this detail? We would never ask a customer to override this and the other new account
There was a problem hiding this comment.
should I remove this for all btw? happy to do it! But want to be consistent!
…ields We would never direct a customer to override the dedicated connections account, so remove that sentence from the ConnectorsAccountId / connectors_account_id descriptions. The existing cloudzero_account_id variable is left unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Adds the
ConnectorsAccountId/connectors_account_idtrust principal (the dedicated CloudZero connections account) as a second principal — alongside the existing reactor principal — on the cross-account roles created by the account-onboarding templates. Mirrors the existing reactor principal one-for-one across CloudFormation and Terraform.Prod uses
559846027439; the dev parent template (connected_account_dev.yaml) uses the dev connections account (483772923246).Why
The dedicated connections account (where the AWS connector runs) needs to assume the customer cross-account role to read billing/CUR data. This wires that trust into the onboarding templates so new customer onboards pick it up automatically.
Scope / files
master_payer.yaml,resource_owner.yamlconnected_account.yaml,connected_account_dev.yamlcloudzero-aws(variable + role policy),cloudzero-payer,cloudzero-resourcedocs/releases/1.0.100.mdThe deprecated
audit.yamlandcloudtrail_owner.yamlaccount-type templates are intentionally left unchanged.Notes
ConnectorsAccountId— that StackSet rollout (and thelatest/Discovery-Lambda refresh +BillingReportFormatconsideration from CP-42796) is a separate effort, not this PR.🤖 Generated with Claude Code