-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobject-storage.tf
24 lines (20 loc) · 948 Bytes
/
object-storage.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
locals {
images_bucket_name_prefix = "movies-images"
website_bucket_name_prefix = "movies-website"
}
resource "yandex_storage_bucket" "movies_images_bucket" {
bucket = "${local.images_bucket_name_prefix}-${local.folder_id}"
access_key = yandex_iam_service_account_static_access_key.movies_api_sa_static_key.access_key
secret_key = yandex_iam_service_account_static_access_key.movies_api_sa_static_key.secret_key
}
resource "yandex_storage_bucket" "movies_website_bucket" {
bucket = "${local.website_bucket_name_prefix}-${local.folder_id}"
access_key = yandex_iam_service_account_static_access_key.movies_api_sa_static_key.access_key
secret_key = yandex_iam_service_account_static_access_key.movies_api_sa_static_key.secret_key
}
output "movies_images_bucket" {
value = yandex_storage_bucket.movies_images_bucket.bucket
}
output "movies_website_bucket" {
value = yandex_storage_bucket.movies_website_bucket.bucket
}