Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sweetops/terraform-google-project-iam-custom-role
https://github.com/sweetops/terraform-google-project-iam-custom-role
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sweetops/terraform-google-project-iam-custom-role
- Owner: SweetOps
- License: apache-2.0
- Created: 2021-03-17T09:56:19.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-17T15:14:02.000Z (almost 4 years ago)
- Last Synced: 2023-03-04T02:33:16.181Z (almost 2 years ago)
- Language: HCL
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-google-project-iam-custom-role
Terraform module to proviosion IAM custom role.
## Usage
```hcl
module "label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.24.1"
namespace = "sweetops"
stage = "production"
name = "aweasome"
}module "your_aweasome_role" {
source = "git::https://github.com/SweetOps/terraform-google-service-account.git?ref=master"permissions = [
"compute.disks.create",
"compute.disks.delete",
"compute.disks.get",
"compute.disks.list",
"compute.disks.use",
]context = module.label.context
}module "your_aweasome_role_service_account" {
source = "git::https://github.com/SweetOps/terraform-google-project-iam-custom-role.git?ref=master"roles = [module.your_aweasome_role.name, "roles/iam.serviceAccountUser"]
context = module.label.context
}
```## Requirements
| Name | Version |
|------|---------|
| terraform | >= 0.14 |
| google | >= 3.0 |## Providers
| Name | Version |
|------|---------|
| google | >= 3.0 |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| permissions | The list of names of the permissions this role grants when bound in an IAM policy. | `list(string)` | n/a | yes |
| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no |
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
| context | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. | `any` |{| no |
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {}
}
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `"_"` | no |
| description | A human-readable description for the role. | `string` | `"Managed by Terraform"` | no |
| enabled | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
| environment | Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |
| id\_length\_limit | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for default, which is `0`.
Does not affect `id_full`. | `number` | `null` | no |
| label\_key\_case | The letter case of label keys (`tag` names) (i.e. `name`, `namespace`, `environment`, `stage`, `attributes`) to use in `tags`.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `"lower"` | no |
| label\_order | The naming order of the id output and Name tag.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no |
| label\_value\_case | The letter case of output label values (also used in `tags` and `id`).
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Default value: `lower`. | `string` | `null` | no |
| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
| project | The project in which the resource belongs. If it is not provided, the provider project is used. | `string` | `null` | no |
| regex\_replace\_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
| role\_stage | The current launch stage of the role. Possible values: `ALPHA`, `BETA`, `GA`, `DEPRECATED`, `DISABLED`, `EAP` | `string` | `"GA"` | no |
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |## Outputs
| Name | Description |
|------|-------------|
| id | The ID of the role |
| name | The name of the role |## License
The Apache-2.0 license