diff --git a/tencentcloud/resource_tc_monitor_tmp_cvm_agent.go b/tencentcloud/resource_tc_monitor_tmp_cvm_agent.go index 6fb4e8ffe9..4577a30499 100644 --- a/tencentcloud/resource_tc_monitor_tmp_cvm_agent.go +++ b/tencentcloud/resource_tc_monitor_tmp_cvm_agent.go @@ -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 @@ -54,6 +54,12 @@ func resourceTencentCloudMonitorTmpCvmAgent() *schema.Resource { ForceNew: true, Description: "Agent name.", }, + + "agent_id": { + Type: schema.TypeString, + Computed: true, + Description: "Agent id.", + }, }, } } @@ -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 } diff --git a/website/docs/r/monitor_tmp_cvm_agent.html.markdown b/website/docs/r/monitor_tmp_cvm_agent.html.markdown index 323d2b7566..172b908a26 100644 --- a/website/docs/r/monitor_tmp_cvm_agent.html.markdown +++ b/website/docs/r/monitor_tmp_cvm_agent.html.markdown @@ -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 ```