-
Notifications
You must be signed in to change notification settings - Fork 0
S3 to Azure backup #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
S3 to Azure backup #236
Conversation
Stretch96
commented
Apr 11, 2025
- Creates a scheduled task, which runs the RDS tooling image, to copy an S3 bucket to an Azure container
- Environment variables are added to the task definition, to authenticate with Azure
9ec72ba to
0925ffe
Compare
| infrastructure_s3_to_azure_backup_command = join( | ||
| " && ", | ||
| [ | ||
| for obj in local.infrastructure_s3_to_azure_backup : "s3-to-azure -d \"${obj["s3_bucket_name"]}\" -d \"${obj["azure_container_name"]}\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be -s for source and -d for destination
| } | ||
|
|
||
| variable "infrastructure_s3_to_azure_backup_azure_spa_application_id" { | ||
| description = "Azure service principle app (spa) application id for the S3 to Azure backups" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
principal not principle
|
|
||
| variable "infrastructure_s3_to_azure_backup" { | ||
| description = <<EOT | ||
| List of objects, defining S3 bucket name and Azure container name, along with Azure credentials |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
azure credentials seem to be separate vars so does the description need amending here?
s3-azure-backup-scheduled-task.tf
Outdated
| resource "aws_cloudwatch_event_target" "infrastructure_s3_to_azure_backup_scheduled_task" { | ||
| count = local.infrastructure_s3_to_azure_backup_cron_expression != "" ? 1 : 0 | ||
|
|
||
| target_id = "${local.resource_prefix}-s3-to-azure-backup-${each.key}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each.key is used here but you are in a count loop not a for_each loop. would each.key just be the index number here?
0925ffe to
214e05f
Compare
* Creates a scheduled task, which runs the RDS tooling image, to copy an S3 bucket to an Azure container * Environment variables are added to the task definition, to authenticate with Azure
214e05f to
f966ece
Compare