{"id":21029759,"url":"https://github.com/loafoe/hsdp-task-s3mirror","last_synced_at":"2025-05-15T11:32:06.278Z","repository":{"id":43097813,"uuid":"363887617","full_name":"loafoe/hsdp-task-s3mirror","owner":"loafoe","description":"Periodically mirror S3 Bucket content to another bucket","archived":false,"fork":false,"pushed_at":"2023-05-08T10:45:36.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-11T05:44:21.375Z","etag":null,"topics":["hsdp","hsdp-task","mirroring","s3"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loafoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-03T10:04:30.000Z","updated_at":"2023-08-25T04:38:31.000Z","dependencies_parsed_at":"2022-09-10T14:02:08.235Z","dependency_job_id":null,"html_url":"https://github.com/loafoe/hsdp-task-s3mirror","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhsdp-task-s3mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhsdp-task-s3mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhsdp-task-s3mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhsdp-task-s3mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loafoe","download_url":"https://codeload.github.com/loafoe/hsdp-task-s3mirror/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254330771,"owners_count":22053045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hsdp","hsdp-task","mirroring","s3"],"created_at":"2024-11-19T12:14:09.982Z","updated_at":"2025-05-15T11:32:04.547Z","avatar_url":"https://github.com/loafoe.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hsdp-task-s3mirror\n\nA task for use with [hsdp_function](https://registry.terraform.io/providers/philips-software/hsdp/latest/docs/resources/function) to mirror HSDP S3 buckets.\n\n# Usage\n\n```hcl\nmodule \"siderite_backend\" {\n  source = \"philips-labs/siderite-backend/cloudfoundry\"\n\n  cf_region   = \"eu-west\"\n  cf_org_name = \"hsdp-demo-org\"\n  cf_user     = var.cf_user\n  iron_plan = \"medium-encrypted\"\n}\n\nresource \"hsdp_function\" \"s3mirror\" {\n  name         = \"s3mirror\"\n  docker_image = \"philipslabs/hsdp-task-s3mirror:latest\"\n  command      = [\"s3mirror.sh\"]\n\n  environment = {\n    # Source bucket details\n    source_access_key = \"AAA\"\n    source_secret_key = \"BBB\"\n    source_endpoint = \"s3-eu-west-1.amazonaws.com\"\n    source_bucket = \"cf-s3-xxx\"\n    source_prefix = \"/data\"\n\n    # Destination bucket details\n    dest_access_key = \"CCC\"\n    dest_secret_key = \"DDD\"\n    dest_endpoint = \"s3-eu-west-1.amazonaws.com\"\n    dest_bucket = \"cf-s3-yyy\"\n    dest_prefix = \"/backups/data\"\n  }\n\n  # Run every 6 hours\n  run_every = \"6h\"\n\n  # Trick to prevent concurrent runs\n  timeout = 21599\n\n  backend {\n    credentials = module.siderite_backend.credentials\n  }\n}\n```\n# Using server-side encryption with customer-provided encryption keys (SSE-C)\nMirror your server-side objects with SSE-C (by default it uses [SSE-S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html)). Add two variables to `environment` section:\n - source_sse_customer_key - AES 256-bit, base64-encoded encryption key for source (_Example_: __`openssl rand -base64 32`__). If empty then use SSE-S3 by default.\n - dest_sse_customer_key - AES 256-bit, base64-encoded encryption key for destination. If empty then use SSE-S3 by default.\n\n```hcl\nresource \"hsdp_function\" \"s3mirror-sse-c\" {\n...\n  environment = {\n    # Source bucket details\n    source_access_key = \"AAA\"\n    source_secret_key = \"BBB\"\n    source_endpoint = \"s3-eu-west-1.amazonaws.com\"\n    source_bucket = \"cf-s3-xxx\"\n    source_prefix = \"/data\"\n    source_sse_customer_key = \"4GRsukWAbk8TwphV5X/2LnHHE3gFyifRCB0lS98Ztr4=\"\n    \n    # Destination bucket details\n    dest_access_key = \"CCC\"\n    dest_secret_key = \"DDD\"\n    dest_endpoint = \"s3-eu-west-1.amazonaws.com\"\n    dest_bucket = \"cf-s3-yyy\"\n    dest_prefix = \"/backups/data\"\n  }\n...\n}\n```\n\n# Contact / Getting help\n\nPlease post your questions on the HSDP Slack `#terraform` channel\n\n# License\n\nLicense is MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floafoe%2Fhsdp-task-s3mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floafoe%2Fhsdp-task-s3mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floafoe%2Fhsdp-task-s3mirror/lists"}