테라폼 init/apply/destroy
terraform init
일단, 디렉토리와 메인파일을 만들어 봅시다.
mkdir infra-by-terraform && cd infra-by-terraform
touch main.tf
terraform init
# main.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.27"
}
}
required_version = ">= 0.14.9"
}
provider "aws" {
profile = "default"
region = "ap-northeast-2"
}
resource "aws_instance" "app_server" {
ami = "ami-014009fa4a1467d53"
instance_type = "t2.micro"
tags = {
Name = "TerraformInstance"
}
}
terraform init
terraform apply
terraform apply
terraform destroy
terraform destroy
테라폼이란 무엇인가라는 아주 좋은 영상이 있다.
HashiCorp
의 공동 창업자이자 CTO가 직접 설명해주는 영상이라니.... 아주 훌륭하다
Author And Source
이 문제에 관하여(테라폼 init/apply/destroy), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@khh180cm/terraform저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)