alicloud_datahub_subscription

The subscription is the basic unit of resource usage in Datahub Service under Publish/Subscribe model. You can manage the relationships between user and topics by using subscriptions. Refer to details.

Example Usage

Basic Usage

variable "name" {
  default = "terraform_example"
}
resource "alicloud_datahub_project" "example" {
  name    = var.name
  comment = "created by terraform"
}

resource "alicloud_datahub_topic" "example" {
  name         = var.name
  project_name = alicloud_datahub_project.example.name
  record_type  = "BLOB"
  shard_count  = 3
  life_cycle   = 7
  comment      = "created by terraform"
}

resource "alicloud_datahub_subscription" "example" {
  project_name = alicloud_datahub_project.example.name
  topic_name   = alicloud_datahub_topic.example.name
  comment      = "created by terraform"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Datahub subscription can be imported using the ID, e.g.

$ terraform import alicloud_datahub_subscription.example tf_datahub_project:tf_datahub_topic:1539073399567UgCzY