brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Jun 02. 2020

 20탄-CloudFormation으로 VPC만들기

실습

목차

<1>   cloud formation으로  vpc  생성

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

<3> 모든 샘플 템플릿 



<1>   cloud formation으로  vpc  생성

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

1

Cloud formation  VPC 파일 다운로드





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개씩 추가하기

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




감사합니다.

매거진의 이전글 20탄-CloudFormation으로  S3,ELB
작품 선택
키워드 선택 0 / 3 0
댓글여부
afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari