Skip to content

Conversation

@Stretch96
Copy link
Member

  • 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

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"]}\""
Copy link
Contributor

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"
Copy link
Contributor

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
Copy link
Contributor

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?

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}"
Copy link
Contributor

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?

@Stretch96 Stretch96 force-pushed the s3-to-azure-backup branch from 0925ffe to 214e05f Compare April 11, 2025 14:37
* 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
@Stretch96 Stretch96 force-pushed the s3-to-azure-backup branch from 214e05f to f966ece Compare April 11, 2025 14:38
@Stretch96 Stretch96 marked this pull request as draft April 11, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants