Terraform modules to create and work with IBM Key Management Service
The supported modules are
module "kms_key" {
source = "../../modules/key-protect"
is_kp_instance_exist = false
resource_group_id = data.ibm_resource_group.resource_group.id
service_name = var.service_name
location = var.location
plan = "tiered-pricing"
tags = var.tags
allowed_network_policy = var.allowed_network_policy
key_name = var.key_name
standard_key_type = var.standard_key_type
force_delete = var.force_delete
network_access_allowed = var.network_access_allowed
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
resource_group | Name of the resource group | string |
n/a | yes |
service_name | A descriptive name used to identify the resource instance | string |
n/a | yes |
location | Target location or environment to create the resource instance | string |
n/a | yes |
tags | Tags for the KMS Instance | set |
n/a | no |
allowed_network_policy | Types of the service endpoints. | string |
n/a | no |
kms_instance_guid | GUID of the Instance | string |
n/a | yes |
key_name | Name of the Key | string |
n/a | yes |
standard_key_type | Determines if it has to be a standard key or root key | bool |
false | no |
force_delete | Determines if it has to be force deleted | bool |
false | no |
network_access_allowed | public or private | string |
public |
no |
NOTE: If we want to make use of a particular version of module, then set the argument "version" to respective module version
Initialising Provider
Make sure you declare a required providers ibm block to make use of IBM-Cloud Terraform Provider
terraform {
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "<version>" // Specify the version
}
}
}
terraform init
terraform plan
terraform apply
Run terraform destroy
when you don't need these resources.
- All optional fields are given value
null
in varaible.tf file. User can configure the same by overwriting with appropriate values. - Provide
version
attribute in terraform block in versions.tf file to use specific version of terraform provider.