Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 11 additions & 1 deletion tencentcloud/resource_tc_monitor_tmp_cvm_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Import

monitor tmpCvmAgent can be imported using the id, e.g.
```
$ terraform import tencentcloud_monitor_tmp_cvm_agent.tmpCvmAgent tmpCvmAgent_id
$ terraform import tencentcloud_monitor_tmp_cvm_agent.tmpCvmAgent instance_id#agent_id
```
*/
package tencentcloud
Expand Down Expand Up @@ -54,6 +54,12 @@ func resourceTencentCloudMonitorTmpCvmAgent() *schema.Resource {
ForceNew: true,
Description: "Agent name.",
},

"agent_id": {
Type: schema.TypeString,
Computed: true,
Description: "Agent id.",
},
},
}
}
Expand Down Expand Up @@ -136,6 +142,10 @@ func resourceTencentCloudMonitorTmpCvmAgentRead(d *schema.ResourceData, meta int
_ = d.Set("name", tmpCvmAgent.Name)
}

if tmpCvmAgent.AgentId != nil {
_ = d.Set("agent_id", tmpCvmAgent.AgentId)
}

return nil
}

Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/monitor_tmp_cvm_agent.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ The following arguments are supported:
In addition to all arguments above, the following attributes are exported:

* `id` - ID of the resource.

* `agent_id` - Agent id.


## Import

monitor tmpCvmAgent can be imported using the id, e.g.
```
$ terraform import tencentcloud_monitor_tmp_cvm_agent.tmpCvmAgent tmpCvmAgent_id
$ terraform import tencentcloud_monitor_tmp_cvm_agent.tmpCvmAgent instance_id#agent_id
```