분류 전체보기 썸네일형 리스트형 [Terraform] 테라폼 리소스 그래프 생성 테라폼 리소스 그래프 생성 terraform graph terraform graph | dot -Tsvg > graph.svg or terraform graph | dot -Tpng > graph.png 브라우저에서 graph.svg 열기(브라우저로 graph.svg 파일 드래그 앤 드롭) graphviz 설치 https://sangchul.kr/910 [URL] GraphViz 설치(for MAC) GraphViz 설치(for MAC) $ brew install graphviz graphviz 사용 방법 > terraform graph | dot -Tsvg > graph.svg > open . graph.svg 파일을 브라우저에서 열기(드래그 앤 드롭) sangchul.kr 더보기 [url] macOS에서 GraphViz 설치 macOS에서 GraphViz 설치 macOS에서는 Homebrew를 사용하여 GraphViz를 설치하는 것이 편리합니다. Homebrew가 설치되어 있지 않은 경우 먼저 설치하고, 그런 다음 다음 명령어를 사용하여 GraphViz를 설치합니다. GraphViz 설치 brew install graphviz graphviz 사용 방법 terraform graph | dot -Tsvg > graph.svg open . graph.svg 파일을 브라우저에서 열기(드래그 앤 드롭) 설치가 완료되면 GraphViz를 사용할 수 있습니다. 다양한 프로그래밍 언어에서 GraphViz 라이브러리를 사용하여 그래프를 생성하고 시각화할 수 있으며, dot, neato, fdp, sfdp, twopi, circo 등의 명령.. 더보기 [Terraform] 테라폼 라우팅 테이블 생성 라우팅 테이블 생성 (선행 작업) - VPC 생성 rtb.tf 파일 생성 $ vim rtb.tf ###라우팅 테이블 생성 #Public default route table resource "aws_default_route_table" "sangchul_vpc11-rt" { default_route_table_id = aws_vpc.sangchul_vpc11.default_route_table_id route { cidr_block = "0.0.0.0/0" gateway_id = aws_internet_gateway.sangchul_vpc11-igw.id } tags = { Name = "sangchul_vpc11-rt" Env = "stg" CreateUser = "terraform@email.com" .. 더보기 [Terraform] 테라폼 인터넷 게이트웨이 생성 인터넷 게이트웨이 생성 (선행 작업) - VPC 생성 igw.tf 파일 생성 $ vim igw.tf ###인터넷 게이트웨이 생성 resource "aws_internet_gateway" "sangchul_vpc11-igw" { vpc_id = aws_vpc.sangchul_vpc11.id tags = { Name = "sangchul_vpc11-igw" Env = "stg" CreateUser = "terraform@email.com" Owner = "iac" Role = "internet_gateway" Service = "network" } } terraform apply 명령 실행 $ terraform apply aws_vpc.sangchul_vpc11: Refreshing state... [id=.. 더보기 [Terraform] 테라폼 서브넷 생성 서브넷 생성 (선행 작업) - VPC 생성 subnets.tf 파일 생성 $ vim subnet.tf ###Subnet 생성 # Public(WEB) resource "aws_subnet" "sangchul_vpc11-sb3" { vpc_id = aws_vpc.sangchul_vpc11.id cidr_block = "10.11.3.0/24" map_public_ip_on_launch = true availability_zone = "us-east-1a" tags = { Name = "sangchul_vpc11-sb3" Env = "stg" CreateUser = "terraform@email.com" Owner = "iac" Role = "subnet" Service = "network" } } reso.. 더보기 [Terraform] 테라폼 VPC 생성 VPC 생성 vpc.tf 파일 생성 $ vim vpc.tf ###VPC 생성 resource "aws_vpc" "sangchul_vpc11" { cidr_block = "10.11.0.0/16" enable_dns_support = true enable_dns_hostnames = true instance_tenancy = "default" tags = { Name = "sangchul_vpc11" Env = "stg" CreateUser = "terraform@email.com" Owner = "iac" Role = "vpc" Service = "network" } } terraform apply 명령 실행 $ terraform apply An execution plan has been generate.. 더보기 [Terraform] 테라폼 provider 생성 terraform provider 생성 ~/.aws/credentials 확인 $ vim ~/.aws/credentials [terraformA] aws_access_key_id = AWSACCESSKEYID aws_secret_access_key = AWSSECRETACCESSKEY ~/.aws/config 확인 $ vim ~/.aws/config [terraformA] region = us-east-1 디렉토리 생성 $ mkdir -p terraformA/aws/serviceA/us-east-1 aws provider provider.tf 파일 생성 $ vim provider.tf terraform { required_providers { aws = { source = "hashicorp/aws" v.. 더보기 리눅스 history 명령어 history 명령어 Bash History 설정 cat /etc/profile ## history export HISTSIZE=10000 export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S ' #export HISTCONTROL=erasedups EOF Print ‘n’ Lines history 2 $ history 2 919 2021-01-28 21:20:43 echo "history command" 920 2021-01-28 21:20:59 history 2 Repeat Specific Command !번호 $ !917 echo "history command" history command Repeat Most Recent Command !! $ !! echo "history c.. 더보기 이전 1 ··· 167 168 169 170 171 172 173 ··· 279 다음