Skip to content
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

The module does not work with S3 buckets #88

Open
obervinov opened this issue Aug 14, 2024 · 1 comment
Open

The module does not work with S3 buckets #88

obervinov opened this issue Aug 14, 2024 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@obervinov
Copy link
Contributor

obervinov commented Aug 14, 2024

Describe the Bug

The IAM role uses the AWSBackupServiceRolePolicyForBackup policy, this policy does not contain the necessary permissions to back up s3 buckets.
A different built-in AWSBackupServiceRolePolicyForS3Backup policy should be used for s3 backups.
https://github.com/cloudposse/terraform-aws-backup/blob/v1/main.tf#L129

Expected Behavior

The created IAM role also contains arn policies
policy_arn = “arn:${data.aws_partition.current.partition}:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForS3Backup”

Steps to Reproduce

module "aws_backup" {
  source  = "cloudposse/backup/aws"
  version = "1.0.1"

  name             = "backup"
  plan_name_suffix = "backup-plan"
  vault_enabled    = true
  iam_role_enabled = true
  plan_enabled     = true
  backup_resources = [
    arn:aws:s3:::bucket-1,
    arn:aws:s3:::bucket-2,
    arn:aws:s3:::bucket-3
  ]
  rules = [
    {
      name      = "backup-rule"
      schedule  = "cron(0 6 * * ? *)"
      lifecycle = { delete_after = 7 }
    }
  ]
}

Screenshots

Снимок экрана 2024-08-14 в 17 45 38

Environment

  • OS: OSX
  • Version: 14.5
  • Module version: 1.0.1
  • Terraform version: 1.9.3

Additional Context

No response

@obervinov obervinov added the bug 🐛 An issue with the system label Aug 14, 2024
@obervinov
Copy link
Contributor Author

I think I could prepare a Pull Request for consideration with support for an additional policy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant