-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59c8ad2
commit 946056c
Showing
5 changed files
with
106 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
####---------------------------------------------------------------------------------- | ||
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS. | ||
####---------------------------------------------------------------------------------- | ||
|
||
|
||
provider "aws" { | ||
region = "eu-central-1" | ||
region = "us-east-1" | ||
} | ||
|
||
####---------------------------------------------------------------------------------- | ||
## AWS Key Management Service (AWS KMS) is a managed service that makes it easy for you to create and control the cryptographic keys that are used to protect your data. | ||
####---------------------------------------------------------------------------------- | ||
module "kms_key" { | ||
|
||
source = "./../" | ||
|
||
name = "kms" | ||
environment = "test" | ||
label_order = ["name", "environment"] | ||
|
||
deletion_window_in_days = 15 | ||
deletion_window_in_days = 7 | ||
alias = "alias/cloudtrail_Name" | ||
enabled = true | ||
multi_region = false | ||
kms_key_enabled = true | ||
multi_region = true | ||
create_replica_external_enabled = false | ||
create_replica_enabled = false | ||
create_external_enabled = false | ||
create_external_enabled = true | ||
valid_to = "2023-11-21T23:20:50Z" | ||
key_material_base64 = "Wblj06fduthWggmsT0cLVoIMOkeLbc2kVfMud77i/JY=" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
output "key_arn" { | ||
value = module.kms_key.key_arn | ||
description = "Key ARN." | ||
} | ||
|
||
output "tags" { | ||
value = module.kms_key.tags | ||
description = "A mapping of tags to assign to the KMS." | ||
} | ||
|
||
output "key_id" { | ||
value = module.kms_key.key_id | ||
description = "The globally unique identifier for the key." | ||
} | ||
|
||
output "target_key_id" { | ||
value = module.kms_key.target_key_id | ||
description = "Identifier for the key for which the alias is for, can be either an ARN or key_id." | ||
} | ||
#output "key_arn" { | ||
# value = module.kms_key.key_arn | ||
# description = "Key ARN." | ||
#} | ||
# | ||
#output "tags" { | ||
# value = module.kms_key.tags | ||
# description = "A mapping of tags to assign to the KMS." | ||
#} | ||
# | ||
#output "key_id" { | ||
# value = module.kms_key.key_id | ||
# description = "The globally unique identifier for the key." | ||
#} | ||
# | ||
#output "target_key_id" { | ||
# value = module.kms_key.target_key_id | ||
# description = "Identifier for the key for which the alias is for, can be either an ARN or key_id." | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
# Module : KMS KEY | ||
# Description : This terraform module creates a KMS Customer Master Key (CMK) and its alias. | ||
output "key_arn" { | ||
value = join("", aws_kms_key.default.*.arn) | ||
description = "Key ARN." | ||
} | ||
|
||
output "key_id" { | ||
value = join("", aws_kms_key.default.*.key_id) | ||
description = "Key ID." | ||
} | ||
|
||
output "alias_arn" { | ||
value = join("", aws_kms_alias.default.*.arn) | ||
description = "Alias ARN." | ||
} | ||
|
||
output "alias_name" { | ||
value = join("", aws_kms_alias.default.*.name) | ||
description = "Alias name." | ||
} | ||
|
||
output "tags" { | ||
value = module.labels.tags | ||
description = "A mapping of tags to assign to the resource." | ||
} | ||
|
||
output "target_key_id" { | ||
value = join("", aws_kms_alias.default.*.target_key_id) | ||
description = "Identifier for the key for which the alias is for, can be either an ARN or key_id." | ||
} | ||
## Module : KMS KEY | ||
## Description : This terraform module creates a KMS Customer Master Key (CMK) and its alias. | ||
#output "key_arn" { | ||
# value = join("", aws_kms_key.default.*.arn) | ||
# description = "Key ARN." | ||
#} | ||
# | ||
#output "key_id" { | ||
# value = join("", aws_kms_key.default.*.key_id) | ||
# description = "Key ID." | ||
#} | ||
# | ||
#output "alias_arn" { | ||
# value = join("", aws_kms_alias.default.*.arn) | ||
# description = "Alias ARN." | ||
#} | ||
# | ||
#output "alias_name" { | ||
# value = join("", aws_kms_alias.default.*.name) | ||
# description = "Alias name." | ||
#} | ||
# | ||
#output "tags" { | ||
# value = module.labels.tags | ||
# description = "A mapping of tags to assign to the resource." | ||
#} | ||
# | ||
#output "target_key_id" { | ||
# value = join("", aws_kms_alias.default.*.target_key_id) | ||
# description = "Identifier for the key for which the alias is for, can be either an ARN or key_id." | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters