Skip to content

Commit

Permalink
[ignore] Set id to site id to avoid change in id behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
akinross authored and lhercot committed Nov 11, 2024
1 parent f5575a0 commit 1cc6d93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mso/resource_mso_schema_site.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ func resourceMSOSchemaSiteImport(d *schema.ResourceData, m interface{}) ([]*sche
apiTemplate := models.StripQuotes(tempCont.S("templateName").String())

if apiSiteId == stateSiteId && apiTemplate == template {
d.SetId(fmt.Sprintf("%s/sites/%s-%s", schemaId, stateSiteId, template))
// d.SetId(fmt.Sprintf("%s/sites/%s-%s", schemaId, stateSiteId, template))
d.SetId(apiSiteId)
d.Set("schema_id", schemaId)
d.Set("site_id", apiSiteId)
d.Set("template_name", apiTemplate)
Expand Down Expand Up @@ -184,7 +185,8 @@ func resourceMSOSchemaSiteRead(d *schema.ResourceData, m interface{}) error {
apiTemplate := models.StripQuotes(tempCont.S("templateName").String())

if apiSiteId == stateSiteId && apiTemplate == stateTemplate {
d.SetId(fmt.Sprintf("%s/sites/%s-%s", schemaId, stateSiteId, stateTemplate))
// d.SetId(fmt.Sprintf("%s/sites/%s-%s", schemaId, stateSiteId, stateTemplate))
d.SetId(apiSiteId)
d.Set("schema_id", schemaId)
d.Set("site_id", apiSiteId)
d.Set("template_name", apiTemplate)
Expand Down

0 comments on commit 1cc6d93

Please sign in to comment.