Updating bucket names to include blog and resume
This commit is contained in:
parent
0f96719383
commit
8f375def3b
@ -127,18 +127,6 @@ variable "shockrah_xyz_s3_secret_key" {
|
||||
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" {
|
||||
description = "Port for shockrah.xyz"
|
||||
type = number
|
||||
|
20
infra/s3.tf
20
infra/s3.tf
@ -1,8 +1,20 @@
|
||||
resource "aws_s3_bucket" "shockrah_xyz" {
|
||||
bucket = var.shockrah_xyz_bucket_name
|
||||
locals {
|
||||
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 = {
|
||||
Name = var.shockrah_xyz_bucket_name
|
||||
Description = "Bucket for star.shockrah.xyz"
|
||||
Name = each.value.name
|
||||
Description = lookup(each.value, "desc", "Static content")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user