brunch

20탄-CloudFormation으로 VPC만들기

실습

by Master Seo

목차


<1> cloud formation으로 vpc 생성

<2> DeletionPolicy: Retain 을 주어 삭제 되지 않도록 하자.

<3> 모든 샘플 템플릿




<1> cloud formation으로 vpc 생성


cloud formation 으로 VPC 1 , public 3 , private 3, DB 2개의 서브넷을 만들어보자

10 p1 p1.png

1

Cloud formation VPC 파일 다운로드





2

AWS Cloudformation 에서 사용해보기


Services > Cloudformation > create stack > with new resources > upload a template file >

choose file > Next >

pub1pri1

> Create stack



3

sample


https://aws-quickstart.github.io/templates-examples.html


https://docs.aws.amazon.com/ko_kr/AWSCloudFormation/latest/UserGuide/cfn-sample-templates.html


https://docs.aws.amazon.com/ko_kr/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html



4

참고 사이트

https://brunch.co.kr/@topasvga/748



5

생성 완료 확인은 ?

vpc

igw

attatch igw

subnet

public routing table

public route




참고

subnet 2개 추가 하기 - public2 와 private2 1개씩 추가하기

20 p2 p2.png

cloud formation > update > 현재 텝플릿 교체 > 템플릿 파일 업로드




참고


cloudformation desinger로 확인

Templatge > view desinger






<2> DeletionPolicy: Retain 을 주어 삭제 되지 않도록 하자.


Retain 옵션이 없으면 Cloudformation의 스택을 지우면 생성한 VPC가 모두 지워진다.


https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html




<3> 모든 샘플 템플릿


https://docs.aws.amazon.com/ko_kr/AWSCloudFormation/latest/UserGuide/cfn-sample-templates.html



다음

https://brunch.co.kr/@topasvga/1170


감사합니다.

keyword
매거진의 이전글20탄-CloudFormation으로  S3,ELB