Provides a Dcdn Kv resource.
For information about Dcdn Kv and how to use it, see What is Kv.
Basic Usage
variable "name" {
default = "terraform-example"
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_dcdn_kv_namespace" "default" {
description = var.name
namespace = "${var.name}-${random_integer.default.result}"
}
resource "alicloud_dcdn_kv" "default" {
value = "example-value"
key = "${var.name}-${random_integer.default.result}"
namespace = alicloud_dcdn_kv_namespace.default.namespace
}
The following arguments are supported:
key
- (Required, ForceNew) The name of the key to Put, the longest 512, cannot contain spaces.namespace
- (Required, ForceNew) The name specified when the customer calls PutDcdnKvNamespace.value
- (Required) The content of key, up to 2M(210001000).The following attributes are exported:
id
- The key
of the resource supplied above.The value is formulated as <namespace>:<key>
.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Kv.delete
- (Defaults to 5 mins) Used when delete the Kv.update
- (Defaults to 5 mins) Used when update the Kv.Dcdn Kv can be imported using the id, e.g.
$ terraform import alicloud_dcdn_kv.example <namespace>:<key>