Skip to content

Conversation

@kurtismash
Copy link
Member

Although our documented advice is to deploy this to a dedicated backup account, it's likely some will want to deploy this to their management account. Sets the call_as argument on the aws_cloudformation_stack_set and aws_cloudformation_stack_instances to SELF when deployed to the management account.

@kurtismash kurtismash requested a review from Copilot September 26, 2025 19:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables the CloudFormation StackSet deployment module to work when deployed to an AWS management account by dynamically setting the call_as parameter based on the deployment context.

  • Adds organization management account ID to the current context variable
  • Conditionally sets call_as to "SELF" when deployed to management account, otherwise "DELEGATED_ADMIN"

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
modules/service-deployment/variables.tf Adds organization_management_account_id field to current variable structure
modules/service-deployment/cloudformation.tf Updates call_as parameter logic for both StackSet and StackSet instances resources
main.tf Retrieves organization management account ID and passes it to the deployment module

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kurtismash kurtismash force-pushed the fix/management-account-deployment branch from 854609c to cecdc1c Compare September 26, 2025 19:58
@kurtismash kurtismash requested a review from Copilot September 26, 2025 19:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kurtismash kurtismash force-pushed the fix/management-account-deployment branch from cecdc1c to 70e671e Compare September 26, 2025 20:00
Copy link
Contributor

@paulschwarzenberger paulschwarzenberger left a comment

Choose a reason for hiding this comment

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

LGTM

@kurtismash kurtismash merged commit 14c1069 into main Sep 29, 2025
12 checks passed
@kurtismash kurtismash deleted the fix/management-account-deployment branch September 29, 2025 09:31
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.

3 participants