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
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| environment_variable | Times | map | <map> | no |
| labels | map | <map> | no | |
| length | The length of the external id desired. | string | "16" | no |
| path | string | "ci" | no | |
| period | string | "32400" | no | |
| role_name | The name of the role. | string | n/a | yes |
| service | string | "GitLab" | no | |
| tags | Key-value mapping of tags for the IAM role. | map | <map> | no |
| username | The name of the user. | string | n/a | yes |
Outputs
| Name | Description |
|---|---|
| arn | The Amazon Resource Name (ARN) specifying the role. |
| create_date | The Amazon Resource Name (ARN) specifying the role. |
| unique_id | The Amazon Resource Name (ARN) specifying the role. |