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
|
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
|
||||||
|
20
infra/s3.tf
20
infra/s3.tf
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user