Skip to content

Commit 15fab87

Browse files
feat: update minimum supported version
1 parent daddc99 commit 15fab87

File tree

6 files changed

+45
-26
lines changed

6 files changed

+45
-26
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.1.0
3+
rev: v4.0.1
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=500']
@@ -17,7 +17,7 @@ repos:
1717
- id: detect-aws-credentials
1818
args: ['--allow-missing-credentials']
1919
- repo: git://github.com/antonbabenko/pre-commit-terraform
20-
rev: v1.31.0
20+
rev: v1.51.0
2121
hooks:
2222
- id: terraform_fmt
2323
- id: terraform_docs

.tflint.hcl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
config {
2-
deep_check = false
3-
ignore_module = {}
4-
varfile = []
1+
plugin "aws" {
2+
enabled = true
3+
deep_check = true
54
}
65

76
rule "terraform_documented_variables" {

README.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,37 +81,49 @@ module enforce_mfa {
8181

8282
| Name | Version |
8383
|------|---------|
84-
| terraform | >= 0.12 |
84+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
85+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.38 |
8586

8687
## Providers
8788

8889
| Name | Version |
8990
|------|---------|
90-
| aws | n/a |
91+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.38 |
92+
93+
## Modules
94+
95+
No modules.
96+
97+
## Resources
98+
99+
| Name | Type |
100+
|------|------|
101+
| [aws_iam_group_policy_attachment.to_groups](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_group_policy_attachment) | resource |
102+
| [aws_iam_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
103+
| [aws_iam_policy_document.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
91104

92105
## Inputs
93106

94107
| Name | Description | Type | Default | Required |
95108
|------|-------------|------|---------|:--------:|
96-
| account\_id | Account identification. (Optional, default '\*') | `string` | `"*"` | no |
97-
| groups | Enforce MFA for the members in these groups. (Optional, default '[]') | `list(string)` | `[]` | no |
98-
| manage\_explicit\_deny | Manage explicit deny. | `bool` | `false` | no |
99-
| manage\_own\_access\_keys | Allow a new AWS secret access key and corresponding AWS access key ID for the specified user. | `bool` | `false` | no |
100-
| manage\_own\_git\_credentials | Allow managing git credentials. | `bool` | `false` | no |
101-
| manage\_own\_signing\_certificates | Allow managing signing certificates. | `bool` | `false` | no |
102-
| manage\_own\_ssh\_public\_keys | Allow managing ssh public keys. | `bool` | `false` | no |
103-
| path | Path in which to create the policy. (Optional, default '/') | `string` | `"/"` | no |
104-
| policy\_name | The name of the policy. | `string` | `"managed-force-mfa-policy"` | no |
109+
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | Account identification. (Optional, default '*') | `string` | `"*"` | no |
110+
| <a name="input_groups"></a> [groups](#input\_groups) | Enforce MFA for the members in these groups. (Optional, default '[]') | `list(string)` | `[]` | no |
111+
| <a name="input_manage_explicit_deny"></a> [manage\_explicit\_deny](#input\_manage\_explicit\_deny) | Manage explicit deny. | `bool` | `false` | no |
112+
| <a name="input_manage_own_access_keys"></a> [manage\_own\_access\_keys](#input\_manage\_own\_access\_keys) | Allow a new AWS secret access key and corresponding AWS access key ID for the specified user. | `bool` | `false` | no |
113+
| <a name="input_manage_own_git_credentials"></a> [manage\_own\_git\_credentials](#input\_manage\_own\_git\_credentials) | Allow managing git credentials. | `bool` | `false` | no |
114+
| <a name="input_manage_own_signing_certificates"></a> [manage\_own\_signing\_certificates](#input\_manage\_own\_signing\_certificates) | Allow managing signing certificates. | `bool` | `false` | no |
115+
| <a name="input_manage_own_ssh_public_keys"></a> [manage\_own\_ssh\_public\_keys](#input\_manage\_own\_ssh\_public\_keys) | Allow managing ssh public keys. | `bool` | `false` | no |
116+
| <a name="input_path"></a> [path](#input\_path) | Path in which to create the policy. (Optional, default '/') | `string` | `"/"` | no |
117+
| <a name="input_policy_name"></a> [policy\_name](#input\_policy\_name) | The name of the policy. | `string` | `"managed-force-mfa-policy"` | no |
105118

106119
## Outputs
107120

108121
| Name | Description |
109122
|------|-------------|
110-
| arn | The policy's ARN. |
111-
| groups | The groups to which policy is attached |
112-
| id | The policy's ID. |
113-
| policy\_json | The above arguments serialized as a standard JSON policy document. |
114-
123+
| <a name="output_arn"></a> [arn](#output\_arn) | The policy's ARN. |
124+
| <a name="output_groups"></a> [groups](#output\_groups) | The groups to which policy is attached |
125+
| <a name="output_id"></a> [id](#output\_id) | The policy's ID. |
126+
| <a name="output_policy_json"></a> [policy\_json](#output\_policy\_json) | The above arguments serialized as a standard JSON policy document. |
115127
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
116128

117129
## Commands

data.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
data aws_iam_policy_document this {
1+
data "aws_iam_policy_document" "this" {
22

33
statement {
44
sid = "AllowBasicVisiiblityWithoutMfa"

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
resource aws_iam_policy this {
1+
resource "aws_iam_policy" "this" {
22
name = var.policy_name
33
path = var.path
44
description = "Policy to allow MFA management"
55
policy = data.aws_iam_policy_document.this.json
66
}
77

8-
resource aws_iam_group_policy_attachment to_groups {
8+
resource "aws_iam_group_policy_attachment" "to_groups" {
99
count = length(var.groups)
1010
group = element(var.groups, count.index)
1111
policy_arn = aws_iam_policy.this.arn

versions.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
terraform {
2-
required_version = ">= 0.12"
2+
3+
required_version = ">= 0.15.0"
4+
5+
required_providers {
6+
aws = {
7+
source = "hashicorp/aws"
8+
version = ">= 3.38"
9+
}
10+
}
311
}

0 commit comments

Comments
 (0)