Commit 3c59715b authored by Leandro Carneiro's avatar Leandro Carneiro Committed by GitHub

feat: Add role unique_id output in iam-assumable-role module (#143)

parent 013320ee
...@@ -7,7 +7,7 @@ on: ...@@ -7,7 +7,7 @@ on:
- master - master
jobs: jobs:
# Min Terraform version(s) # Min Terraform version(s)
getDirectories: getDirectories:
name: Get root directories name: Get root directories
runs-on: ubuntu-latest runs-on: ubuntu-latest
...@@ -59,7 +59,7 @@ jobs: ...@@ -59,7 +59,7 @@ jobs:
pre-commit run terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf) pre-commit run terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)
# Max Terraform version # Max Terraform version
getBaseVersion: getBaseVersion:
name: Module max TF version name: Module max TF version
runs-on: ubuntu-latest runs-on: ubuntu-latest
...@@ -94,7 +94,7 @@ jobs: ...@@ -94,7 +94,7 @@ jobs:
- name: Install pre-commit dependencies - name: Install pre-commit dependencies
run: | run: |
pip install pre-commit pip install pre-commit
curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v0.12.0-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/ curl -L "$(curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep -o -E "https://.+?-v0.12\..+?-linux-amd64" | head -n1)" > terraform-docs && chmod +x terraform-docs && sudo mv terraform-docs /usr/bin/
curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/ curl -L "$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep -o -E "https://.+?_linux_amd64.zip")" > tflint.zip && unzip tflint.zip && rm tflint.zip && sudo mv tflint /usr/bin/
- name: Execute pre-commit - name: Execute pre-commit
# Run all pre-commit checks on max version supported # Run all pre-commit checks on max version supported
......
...@@ -75,4 +75,5 @@ No modules. ...@@ -75,4 +75,5 @@ No modules.
| <a name="output_this_iam_role_arn"></a> [this\_iam\_role\_arn](#output\_this\_iam\_role\_arn) | ARN of IAM role | | <a name="output_this_iam_role_arn"></a> [this\_iam\_role\_arn](#output\_this\_iam\_role\_arn) | ARN of IAM role |
| <a name="output_this_iam_role_name"></a> [this\_iam\_role\_name](#output\_this\_iam\_role\_name) | Name of IAM role | | <a name="output_this_iam_role_name"></a> [this\_iam\_role\_name](#output\_this\_iam\_role\_name) | Name of IAM role |
| <a name="output_this_iam_role_path"></a> [this\_iam\_role\_path](#output\_this\_iam\_role\_path) | Path of IAM role | | <a name="output_this_iam_role_path"></a> [this\_iam\_role\_path](#output\_this\_iam\_role\_path) | Path of IAM role |
| <a name="output_this_iam_role_unique_id"></a> [this\_iam\_role\_unique\_id](#output\_this\_iam\_role\_unique\_id) | Unique ID of IAM role |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> <!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
...@@ -13,6 +13,11 @@ output "this_iam_role_path" { ...@@ -13,6 +13,11 @@ output "this_iam_role_path" {
value = element(concat(aws_iam_role.this.*.path, [""]), 0) value = element(concat(aws_iam_role.this.*.path, [""]), 0)
} }
output "this_iam_role_unique_id" {
description = "Unique ID of IAM role"
value = element(concat(aws_iam_role.this.*.unique_id, [""]), 0)
}
output "role_requires_mfa" { output "role_requires_mfa" {
description = "Whether IAM role requires MFA" description = "Whether IAM role requires MFA"
value = var.role_requires_mfa value = var.role_requires_mfa
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment