클라우드/GCP 자원 테라폼으로 관리해보기
(12) 임시 GCS
Fanic
2024. 6. 9. 02:36
반응형
Terraform으로 GCS를 생성하는 방법에 대해 설명하도록 한다.
resource "google_storage_bucket" "function_bucket" {
name = "function-bucket-hr"
location = "ASIA"
project = "pjt-an3-dev-vm-2"
force_destroy = false
}
resource "google_storage_bucket_object" "archive_2" {
name = "test/function.zip"
bucket = google_storage_bucket.my_bucket.name
source = "./hello_http/hello_http.zip"
}
google_storage_bucket : 버킷을 생성함
google_storage_bucket_object : 버킷에 데이터를 넣는 방법
GCP 콘솔에서 생성 확인
반응형