Skip to content

Commit 8408c6c

Browse files
Upgraded to 5.x compatibility + Added square brackets to list items r… (#6)
* Upgraded to 5.x compatibility + Added square brackets to list items requirement * Removed join statement and added if statement to output
1 parent ebdf3dd commit 8408c6c

File tree

9 files changed

+64
-22
lines changed

9 files changed

+64
-22
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
3+
rev: v4.4.0
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=500']
7-
- id: check-executables-have-shebangs
87
- id: pretty-format-json
98
args: ['--autofix', '--no-sort-keys', '--indent=2']
109
- id: check-byte-order-marker
@@ -17,8 +16,8 @@ repos:
1716
- id: detect-aws-credentials
1817
args: ['--allow-missing-credentials']
1918
- id: trailing-whitespace
20-
- repo: git://github.com/antonbabenko/pre-commit-terraform
21-
rev: v1.50.0
19+
- repo: https://github.com/antonbabenko/pre-commit-terraform
20+
rev: v1.81.0
2221
hooks:
2322
- id: terraform_fmt
2423
- id: terraform_docs

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
55
<a name="unreleased"></a>
66
## [Unreleased]
77

8-
- Add new parameter 'bypass_policy_lockout_safety_check'
8+
- Upgraded to 5.x compatibility + Added square brackets to list items requirement
9+
10+
11+
<a name="2.0.0"></a>
12+
## [2.0.0] - 2021-08-18
13+
14+
- Add new feature - 'bypass_policy_lockout_safety_check' ([#4](https://github.com/umotif-public/terraform-aws-kms/issues/4))
915

1016

1117
<a name="1.0.3"></a>
@@ -37,7 +43,8 @@ All notable changes to this project will be documented in this file.
3743
- Initial commit
3844

3945

40-
[Unreleased]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.3...HEAD
46+
[Unreleased]: https://github.com/umotif-public/terraform-aws-kms/compare/2.0.0...HEAD
47+
[2.0.0]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.3...2.0.0
4148
[1.0.3]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.2...1.0.3
4249
[1.0.2]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.1...1.0.2
4350
[1.0.1]: https://github.com/umotif-public/terraform-aws-kms/compare/1.0.0...1.0.1

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,14 @@ Module is to be used with Terraform > 0.12.
3838

3939
## Authors
4040

41-
Module managed by [Marcin Cuber](https://github.com/marcincuber) ([LinkedIn](https://www.linkedin.com/in/marcincuber/)).\
42-
Module managed by [Abdul Wahid](https://github.com/Ohid25) ([LinkedIn](https://www.linkedin.com/in/abdul-wahid/)).\
43-
Module managed by [Sean Pascual](https://github.com/seanpascual) ([LinkedIn](https://www.linkedin.com/in/sean-edward-pascual/)).
41+
Module managed by [uMotif](https://github.com/umotif-public/).
4442

4543
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
4644
## Requirements
4745

4846
| Name | Version |
4947
|------|---------|
50-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12.31 |
48+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.11 |
5149
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.53.0 |
5250

5351
## Providers

examples/core/.terraform.lock.hcl

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/core/main.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
provider "aws" {
2-
region = "eu-west-1"
3-
}
4-
51
module "kms" {
62
source = "../.."
73

examples/core/versions.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
terraform {
2+
required_version = "1.0.11"
3+
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = "~> 5"
8+
}
9+
}
10+
}
11+
12+
provider "aws" {
13+
region = "eu-west-1"
14+
}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resource "aws_kms_alias" "main" {
1616
count = var.enabled ? 1 : 0
1717

1818
name = "alias/${var.alias_name}"
19-
target_key_id = join("", aws_kms_key.main.*.id)
19+
target_key_id = aws_kms_key.main[0].id
2020

2121
depends_on = [
2222
aws_kms_key.main

outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
output "key_arn" {
2-
value = join("", aws_kms_key.main.*.arn)
2+
value = var.enabled ? aws_kms_key.main[0].arn : null
33
description = "KMS Key ARN."
44
}
55

66
output "key_id" {
7-
value = join("", aws_kms_key.main.*.key_id)
7+
value = aws_kms_key.main[0].key_id
88
description = "KMS Key ID."
99
}
1010

1111
output "alias_arn" {
12-
value = join("", aws_kms_alias.main.*.arn)
12+
value = var.enabled ? aws_kms_alias.main[0].arn : null
1313
description = "KMS Key Alias ARN."
1414
}
1515

1616
output "alias_name" {
17-
value = join("", aws_kms_alias.main.*.name)
17+
value = var.enabled ? aws_kms_alias.main[0].name : null
1818
description = "KMS Key Alias name."
1919
}

versions.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
terraform {
2-
required_version = ">= 0.12.31"
2+
required_version = ">= 1.0.11"
33

44
required_providers {
5-
aws = ">= 3.53.0"
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = ">= 3.53.0"
8+
}
69
}
7-
}
10+
}

0 commit comments

Comments
 (0)