generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
26 changed files
with
435 additions
and
168 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
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,8 +1,10 @@ | ||
# Default example | ||
# End to end example with default values | ||
|
||
An end-to-end example that uses the module's default variable values. | ||
This example uses the IBM Cloud terraform provider to: | ||
- Create a new resource group if one is not passed in. | ||
- Create a new VPC in the resource group and region provided. | ||
- Create a new Key Protect instance in the Resource Group. | ||
- Create a new Root Key in the Key Protect instance. | ||
- Create a new Standard Key in the Key Protect instance. | ||
|
||
<!-- Add your example and link to it from the module's main readme file. --> |
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
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,3 +1,35 @@ | ||
/******************************************************************** | ||
This file is used to implement the ROOT module. | ||
*********************************************************************/ | ||
############################################################################## | ||
# Key Protect Key module | ||
############################################################################## | ||
|
||
resource "ibm_kms_key" "key" { | ||
instance_id = var.key_protect_instance_id | ||
key_name = var.key_name | ||
key_ring_id = var.key_protect_key_ring_id | ||
standard_key = var.standard_key | ||
endpoint_type = var.endpoint_type | ||
force_delete = var.force_delete | ||
} | ||
|
||
resource "ibm_kms_key_policies" "root_key_policy" { | ||
count = var.standard_key ? 0 : 1 | ||
endpoint_type = var.endpoint_type | ||
instance_id = var.key_protect_instance_id | ||
key_id = ibm_kms_key.key.key_id | ||
rotation { | ||
interval_month = var.rotation_interval_month | ||
} | ||
dual_auth_delete { | ||
enabled = var.dual_auth_delete_enabled | ||
} | ||
} | ||
|
||
resource "ibm_kms_key_policies" "standard_key_policy" { | ||
count = var.standard_key ? 1 : 0 | ||
endpoint_type = var.endpoint_type | ||
instance_id = var.key_protect_instance_id | ||
key_id = ibm_kms_key.key.key_id | ||
dual_auth_delete { | ||
enabled = var.dual_auth_delete_enabled | ||
} | ||
} |
Oops, something went wrong.