Skip to content

Commit 94abfe6

Browse files
fully working with optional values. #skip
1 parent bbe9c6d commit 94abfe6

File tree

9 files changed

+500
-8
lines changed

9 files changed

+500
-8
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
env:
88
WITH_V: true
99
DEFAULT_BUMP: patch
10-
INITIAL_VERSION: 0.0.0
10+
INITIAL_VERSION: 0.12.0
1111
TERRAFORM_VERSION: 0.12
1212

1313
jobs:
@@ -44,6 +44,6 @@ jobs:
4444
draft: false
4545
prerelease: false
4646
body: |
47-
Changes in this Release ${{ steps.register.outputs.changelog }}
47+
Changes in this Release ${{ steps.register.outputs.release_timestamp }}
4848
- ${{ steps.register.outputs.changelog }}
4949
- Terraform Version: ${{ env.TERRAFORM_VERSION }}

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ repos:
2121
hooks:
2222
- id: terraform_fmt
2323
- id: terraform_docs
24+
- id: terraform_tflint
2425
- repo: git://github.com/smian/pre-commit-makefile
2526
rev: 261f8fb4b31dfdc05d1a1d7fbde1f1462ecde66d
2627
hooks:

.tflint.hcl

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
11
config {
22
deep_check = false
3-
ignore_rule = {}
43
ignore_module = {}
54
varfile = []
6-
}
5+
}
6+
7+
rule "terraform_documented_variables" {
8+
enabled = true
9+
}
10+
11+
rule "terraform_documented_outputs" {
12+
enabled = true
13+
}
14+
15+
rule "terraform_comment_syntax" {
16+
enabled = true
17+
}
18+
19+
rule "terraform_naming_convention" {
20+
enabled = true
21+
}
22+
23+
rule "terraform_deprecated_interpolation" {
24+
enabled = true
25+
}
26+
27+
rule "terraform_deprecated_index" {
28+
enabled = true
29+
}
30+
31+
rule "terraform_required_providers" {
32+
enabled = true
33+
}
34+
35+
rule "terraform_required_version" {
36+
enabled = true
37+
}
38+
39+
rule "terraform_typed_variables" {
40+
enabled = true
41+
}
42+
43+
rule "terraform_unused_declarations" {
44+
enabled = true
45+
}

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,34 @@ Terraform module `terraform-aws-enforce-mfa`
1818
![](https://img.shields.io/github/last-commit/terraform-module/terraform-aws-enforce-mfa)
1919
[![Maintenance](https://img.shields.io/badge/Maintenu%3F-oui-green.svg)](https://GitHub.com/terraform-module/terraform-aws-enforce-mfa/graphs/commit-activity)
2020

21+
## Documentations
22+
23+
- [aws-vault setup](https://github.com/99designs/aws-vault)
24+
- [aws-cli setup](https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes)
25+
- [users with self managed mfa](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-manage-mfa-and-creds.html)
26+
27+
Optional `.aws/config` setup and `aws-vault`
28+
29+
```sh
30+
[profile personal]
31+
region=us-west-2
32+
output=json
33+
34+
[profile work]
35+
region=us-west-1
36+
output=json
37+
38+
[profile work]
39+
source_profile = work
40+
mfa_serial = arn:aws:iam::<account>:mfa/<username>
41+
credential_process = aws-vault exec work --json
42+
43+
[profile personal]
44+
source_profile = personal
45+
mfa_serial = arn:aws:iam::<account>:mfa/<username>
46+
credential_process = aws-vault exec work --json
47+
```
48+
2149
## Usage example
2250

2351
Here's the gist of using it directly from github.
@@ -33,7 +61,41 @@ Here's the gist of using it directly from github.
3361
## Module Variables
3462

3563
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
36-
Error: no lines in file
64+
## Requirements
65+
66+
| Name | Version |
67+
|------|---------|
68+
| terraform | >= 0.12 |
69+
70+
## Providers
71+
72+
| Name | Version |
73+
|------|---------|
74+
| aws | n/a |
75+
76+
## Inputs
77+
78+
| Name | Description | Type | Default | Required |
79+
|------|-------------|------|---------|:--------:|
80+
| account\_id | Account identification. (Optional, default '\*') | `string` | `"*"` | no |
81+
| groups | Enforce MFA for the members in these groups. (Optional, default '[]') | `list(string)` | `[]` | no |
82+
| manage\_own\_access\_keys | Allow a new AWS secret access key and corresponding AWS access key ID for the specified user. | `bool` | `false` | no |
83+
| manage\_own\_git\_credentials | Allow managing git credentials. | `bool` | `false` | no |
84+
| manage\_own\_password\_without\_mfa | Whethehr password management without mfa is allowd | `bool` | `true` | no |
85+
| manage\_own\_signing\_certificates | Allow managing signing certificates. | `bool` | `false` | no |
86+
| manage\_own\_ssh\_public\_keys | Allow managing ssh public keys. | `bool` | `false` | no |
87+
| path | Path in which to create the policy. (Optional, default '/') | `string` | `"/"` | no |
88+
| policy\_name | The name of the policy. | `string` | `"managed-force-mfa-policy"` | no |
89+
90+
## Outputs
91+
92+
| Name | Description |
93+
|------|-------------|
94+
| arn | The policy's ARN. |
95+
| groups | The groups to which policy is attached |
96+
| id | The policy's ID. |
97+
| policy\_json | The above arguments serialized as a standard JSON policy document. |
98+
3799
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
38100

39101
## Commands

0 commit comments

Comments
 (0)