Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/tdmq_rabbitmq #2510

Merged
merged 7 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/2510.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:enhancement
resource/tencentcloud_tdmq_rabbitmq_vip_instance: Adapt to imported resources
```

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ func ResourceTencentCloudTdmqRabbitmqVipInstance() *schema.Resource {
Read: resourceTencentCloudTdmqRabbitmqVipInstanceRead,
Update: resourceTencentCloudTdmqRabbitmqVipInstanceUpdate,
Delete: resourceTencentCloudTdmqRabbitmqVipInstanceDelete,

Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
"zone_ids": {
Required: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,13 @@ resource "tencentcloud_tdmq_rabbitmq_vip_instance" "example" {
auto_renew_flag = true
time_span = 1
}
```
```

Import

tdmq rabbitmq_vip_instance can be imported using the id, e.g.

```
terraform import tencentcloud_tdmq_rabbitmq_vip_instance.example amqp-mok52gmn
```

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ func TestAccTencentCloudTdmqRabbitmqVipInstanceResource_basic(t *testing.T) {
resource.TestCheckResourceAttrSet("tencentcloud_tdmq_rabbitmq_vip_instance.example", "id"),
),
},
{
ResourceName: "tencentcloud_tdmq_rabbitmq_vip_instance.template",
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccTdmqRabbitmqVipInstanceUpdate,
Check: resource.ComposeTestCheckFunc(
Expand Down
8 changes: 8 additions & 0 deletions website/docs/r/tdmq_rabbitmq_vip_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,11 @@ In addition to all arguments above, the following attributes are exported:



## Import

tdmq rabbitmq_vip_instance can be imported using the id, e.g.

```
terraform import tencentcloud_tdmq_rabbitmq_vip_instance.example amqp-mok52gmn
```

Loading