Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Latest commit

 

History

History

selection

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

aws-terraform-backup / selection

This module creates an AWS Backup selection used to target resources for backup.

module "backup_selection" {
  source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-backup//modules/selection/?ref=v0.12.0"

  plan_id        = "${module.plan.plan_id}"
  resources      = []
  selection_name = "Tagged"
  selection_tag = [
    {
      type  = "STRINGEQUALS"
      key   = "BackupPlan"
      value = "${module.plan.plan_name}"
    },
  ]
}

Further examples available.

Providers

Name Version
aws >= 2.34.0

Inputs

Name Description Type Default Required
create_iam_role Create a new IAM role that AWS Backup uses to authenticate when backing up the target resource(s) using the default policy, AWSBackupServiceRolePolicyForBackup. Setting this to true must be accompanied by iam_role_name. If this is false and both iam_role_arn and iam_role_name are empty the module will attempt to use the default AWS Backup role, AWSBackupDefaultServiceRole. bool false no
iam_role_arn Optional, the ARN of an existing IAM role that AWS Backup uses to authenticate when backing up the target resource(s). Must have the appropriate permissions for the target(s) and AWS Backup. string "" no
iam_role_name Optional, the name for the IAM Role to be created if setting create_iam_role to true. string "" no
plan_id The backup plan ID to be associated with the selection of resources. string n/a yes
resources Optional list of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan. Must use selection_tag and/or resources. i.e ['arn:aws:ec2:us-east-1:123456789012:volume/','arn:aws:ec2:us-east-1:56789012234:volume/'] list(string) [] no
selection_name The display name of the resource selection document. string n/a yes
selection_tag Optional list of maps used to specify a set of resources to assign to a backup plan. Must use selection_tag and/or resources. Please note that due to Terraform limitations, because selection_tag is a block, interpolations inside a given list may result in an error.
type - must equal "STRINGEQUALS"
key - the tag key to match
value - the tag value to match
See examples.
list(map(string)) [] no

Outputs

Name Description
backup_iam_role_arn ARN for given IAM Role or newly created IAM Role.
selection_id Backup Selection identifier.