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

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

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

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

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

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

검토를 위한 것으로, 다음 스니펫에는 SCP용 구성 패키지를 설정하기 위해 이전에 보여준 것과 동일한 사용자 지정 매니페스트 파일이 들어 있습니다. 이제 리소스에 대한 세부 정보를 포함하도록 이 파일을 추가로 편집할 수 있습니다.

--- 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 #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 #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 정책 파일을 포함할 수 있습니다. 파일 경로가 매니페스트 파일에 제공된 경로와 일치하는지 확인하십시오.

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

  • 정책 파일에는 템플릿 파일에 사용되는 입력 매개 변수가 들어 있습니다.

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

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