Skip to content

Commit 0167b16

Browse files
authored
chore: update documentation based on latest terraform-docs which includes module and resource sections (#131)
1 parent e51b729 commit 0167b16

File tree

21 files changed

+272
-25
lines changed

21 files changed

+272
-25
lines changed

.gitignore

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
1-
.terraform
2-
terraform.tfstate
3-
*.tfstate*
4-
terraform.tfvars
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# Terraform lockfile
55
.terraform.lock.hcl
6+
7+
# .tfstate files
8+
*.tfstate
9+
*.tfstate.*
10+
11+
# Crash log files
12+
crash.log
13+
14+
# Exclude all .tfvars files, which are likely to contain sentitive data, such as
15+
# password, private keys, and other secrets. These should not be part of version
16+
# control as they are data points which are potentially sensitive and subject
17+
# to change depending on the environment.
18+
*.tfvars
19+
20+
# Ignore override files as they are usually used to override resources locally and so
21+
# are not checked in
22+
override.tf
23+
override.tf.json
24+
*_override.tf
25+
*_override.tf.json
26+
27+
# Ignore CLI configuration files
28+
.terraformrc
29+
terraform.rc

.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: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.44.0
3+
rev: v1.46.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate
@@ -21,6 +21,6 @@ repos:
2121
- '--args=--only=terraform_standard_module_structure'
2222
- '--args=--only=terraform_workspace_remote'
2323
- repo: git://github.com/pre-commit/pre-commit-hooks
24-
rev: v3.3.0
24+
rev: v3.4.0
2525
hooks:
2626
- id: check-merge-conflict

examples/iam-account/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ Run `terraform destroy` when you don't need these resources.
2626

2727
No provider.
2828

29+
## Modules
30+
31+
| Name | Source | Version |
32+
|------|--------|---------|
33+
| iam_account | ../../modules/iam-account | |
34+
35+
## Resources
36+
37+
No resources.
38+
2939
## Inputs
3040

3141
No input.
@@ -36,5 +46,4 @@ No input.
3646
|------|-------------|
3747
| this\_caller\_identity\_account\_id | The ID of the AWS account |
3848
| this\_iam\_account\_password\_policy\_expire\_passwords | Indicates whether passwords in the account expire. Returns true if max\_password\_age contains a value greater than 0. Returns false if it is 0 or not present. |
39-
4049
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/iam-assumable-role-with-oidc/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ Run `terraform destroy` when you don't need these resources.
2626

2727
No provider.
2828

29+
## Modules
30+
31+
| Name | Source | Version |
32+
|------|--------|---------|
33+
| iam_assumable_role_admin | ../../modules/iam-assumable-role-with-oidc | |
34+
35+
## Resources
36+
37+
No resources.
38+
2939
## Inputs
3040

3141
No input.
@@ -37,5 +47,4 @@ No input.
3747
| this\_iam\_role\_arn | ARN of IAM role |
3848
| this\_iam\_role\_name | Name of IAM role |
3949
| this\_iam\_role\_path | Path of IAM role |
40-
4150
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/iam-assumable-role/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ Run `terraform destroy` when you don't need these resources.
2828

2929
No provider.
3030

31+
## Modules
32+
33+
| Name | Source | Version |
34+
|------|--------|---------|
35+
| iam_assumable_role_admin | ../../modules/iam-assumable-role | |
36+
| iam_assumable_role_custom | ../../modules/iam-assumable-role | |
37+
| iam_policy | ../../modules/iam-policy | |
38+
39+
## Resources
40+
41+
No resources.
42+
3143
## Inputs
3244

3345
No input.
@@ -40,5 +52,4 @@ No input.
4052
| this\_iam\_role\_arn | ARN of IAM role |
4153
| this\_iam\_role\_name | Name of IAM role |
4254
| this\_iam\_role\_path | Path of IAM role |
43-
4455
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/iam-assumable-roles-with-saml/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ Run `terraform destroy` when you don't need these resources.
2828
|------|---------|
2929
| aws | >= 2.23 |
3030

31+
## Modules
32+
33+
| Name | Source | Version |
34+
|------|--------|---------|
35+
| iam_assumable_roles_with_saml | ../../modules/iam-assumable-roles-with-saml | |
36+
| iam_assumable_roles_with_saml_custom | ../../modules/iam-assumable-roles-with-saml | |
37+
| iam_assumable_roles_with_saml_second_provider | ../../modules/iam-assumable-roles-with-saml | |
38+
39+
## Resources
40+
41+
| Name |
42+
|------|
43+
| [aws_iam_saml_provider](https://registry.terraform.io/providers/hashicorp/aws/2.23/docs/resources/iam_saml_provider) |
44+
3145
## Inputs
3246

3347
No input.
@@ -45,5 +59,4 @@ No input.
4559
| readonly\_iam\_role\_arn | ARN of readonly IAM role |
4660
| readonly\_iam\_role\_name | Name of readonly IAM role |
4761
| readonly\_iam\_role\_path | Path of readonly IAM role |
48-
4962
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/iam-assumable-roles/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ Run `terraform destroy` when you don't need these resources.
2626

2727
No provider.
2828

29+
## Modules
30+
31+
| Name | Source | Version |
32+
|------|--------|---------|
33+
| iam_assumable_roles | ../../modules/iam-assumable-roles | |
34+
35+
## Resources
36+
37+
No resources.
38+
2939
## Inputs
3040

3141
No input.
@@ -46,5 +56,4 @@ No input.
4656
| readonly\_iam\_role\_name | Name of readonly IAM role |
4757
| readonly\_iam\_role\_path | Path of readonly IAM role |
4858
| readonly\_iam\_role\_requires\_mfa | Whether readonly IAM role requires MFA |
49-
5059
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/iam-group-complete/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ Run `terraform destroy` when you don't need these resources.
2828

2929
No provider.
3030

31+
## Modules
32+
33+
| Name | Source | Version |
34+
|------|--------|---------|
35+
| iam_group_complete | ../../modules/iam-group-with-assumable-roles-policy | |
36+
| iam_group_complete_with_custom_policy | ../../modules/iam-group-with-policies | |
37+
| iam_user1 | ../../modules/iam-user | |
38+
| iam_user2 | ../../modules/iam-user | |
39+
40+
## Resources
41+
42+
No resources.
43+
3144
## Inputs
3245

3346
No input.
@@ -39,5 +52,4 @@ No input.
3952
| this\_assumable\_roles | List of ARNs of IAM roles which members of IAM group can assume |
4053
| this\_group\_users | List of IAM users in IAM group |
4154
| this\_policy\_arn | Assume role policy ARN for IAM group |
42-
4355
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/iam-group-with-assumable-roles-policy/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ Run `terraform destroy` when you don't need these resources.
2929
| aws | >= 2.23 |
3030
| aws.production | >= 2.23 |
3131

32+
## Modules
33+
34+
| Name | Source | Version |
35+
|------|--------|---------|
36+
| iam_assumable_role_custom | ../../modules/iam-assumable-role | |
37+
| iam_assumable_roles_in_prod | ../../modules/iam-assumable-roles | |
38+
| iam_group_with_assumable_roles_policy_production_admin | ../../modules/iam-group-with-assumable-roles-policy | |
39+
| iam_group_with_assumable_roles_policy_production_custom | ../../modules/iam-group-with-assumable-roles-policy | |
40+
| iam_group_with_assumable_roles_policy_production_readonly | ../../modules/iam-group-with-assumable-roles-policy | |
41+
| iam_user1 | ../../modules/iam-user | |
42+
| iam_user2 | ../../modules/iam-user | |
43+
44+
## Resources
45+
46+
| Name |
47+
|------|
48+
| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/2.23/docs/data-sources/caller_identity) |
49+
3250
## Inputs
3351

3452
No input.
@@ -42,5 +60,4 @@ No input.
4260
| this\_assumable\_roles | List of ARNs of IAM roles which members of IAM group can assume |
4361
| this\_group\_users | List of IAM users in IAM group |
4462
| this\_policy\_arn | Assume role policy ARN for IAM group |
45-
4663
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/iam-group-with-policies/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ Run `terraform destroy` when you don't need these resources.
2828
|------|---------|
2929
| aws | >= 2.23 |
3030

31+
## Modules
32+
33+
| Name | Source | Version |
34+
|------|--------|---------|
35+
| iam_group_superadmins | ../../modules/iam-group-with-policies | |
36+
| iam_group_with_custom_policies | ../../modules/iam-group-with-policies | |
37+
| iam_user1 | ../../modules/iam-user | |
38+
| iam_user2 | ../../modules/iam-user | |
39+
40+
## Resources
41+
42+
| Name |
43+
|------|
44+
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/2.23/docs/data-sources/iam_policy_document) |
45+
3146
## Inputs
3247

3348
No input.
@@ -39,5 +54,4 @@ No input.
3954
| iam\_account\_id | IAM AWS account id |
4055
| this\_group\_name | IAM group name |
4156
| this\_group\_users | List of IAM users in IAM group |
42-
4357
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

0 commit comments

Comments
 (0)