Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Updated to support Terraform 0.13 also #103

Merged
merged 1 commit into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ repos:
hooks:
- id: terraform_fmt
- id: terraform_docs
- id: terraform_tflint
args:
- '--args=--only=terraform_deprecated_interpolation'
- '--args=--only=terraform_deprecated_index'
- '--args=--only=terraform_unused_declarations'
- '--args=--only=terraform_comment_syntax'
- '--args=--only=terraform_documented_outputs'
- '--args=--only=terraform_documented_variables'
- '--args=--only=terraform_typed_variables'
- '--args=--only=terraform_module_pinned_source'
- '--args=--only=terraform_naming_convention'
- '--args=--only=terraform_required_version'
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ These types of resources are supported:

## Terraform versions

Terraform 0.12. Pin module version to `~> v2.0`. Submit pull-requests to `master` branch.
Terraform 0.12 or newer. Pin module version to `~> v2.0`. Submit pull-requests to `master` branch.

Terraform 0.11. Pin module version to `~> v1.0`. Submit pull-requests to `terraform011` branch.

Expand Down Expand Up @@ -117,7 +117,6 @@ module "iam_assumable_roles_with_saml" {

create_readonly_role = true

provider_name = "idp_saml"
provider_id = "arn:aws:iam::235367859851:saml-provider/idp_saml"
}
```
Expand Down
5 changes: 4 additions & 1 deletion examples/iam-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-account/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
5 changes: 4 additions & 1 deletion examples/iam-assumable-role-with-oidc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-assumable-role-with-oidc/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
5 changes: 4 additions & 1 deletion examples/iam-assumable-role/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-assumable-role/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
7 changes: 5 additions & 2 deletions examples/iam-assumable-roles-with-saml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

| Name | Version |
|------|---------|
| aws | n/a |
| aws | >= 2.23 |

## Inputs

Expand Down
6 changes: 2 additions & 4 deletions examples/iam-assumable-roles-with-saml/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ module "iam_assumable_roles_with_saml" {

create_readonly_role = true

provider_name = aws_iam_saml_provider.idp_saml.name
provider_id = aws_iam_saml_provider.idp_saml.id
provider_id = aws_iam_saml_provider.idp_saml.id
}

#################################################################
Expand All @@ -35,6 +34,5 @@ module "iam_assumable_roles_with_saml_custom" {
poweruser_role_name = "Billing-And-Support-Access"
poweruser_role_policy_arns = ["arn:aws:iam::aws:policy/job-function/Billing", "arn:aws:iam::aws:policy/AWSSupportAccess"]

provider_name = aws_iam_saml_provider.idp_saml.name
provider_id = aws_iam_saml_provider.idp_saml.id
provider_id = aws_iam_saml_provider.idp_saml.id
}
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-assumable-roles-with-saml/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
5 changes: 4 additions & 1 deletion examples/iam-assumable-roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-assumable-roles/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
5 changes: 4 additions & 1 deletion examples/iam-group-complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-group-complete/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
9 changes: 6 additions & 3 deletions examples/iam-group-with-assumable-roles-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

| Name | Version |
|------|---------|
| aws | n/a |
| aws.production | n/a |
| aws | >= 2.23 |
| aws.production | >= 2.23 |

## Inputs

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-group-with-assumable-roles-policy/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
7 changes: 5 additions & 2 deletions examples/iam-group-with-policies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

| Name | Version |
|------|---------|
| aws | n/a |
| aws | >= 2.23 |

## Inputs

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-group-with-policies/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
7 changes: 5 additions & 2 deletions examples/iam-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

| Name | Version |
|------|---------|
| aws | n/a |
| aws | >= 2.23 |

## Inputs

Expand Down
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-policy/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23"
}
}
13 changes: 8 additions & 5 deletions examples/iam-user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ Run `terraform destroy` when you don't need these resources.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.50 |

## Providers

Expand All @@ -32,10 +35,10 @@ No input.

| Name | Description |
|------|-------------|
| keybase\_password\_decrypt\_command | n/a |
| keybase\_password\_pgp\_message | n/a |
| keybase\_secret\_key\_decrypt\_command | n/a |
| keybase\_secret\_key\_pgp\_message | n/a |
| keybase\_password\_decrypt\_command | Decrypt user password command |
| keybase\_password\_pgp\_message | Encrypted password |
| keybase\_secret\_key\_decrypt\_command | Decrypt access secret key command |
| keybase\_secret\_key\_pgp\_message | Encrypted access secret key |
| pgp\_key | PGP key used to encrypt sensitive data for this user (if empty - secrets are not encrypted) |
| this\_iam\_access\_key\_encrypted\_secret | The encrypted secret, base64 encoded |
| this\_iam\_access\_key\_id | The access key ID |
Expand Down
12 changes: 8 additions & 4 deletions examples/iam-user/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,21 @@ output "pgp_key" {
}

output "keybase_password_decrypt_command" {
value = module.iam_user.keybase_password_decrypt_command
description = "Decrypt user password command"
value = module.iam_user.keybase_password_decrypt_command
}

output "keybase_password_pgp_message" {
value = module.iam_user.keybase_password_pgp_message
description = "Encrypted password"
value = module.iam_user.keybase_password_pgp_message
}

output "keybase_secret_key_decrypt_command" {
value = module.iam_user.keybase_secret_key_decrypt_command
description = "Decrypt access secret key command"
value = module.iam_user.keybase_secret_key_decrypt_command
}

output "keybase_secret_key_pgp_message" {
value = module.iam_user.keybase_secret_key_pgp_message
description = "Encrypted access secret key"
value = module.iam_user.keybase_secret_key_pgp_message
}
Empty file added examples/iam-user/variables.tf
Empty file.
7 changes: 7 additions & 0 deletions examples/iam-user/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.50"
}
}
6 changes: 3 additions & 3 deletions modules/iam-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ Import successful!

| Name | Version |
|------|---------|
| terraform | >= 0.12.6, < 0.14 |
| aws | >= 2.23, < 4.0 |
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.23, < 4.0 |
| aws | >= 2.23 |

## Inputs

Expand Down
4 changes: 2 additions & 2 deletions modules/iam-account/versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_version = ">= 0.12.6, < 0.14"
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23, < 4.0"
aws = ">= 2.23"
}
}
8 changes: 4 additions & 4 deletions modules/iam-assumable-role-with-oidc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ This module supports IAM Roles for kubernetes service accounts as described in t

| Name | Version |
|------|---------|
| terraform | >= 0.12.6, < 0.14 |
| aws | >= 2.23, < 4.0 |
| terraform | >= 0.12.6 |
| aws | >= 2.23 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.23, < 4.0 |
| aws | >= 2.23 |

## Inputs

Expand All @@ -32,8 +32,8 @@ This module supports IAM Roles for kubernetes service accounts as described in t
| oidc\_subjects\_with\_wildcards | The OIDC subject using wildcards to be added to the role policy | `set(string)` | `[]` | no |
| provider\_url | URL of the OIDC Provider. Use provider\_urls to specify several URLs. | `string` | `""` | no |
| provider\_urls | List of URLs of the OIDC Providers | `list(string)` | `[]` | no |
| role\_name | IAM role name | `string` | `""` | no |
| role\_description | IAM Role description | `string` | `""` | no |
| role\_name | IAM role name | `string` | `""` | no |
| role\_path | Path of IAM role | `string` | `"/"` | no |
| role\_permissions\_boundary\_arn | Permissions boundary ARN to use for IAM role | `string` | `""` | no |
| role\_policy\_arns | List of ARNs of IAM policies to attach to IAM role | `list(string)` | `[]` | no |
Expand Down
4 changes: 2 additions & 2 deletions modules/iam-assumable-role-with-oidc/versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_version = ">= 0.12.6, < 0.14"
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.23, < 4.0"
aws = ">= 2.23"
}
}
Loading