
처음 시작하는 Infrastructure as Code: AWS & 테라폼을 수강하며 정리한 내용입니다.
aws_s3_bucket 리소스를 사용provider.tf 파일을 다음과 같이 작성provider "aws" {
region = "ap-northeast-2"
}
provider.tf 파일 생성 후 terraform init 수행
terraform init이 완료되면 S3 리소스를 위한 S3.tf 파일 작성resource "aws_s3_bucket" "main" {
bucket = "chori-terraform-101"
tags = {
Name = "chori-terraform-101"
}
}
terraform plan 실행
terraform apply 실행

This is learning cource for terraform and aws 101.
aws s3 cp index.txt s3://chori-terraform-101/


aws s3 cp index.txt s3://chori-terraform-101/path/


index.txt 파일을 삭제rm index.txt
aws s3 cp s3://chori-terraform-101/path/index.txt .

html 같은 파일은 정적 웹 사이트 호스팅을 할 수 있음