terraform-aws-iam-ci-role

AWS IAM External Role

Terraform module for a continuous integration user-role pairing.

These types of resources are supported:

Usage

module "cicd_setup" {
  source = "git::https://gitlab.com/infraprints/modules/aws/iam-ci-role"

  username  = "infraprints-iam-ci-role-basic"
  role_name = "infraprints-iam-ci-role-basic"

  environment_variable = {
    s3_bucket   = "infraprints-bucket-example"
    hello_world = "hello world"
  }
}

Examples

Notes

  • Environment variables are prefixed with ENV_ to prevent them

Inputs

NameDescriptionTypeDefaultRequired
environment_variableTimesmap<map>no
labelsmap<map>no
lengthThe length of the external id desired.string"16"no
pathstring"ci"no
periodstring"32400"no
role_nameThe name of the role.stringn/ayes
servicestring"GitLab"no
tagsKey-value mapping of tags for the IAM role.map<map>no
usernameThe name of the user.stringn/ayes

Outputs

NameDescription
arnThe Amazon Resource Name (ARN) specifying the role.
create_dateThe Amazon Resource Name (ARN) specifying the role.
unique_idThe Amazon Resource Name (ARN) specifying the role.