Skip to content

Commit

Permalink
feat: add new force_delete variable (defaults to true) (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
jor2 authored Oct 3, 2023
1 parent 236753a commit 6cfaf61
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You need the following permissions to run this module.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.49.0 |
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.58.0 |

### Modules

Expand All @@ -67,6 +67,7 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_endpoint_type"></a> [endpoint\_type](#input\_endpoint\_type) | The type of endpoint to be used for creating keys. Accepts 'public' or 'private' | `string` | `"public"` | no |
| <a name="input_force_delete"></a> [force\_delete](#input\_force\_delete) | Set to `true` if you wish to force delete the kms key rings, else `false`. | `bool` | `true` | no |
| <a name="input_instance_id"></a> [instance\_id](#input\_instance\_id) | The KMS instance GUID | `string` | n/a | yes |
| <a name="input_key_ring_id"></a> [key\_ring\_id](#input\_key\_ring\_id) | The ID that identifies the Key Ring. Each ID is unique within the given KMS instance but is not reserved across the KMS service | `string` | n/a | yes |

Expand Down
2 changes: 1 addition & 1 deletion examples/default/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
ibm = {
source = "IBM-Cloud/ibm"
version = "1.49.0"
version = "1.58.0"
}
}
}
2 changes: 1 addition & 1 deletion examples/existing-kms/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
ibm = {
source = "IBM-Cloud/ibm"
version = "1.49.0"
version = "1.58.0"
}
}
}
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ resource "ibm_kms_key_rings" "key_ring" {
endpoint_type = var.endpoint_type
instance_id = var.instance_id
key_ring_id = var.key_ring_id
force_delete = var.force_delete
}
18 changes: 16 additions & 2 deletions module-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
"immutable": true,
"computed": true
},
"force_delete": {
"name": "force_delete",
"type": "bool",
"description": "Set to `true` if you wish to force delete the kms key rings, else `false`.",
"default": true,
"source": [
"ibm_kms_key_rings.key_ring.force_delete"
],
"pos": {
"filename": "variables.tf",
"line": 20
}
},
"instance_id": {
"name": "instance_id",
"type": "string",
Expand Down Expand Up @@ -44,7 +57,7 @@
],
"pos": {
"filename": "variables.tf",
"line": 20
"line": 26
},
"immutable": true,
"min_length": 2,
Expand All @@ -71,7 +84,7 @@
"ibm": {
"source": "IBM-Cloud/ibm",
"version_constraints": [
"\u003e= 1.49.0"
"\u003e= 1.58.0"
]
}
},
Expand All @@ -82,6 +95,7 @@
"name": "key_ring",
"attributes": {
"endpoint_type": "endpoint_type",
"force_delete": "force_delete",
"instance_id": "instance_id",
"key_ring_id": "key_ring_id"
},
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ variable "instance_id" {
description = "The KMS instance GUID"
}

variable "force_delete" {
type = bool
description = "Set to `true` if you wish to force delete the kms key rings, else `false`."
default = true
}

variable "key_ring_id" {
type = string
description = "The ID that identifies the Key Ring. Each ID is unique within the given KMS instance but is not reserved across the KMS service"
Expand Down
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
# Use "greater than or equal to" range in modules
ibm = {
source = "IBM-Cloud/ibm"
version = ">= 1.49.0"
version = ">= 1.58.0"
}
}
}

0 comments on commit 6cfaf61

Please sign in to comment.