alicloud_dcdn_kv

更新时间:

Provides a Dcdn Kv resource.

For information about Dcdn Kv and how to use it, see What is Kv.

-> NOTE: Available since v1.198.0.

Example Usage

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
}

Argument Reference

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).

Attributes Reference

The following attributes are exported:

  • id - The key of the resource supplied above.The value is formulated as <namespace>:<key>.

Timeouts

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.

Import

Dcdn Kv can be imported using the id, e.g.

$ terraform import alicloud_dcdn_kv.example <namespace>:<key>