Skip to content

Commit

Permalink
add the stackset back now
Browse files Browse the repository at this point in the history
  • Loading branch information
tmclaugh committed Oct 25, 2024
1 parent 2f71836 commit ec5918d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ jobs:
build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
deploy_aws_account_id: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}

#- name: Sync product templates to S3
# id: sync-templates
# shell: bash
# env:
# AWS_ACCOUNT_ID: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
# STACKSET_S3_BUCKET_NAME_PREFIX: ${{ env.STACKSET_S3_BUCKET_NAME_PREFIX }}
# run: aws s3 sync products/ s3://${STACKSET_S3_BUCKET_NAME_PREFIX}-${AWS_ACCOUNT_ID}-${AWS_REGION}/${GITHUB_SHA}/
- name: Sync product templates to S3
id: sync-templates
shell: bash
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_MANAGEMENT_ACCOUNT_ID }}
STACKSET_S3_BUCKET_NAME_PREFIX: ${{ env.STACKSET_S3_BUCKET_NAME_PREFIX }}
run: aws s3 sync products/ s3://${STACKSET_S3_BUCKET_NAME_PREFIX}-${AWS_ACCOUNT_ID}-${AWS_REGION}/${GITHUB_SHA}/

- name: Deploy via AWS SAM
uses: ServerlessOpsIO/gha-deploy-aws-sam@v1
Expand Down
58 changes: 29 additions & 29 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,32 @@ Resources:
"aws:PrincipalOrgID":
- !Ref AwsOrganizationId

#OrgProductsStackSet:
# Type: AWS::CloudFormation::StackSet
# Properties:
# StackSetName: OrgProducts
# Description: Organization products
# CallAs: DELEGATED_ADMIN
# Parameters:
# - ParameterKey: CfnTemplateBucket
# ParameterValue: !Ref CfnTemplateBucket
# - ParameterKey: GitHubSha
# ParameterValue: !Ref GitHubSha
# StackInstancesGroup:
# - DeploymentTargets:
# OrganizationalUnitIds: !Ref TargetOuIds
# Regions: !Ref TargetRegions
# AutoDeployment:
# Enabled: true
# RetainStacksOnAccountRemoval: false
# ManagedExecution:
# Active: true
# OperationPreferences:
# RegionConcurrencyType: PARALLEL
# FailureToleranceCount: 1
# MaxConcurrentCount: 5
# PermissionModel: SERVICE_MANAGED
# Capabilities:
# - CAPABILITY_NAMED_IAM
# - CAPABILITY_AUTO_EXPAND
# TemplateBody: *template_body
OrgProductsStackSet:
Type: AWS::CloudFormation::StackSet
Properties:
StackSetName: OrgProducts
Description: Organization products
CallAs: DELEGATED_ADMIN
Parameters:
- ParameterKey: CfnTemplateBucket
ParameterValue: !Ref CfnTemplateBucket
- ParameterKey: GitHubSha
ParameterValue: !Ref GitHubSha
StackInstancesGroup:
- DeploymentTargets:
OrganizationalUnitIds: !Ref TargetOuIds
Regions: !Ref TargetRegions
AutoDeployment:
Enabled: true
RetainStacksOnAccountRemoval: false
ManagedExecution:
Active: true
OperationPreferences:
RegionConcurrencyType: PARALLEL
FailureToleranceCount: 1
MaxConcurrentCount: 5
PermissionModel: SERVICE_MANAGED
Capabilities:
- CAPABILITY_NAMED_IAM
- CAPABILITY_AUTO_EXPAND
TemplateBody: *template_body

0 comments on commit ec5918d

Please sign in to comment.