본문 바로가기

728x90

전체 글

[url] terraform modules terraform modules providers - https://registry.terraform.io/browse/providers modules - https://registry.terraform.io/browse/modules Terraform Cloud https://app.terraform.io 더보기
[iac] Amazon S3로 Terraform 백엔드 구성하기 - terraform code Amazon S3로 Terraform 백엔드 구성하기 - terraform code s3 버킷 생성 - 버킷 이름 : okahpt16-terraform-s3-bucket dynamoDB 테이블 생성 - 테이블 이름 : okahpt16_terraform_lock - 파티션 키 : LockID Terraform Code $ tree . ├── main.tf └── provider.tf vim provider.tf terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.27.0" } } } provider "aws" { # Configuration options profile = "terraform" region = ".. 더보기
[url] 랜덤 문자열 생성기 랜덤 문자열 생성기 https://randstrgen.lazyig.com/ 랜덤 문자열 생성기 소개 선택한 조건으로 랜덤한 문자열을 생성합니다. 귀찮은 게임닉네임 짓기 매크로풍의 닉네임 어떤가요? randstrgen.lazyig.com bash 랜덤 문자열 생성 echo $RANDOM | base64 | head -c 20; echo $ echo $RANDOM | base64 | head -c 20; echo MTYyNjYK 리눅스 쉘에서 랜덤 문자열을 생성하는 방법 openssl 명령어를 사용하여 랜덤 문자열을 생성하는 방법과 /dev/urandom을 사용하는 방법 두 가지를 소개하겠습니다. 1. openssl을 사용하여 랜덤 문자열 생성 openssl rand -base64 32 위 명령어를 실행하면.. 더보기
[iac] Amazon S3로 Terraform 백엔드 구성하기 Amazon S3로 Terraform 백엔드 구성하기 전체 조건(pre requisites) - terraform - aws 계정 - awscli - s3 s3 버킷 생성 버킷 이름 : okahpt16-terraform-s3-bucket s3 버킷 s3 버킷 정책 수정 aws --profile terraform sts get-caller-identity $ aws --profile terraform sts get-caller-identity { "UserId": "ZIDAQHSHTHBEMHSPLP23T", "Account": "018256284755", "Arn": "arn:aws:iam::018256284755:user/okahpt16-terraform" } { "Version": "2012-10-17.. 더보기
macOS에 Packer를 설치하는 방법 macOS에 Packer를 설치하는 방법 Packer는 다양한 클라우드 플랫폼 및 가상화 기술을 사용하여 이미지를 생성하는 도구입니다. 공식 Packer 다운로드 페이지에서 바이너리 다운로드 https://www.packer.io/downloads Homebrew를 통한 설치 Homebrew를 사용하여 Packer를 설치하는 것이 가장 간편하며 권장되는 방법입니다. packer 설치 brew tap hashicorp/tap brew install hashicorp/tap/packer > brew install hashicorp/tap/packer ==> Downloading https://releases.hashicorp.com/packer/1.8.3/packer_1.8.3_darwin_arm64.zip.. 더보기
[URL] Amazon EC2 AMI Locator Amazon EC2 AMI Locator https://cloud-images.ubuntu.com/locator/ec2/ Ubuntu Amazon EC2 AMI Finder Amazon EC2 AMI Locator As Ubuntu cloud images are uploaded and registered on the Amazon EC2 cloud, they are referred to as AMI (Amazon Machine Images). Each AMI is a machine template from which you can instantiate new servers. Each AMI has its own unique I cloud-images.ubuntu.com 더보기
[iac][terraform] terraform 명령어 terraform 명령어 terraform 사용법 terraform -help $ terraform -help Usage: terraform [global options] [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes requ.. 더보기
[iac][ansible] 동적 인벤토리(aws_es2 plugin) 앤서블 동적 인벤토리(aws_es2 plugin) aws ec2 동적 인벤토리 플러그인 설치 Requirements - pthon >= 3.6 - boto3 >= 1.16.0 - botocore >= 1.19.0 sudo apt install -y python3-boto3 ansible-galaxy 명령으로 플러그인 설치 ansible-galaxy collection install amazon.aws $ ansible-galaxy collection list | grep amazon.aws amazon.aws 2.3.0 amazon.aws 4.1.0 ansible.cfg 생성 vim ansible.cfg [defaults] inventory = my_aws_ec2.yaml aws_ec2 모듈 문서 확인 .. 더보기

728x90