forked from public/stack
14 lines
441 B
Terraform
14 lines
441 B
Terraform
|
resource "digitalocean_spaces_bucket" "website" {
|
||
|
name = "website-${random_id.suffix.hex}"
|
||
|
region = var.region
|
||
|
}
|
||
|
|
||
|
resource "digitalocean_spaces_bucket_object" "website" {
|
||
|
for_each = fileset("${var.out_dir}/website", "*")
|
||
|
region = var.region
|
||
|
bucket = digitalocean_spaces_bucket.website.name
|
||
|
source = "${var.out_dir}/website/${each.value}"
|
||
|
key = each.value
|
||
|
etag = filemd5("${var.out_dir}/website/${each.value}")
|
||
|
}
|