terraform-providers / terraform-provider-opc

Terraform Oracle Public Cloud provider
https://www.terraform.io/docs/providers/opc/
Mozilla Public License 2.0
29 stars 25 forks source link

modify tags on ip_network_exchange forces new resource #76

Open scross01 opened 7 years ago

scross01 commented 7 years ago

Terraform Version

terraform v0.10.2 opc_provider v0.1.2

Affected Resource(s)

Terraform Configuration Files

resource "opc_compute_ip_network_exchange" "exchange" {
  name = "example"
  tags = [ "tag1" ]
}

Steps to Reproduce

  1. terraform apply
  2. modify tags to [ "tag1", "tag2" ]
  3. terraform plan

Expected Behavior

Tags should be updated without destroy and recreate

Actual Behavior

$ terrraform plan
...
-/+ module.opc_ip_network.opc_compute_ip_network_exchange.exchange (new resource required)
      name:   "example" => "example"
      tags.#: "1" => "2" (forces new resource)
      tags.0: "tag1" => "tag1"
      tags.1: "" => "tag2" (forces new resource)
      uri:    "https://api-z27.compute.us6.oraclecloud.com:443/network/v1/ipnetworkexchange/Compute-usorclptsc53098/stephen.cross@oracle.com/example" => "<computed>"
grubernaut commented 7 years ago

Hey @scross01, thanks for the issue!

Currently, however, it doesn't look like IP Network Exchanges support updating tags via the HTTP API, unless this is an undocumented behavior for the endpoint. https://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stcsa/api-IPNetworkExchanges.html