22A. CloudFormation 템플릿 기본 구조
Less than 1 minute
22A. CloudFormation 템플릿 기본 구조 관련
목차
아마존 웹 서비스를 다루는 기술
22장 - 1. CloudFormation 템플릿 기본 구조
아마존 웹 서비스를 다루는 기술
앞서 설명한대로 CloudFormation 템플릿은 JSON 형태로 작성합니다. 다음은 CloudFormation 템플릿의 가장 기본적인 형태입니다.
Description
: 템플릿의 설명입니다.Parameters
: 템플릿으로 스택을 생성할 때 사용자가 입력할 파라미터 목록입니다. 숫자와 문자열 형식을 사용할 수 있습니다.Resources
: AWS 리소스 종류와 옵션, AWS 리소스간의 관계를 정의합니다.Outputs
: 스택을 생성한 뒤 출력할 값입니다.AWSTemplateFormatVersion
: 현재 템플릿 구조의 버전입니다. 2014년 4월 기준으로 2010-09-09가 최신 버전입니다. 이 버전이 맞지 않으면 템플릿으로 스택을 만들 수 없으므로 그대로 사용합니다.
CloudFormation 기본 템플릿
{
"Description" : "A text description for the template usage",
"Parameters": {
// A set of inputs used to customize the template per deployment
},
"Resources" : {
// The set of AWS resources and relationships between them
},
"Outputs" : {
// A set of values to be made visible to the stack creator
},
"AWSTemplateFormatVersion" : "2010-09-09"
}