AWS/Terraform 23

[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