terraform 24

[AWS Terraform 기초]3. Key Pair 생성

1. AWSCLIV2 설치 https://docs.aws.amazon.com/ko_kr/cli/latest/userguide/getting-started-install.html 최신 버전의 AWS CLI 설치 또는 업데이트 - AWS Command Line Interface 이전 버전에서 업데이트하는 경우 unzip 명령을 실행하면 기존 파일을 덮어쓸지 묻는 메시지가 표시됩니다. 스크립트 자동화와 같은 경우에 이러한 프롬프트를 건너뛰려면 unzip에 대한 -u 업데이 docs.aws.amazon.com 2. AWS 액세스 키 생성 IAM > 보안 자격 증명 > 액세스 키 만들기 Access key ID와 Secret Access key가 있는 csv 파일 저장 3. AWS CLI 자격 증명 aws con..

AWS/Terraform 2023.07.11

[AWS Terraform 기초]2. VPC 생성

1. Terraform Docs https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc Terraform Registry registry.terraform.io 예시: 인수 예: 2. Terraform 코드 작성 #01_vpc.tf resource "aws_vpc" "pmh_vpc" { cidr_block = "10.0.0.0/16" enable_dns_hostnames = true enable_dns_support = true tags = { Name = "pmh-vpc" } } resource "aws_vpc" "pmh_vpc" pmh_vpc라는 이름의 aws_vpc 리소스를 정의 cidr_block = "10.0..

AWS/Terraform 2023.07.10

[AWS Terraform 기초]1. Provider 선언(+ terraform 명령어)

AWS API와 상호 작용하기 위한 프로바이더 선언 1. Terraform Docs 예시 https://registry.terraform.io/providers/hashicorp/aws/latest/docs Terraform Registry registry.terraform.io 2. Terraform 코드 작성 #00_pre.tf terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 5.0" } } } provider "aws" { region = "ap-northeast-2" } terraform Terraform의 설정 블록 required_providers 사용할 프로바이더와 해당 버전을 지정 - aws 프로..

AWS/Terraform 2023.07.10

Terraform 설치 및 환경설정

0.Terraform AWS, Azure, Kubernetes 등의 인프라를 코드로 구성하고 관리할 수 있는 자동화 도구 1.Terraform 설치 https://developer.hashicorp.com/terraform/downloads?product_intent=terraform Install | Terraform | HashiCorp Developer Explore Terraform product documentation, tutorials, and examples. developer.hashicorp.com 윈도우: 2. 폴더 생성 다운로드 후 폴더에 압축 풀기 3. 환경설정 실행 창 > sysdm.cpl 명령어 또는 검색 > 시스템 환경 변수 편집 환경 변수에 Terraform 설치한 폴더 추..

AWS/Terraform 2023.07.10