Cloudformation
ํ
ํ๋ฆฟ ๊ธฐ๋ณธ ์ฌํญ ์์๋ณด๊ธฐ
AWS CloudFormation - ์์ํ๊ธฐ - ํ ํ๋ฆฟ ๊ธฐ๋ณธ ์ฌํญ ์์๋ณด๊ธฐ
ํ ํ๋ฆฟ
์คํ์ ๊ตฌ์ฑํ๋ AWS ๋ฆฌ์์ค๋ฅผ ์ ์ธํ ๊ฒ
๋ฆฌ์์ค
๋ฆฌ์์ค ์ ํ:
AWS::ProductIdentifier::ResourceType(AWS::S3::Bucket)๋ฆฌ์์ค ์ ํ์ ๋ฐ๋ผ ํ์ ์์ฑ, ์ ํ ์์ฑ์ด ๋๋จ๋ ํผ๋ฐ์ค์ required ํญ๋ชฉ ํ์ธ
ํ ํ๋ฆฟ ๋ฐ CloudFormation์ ๊ฐ์ฅ ํฐ ์ฅ์
ํจ๊ป ์๋ํ๋ ๋ฆฌ์์ค ์ธํธ๋ฅผ ๋ง๋ค์ด์ ์ ํ๋ฆฌ์ผ์ด์ ์ด๋ ์๋ฃจ์ ์ ์์ฑํ ์ ์์
Refํจ์๋ ๋ฆฌ์์ค์ ์๋ณ ์์ฑ์ ์ฐธ์กฐํ ์ ์์
Resources:
Ec2Instance:
Type: 'AWS::EC2::Instance'
Properties:
SecurityGroups:
- !Ref InstanceSecurityGroup
KeyName: mykey
ImageId: ''
InstanceSecurityGroup:
Type: 'AWS::EC2::SecurityGroup'
Properties:
GroupDescription: Enable SSH access via port 22
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 0.0.0.0/0๋ฆฌ์์ค ์์ฑ์ ์ํ ์ฌ์ ์กฐ๊ฑด์ด ์๊ตฌ๋ ์ ์์
key pair ๋ฑ
์ผ๋ถ ๋ฆฌ์์ค์ ๊ฒฝ์ฐ ํ ํ๋ฆฟ์์ ์ฌ์ฉํ ์ ์๋ ๊ฐ์ด ์ง์ ๋๋ ์ถ๊ฐ ์์ฑ ์กด์ฌ
์ด ๊ฒฝ์ฐ
Fn::GetAttํจ์๋ฅผ ์ฌ์ฉ
ํ๋ผ๋ฏธํฐ
ํ๋ผ๋ฏธํฐ๋ ํ ํ๋ฆฟ์ Parameters ๊ฐ์ฒด์์ ์ ์ธ
ํด๋น ๊ฐ
๊ตฌ์ ์กฐ๊ฑด์ ์ ์ํ๋ ์์ฑ ๋ชฉ๋ก
NoEcho์์ฑ์ ์ฌ์ฉํ๋ฉด ๋ง์คํน ๋จ์์ธ
Metadataํ ํ๋ฆฟ ์น์ Outputsํ ํ๋ฆฟ ์น์
CF ์ธ๋ถ์์ ์ ์ฅ ๋ฐ ๊ด๋ฆฌ๋๋ ๋ฏผ๊ฐํ ์ ๋ณด๋ฅผ ์ฐธ์กฐํ๋ ค๋ฉด ๋์ ํ๋ผ๋ฏธํฐ ์ฌ์ฉ ์ฐธ๊ณ
ํ๋ผ๋ฏธํฐ๋ ์กฐ๊ฑด๋ถ ์ ๋ ฅ์ ๋ฐ์ ์ ์์
Mappings ๊ฐ์ฒด
AWS::Region๊ฐ์ ํ๋ผ๋ฏธํฐ
Last updated