Skip to content

Commit

Permalink
Merge pull request #202 from terraform-providers/detach_ls
Browse files Browse the repository at this point in the history
Detach logical switch before deleting it
  • Loading branch information
annakhm authored Nov 14, 2019
2 parents 5311a6c + 9eb307d commit 718f43e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BUG FIXES:
* `resource/nsxt_logical_router_downlink_port`: Fix crash that happened during import with specific configuration ([#193](https://github.com/terraform-providers/terraform-provider-nsxt/pull/193))
* `resource/nsxt_logical_router_link_port_on_tier1`: Fix crash that happened during import with specific configuration ([#193](https://github.com/terraform-providers/terraform-provider-nsxt/pull/193))
* `resource/nsxt_*_switching_profile`: Fix update error that occured in some cases due to omitted revision ([#201](https://github.com/terraform-providers/terraform-provider-nsxt/pull/201))
* `resource/nsxt_logical_switch`: On delete operation, detach logical switch in order to avoid possible dependency errors ([#202](https://github.com/terraform-providers/terraform-provider-nsxt/pull/202))

## 1.1.1 (August 05, 2019)

Expand Down
1 change: 1 addition & 0 deletions nsxt/resource_nsxt_logical_switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ func resourceNsxtLogicalSwitchDelete(d *schema.ResourceData, m interface{}) erro

localVarOptionals := make(map[string]interface{})
localVarOptionals["cascade"] = true
localVarOptionals["detach"] = true
resp, err := nsxClient.LogicalSwitchingApi.DeleteLogicalSwitch(nsxClient.Context, id, localVarOptionals)
if err != nil {
return fmt.Errorf("Error during LogicalSwitch delete: %v", err)
Expand Down

0 comments on commit 718f43e

Please sign in to comment.