-
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.
Merge pull request #120 from NASA-PDS/replication
PDS Nucleus Archive Replication
- Loading branch information
Showing
16 changed files
with
270 additions
and
104 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
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,7 @@ | ||
terraform { | ||
backend "s3" { | ||
bucket = "pds-nucleus-tf-state" | ||
key = "dev/nucleus_infra.tfstate" | ||
region = "us-west-2" | ||
} | ||
} |
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
26 changes: 0 additions & 26 deletions
26
terraform/terraform-modules/ecs-ecr/docker/deploy-ecr-images.sh
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.