AWS CloudFormation StackSets에 대한 구성 패키지 설정 - AWS Control Tower

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

AWS CloudFormation StackSets에 대한 구성 패키지 설정

이 섹션에서는 AWS CloudFormation StackSets에 대한 구성 패키지를 설정하는 방법을 설명합니다. 이 프로세스의 두 가지 주요 부분은 (1) 매니페스트 파일 준비와 (2) 폴더 구조 업데이트입니다.

1단계: 기존 매니페스트 파일 편집

이전에 편집한 매니페스트 파일에 new AWS CloudFormation StackSets 정보를 추가합니다.

검토용으로 다음 코드 조각에는 SCPs 또는 RCPs. 이제 리소스에 대한 세부 정보를 포함하도록 이 파일을 추가로 편집할 수 있습니다.

--- region: us-east-1 version: 2021-03-15 resources: - name: block-s3-public-access description: To S3 buckets to have public access resource_file: policies/block-s3-public.json deploy_method: scp | rcp #Apply to the following OU(s) deployment_targets: organizational_units: #array of strings - OUName1 - OUName2

다음 코드 조각은 resources 세부 정보가 포함된 편집된 샘플 매니페스트 파일을 보여줍니다. resources의 순서는 resources 종속성을 생성하기 위한 실행 순서를 결정합니다. 비즈니스 요구 사항에 따라 다음 예제 매니페스트 파일을 편집할 수 있습니다.

--- region: your-home-region version: 2021-03-15 …truncated… resources: - name: stackset-1 resource_file: templates/create-ssm-parameter-keys-1.template parameters: - parameter_key: parameter-1 parameter_value: value-1 deploy_method: stack_set deployment_targets: accounts: # array of strings, [0-9]{12} - account number or account name - 123456789123 organizational_units: #array of strings, ou ids, ou-xxxx - OuName1 - OUName2 export_outputs: - name: /org/member/test-ssm/app-id value: $[output_ApplicationId] regions: - region-name - name: stackset-2 resource_file: s3://bucket-name/key-name parameters: - parameter_key: parameter-1 parameter_value: value-1 deploy_method: stack_set deployment_targets: accounts: # array of strings, [0-9]{12} - account number or account name - 123456789123 organizational_units: #array of strings - OuName1 - OUName2 regions: - region-name

다음 예제는 매니페스트 파일에 둘 이상의 AWS CloudFormation 리소스를 추가할 수 있음을 보여줍니다.

--- region: us-east-1 version: 2021-03-15 resources: - name: block-s3-public-access description: To S3 buckets to have public access resource_file: policies/block-s3-public.json deploy_method: scp | rcp #Apply to the following OU(s) deployment_targets: organizational_units: #array of strings - Custom - Sandbox - name: transit-network resource_file: templates/transit-gateway.template parameter_file: parameters/transit-gateway.json deploy_method: stack_set deployment_targets: accounts: # array of strings, [0-9]{12} - Prod - 123456789123 #Network organizational_units: #array of strings - Custom export_outputs: - name: /org/network/transit-gateway-id value: $[output_TransitGatewayID] regions: - us-east-1

2단계: 폴더 구조 업데이트

폴더 구조를 업데이트할 때 모든 지원 AWS CloudFormation 템플릿 파일과 매니페스트 파일에 있는 SCP 또는 RCP 정책 파일을 포함할 수 있습니다. 파일 경로가 매니페스트 파일에 제공된 것과 일치하는지 확인합니다.

  • 템플릿 파일에는 OUs 및 계정에 배포할 AWS 리소스가 포함되어 있습니다.

  • 정책 파일에는 템플릿 파일에 사용되는 입력 파라미터가 포함됩니다.

다음 예제는 1단계에서 생성된 샘플 매니페스트 파일의 폴더 구조를 보여줍니다.

- manifest.yaml - policies/ - block-s3-public.json - templates/ - transit-gateway.template