Updating bucket names to include blog and resume

This commit is contained in:
shockrah 2023-02-28 21:04:26 -08:00
parent 0f96719383
commit 8f375def3b
2 changed files with 16 additions and 16 deletions

View File

@ -127,18 +127,6 @@ variable "shockrah_xyz_s3_secret_key" {
sensitive = true sensitive = true
} }
variable "shockrah_xyz_bucket_name" {
description = "shockrah.xyz bucket name"
type = string
sensitive = true
}
variable "shockrah_xyz_s3_server" {
description = "S3 target server"
type = string
sensitive = true
}
variable "shockrah_xyz_nginx_port" { variable "shockrah_xyz_nginx_port" {
description = "Port for shockrah.xyz" description = "Port for shockrah.xyz"
type = number type = number

View File

@ -1,8 +1,20 @@
resource "aws_s3_bucket" "shockrah_xyz" { locals {
bucket = var.shockrah_xyz_bucket_name static_content_shockrah_xyz = [
{ name = "shockrah-xyz" },
{ name = "resume-shockrah-xyz" }
]
}
resource "aws_s3_bucket" "static-content" {
for_each = {
for idx, record in local.static_content_shockrah_xyz:
idx => record
}
bucket = each.value.name
tags = { tags = {
Name = var.shockrah_xyz_bucket_name Name = each.value.name
Description = "Bucket for star.shockrah.xyz" Description = lookup(each.value, "desc", "Static content")
} }
} }