-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee5c561
commit adfaf90
Showing
7 changed files
with
188 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
terraform/terraform-modules/archive-secondary/archive-secondary.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Terraform script to create the PDS archive related resources | ||
|
||
# Create a cold archive for each PDS Node | ||
resource "aws_s3_bucket" "pds_nucleus_cold_archive" { | ||
count = length(var.pds_node_names) | ||
# convert PDS node name to S3 bucket name compatible format | ||
bucket = "${lower(replace(var.pds_node_names[count.index], "_", "-"))}-${var.pds_nucleus_cold_archive_bucket_name_postfix}" | ||
} | ||
|
||
resource "aws_s3_bucket_versioning" "pds_nucleus_cold_archive" { | ||
count = length(var.pds_node_names) | ||
bucket = aws_s3_bucket.pds_nucleus_cold_archive[count.index].id | ||
versioning_configuration { | ||
status = "Enabled" | ||
} | ||
} | ||
|
||
output "pds_nucleus_cold_archive_buckets" { | ||
value = aws_s3_bucket.pds_nucleus_cold_archive | ||
} |
12 changes: 12 additions & 0 deletions
12
terraform/terraform-modules/archive-secondary/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
variable "pds_node_names" { | ||
description = "List of PDS Node Names" | ||
type = list(string) | ||
sensitive = true | ||
} | ||
|
||
variable "pds_nucleus_cold_archive_bucket_name_postfix" { | ||
description = "The postfix of the name of the cold archive s3 bucket" | ||
default = "cold-archive-<venue-name>" | ||
type = string | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters