cloudflare / terraform-provider-cloudflare

Cloudflare Terraform Provider
https://registry.terraform.io/providers/cloudflare/cloudflare
Mozilla Public License 2.0
759 stars 585 forks source link

Error: missing expected { when upgrading spectrum applications to 4.x #2827

Closed haus closed 11 months ago

haus commented 11 months ago

Confirmation

Terraform and Cloudflare provider version

terraform version 1.5.7 cloudflare provider v 3.35.0 and 4.16.0

Affected resource(s)

spectrum_application

Terraform configuration files

resource "cloudflare_spectrum_application" "spectrum_tcp_443_app" {
  argo_smart_routing = false
  ip_firewall        = false
  origin_direct      = ["tcp://34.69.173.224:443"]
  protocol           = "tcp/443
  proxy_protocol     = "off"
  tls                = "off"
  traffic_type       = "https"
  zone_id            = # valid zone id

  edge_ips {
    type = "static"
    ips = [1.1.1.1] # BYOIP IPv4 Address
  }

  dns {
    name = "spectrum.foo.com"
    type = "ADDRESS"
  }
}

Link to debug output

no

Panic output

No response

Expected output

A valid plan

Actual output

Lots of errors in the plan about error: missing expected { and


Error decoding
"cloudflare_spectrum_application.staging_cloud_collector_tcp_443" from prior
state: unsupported attribute "edge_ip_connectivity"

Steps to reproduce

Have spectrum applications using BYOIP edge IPs on v3.35.0 and try to upgrade to v4.16.0

Additional factoids

No response

References

No response

github-actions[bot] commented 11 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 11 months ago

Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key, X-Auth-Email and Authorization HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.

This issue has been marked with triage/needs-information and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.

haus commented 11 months ago

I don't have the ability to grab TL_LOG=debug output unfortunately, though I can provide snippets of the errors we are seeing.

2023-10-09T23:07:36.523Z [ERROR] provider.terraform-provider-cloudflare_v4.16.0: Response contains error diagnostic: @module=sdk.proto diagnostic_attribute=AttributeName("edge_ips").ElementKeyInt(0) tf_proto_version=6.4 tf_provider_addr=registry.terraform.io/cloudflare/cloudflare tf_req_id=c47cd19e-471e-0bf7-03ec-09f7b4d36c46 tf_resource_type=cloudflare_spectrum_application diagnostic_detail= diagnostic_summary="missing expected {" tf_rpc=UpgradeResourceState @caller=github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov6/internal/diag/diagnostics.go:58 diagnostic_severity=ERROR timestamp=2023-10-09T23:07:36.523Z
2023-10-09T23:07:36.523Z [ERROR] vertex "cloudflare_spectrum_application.staging_collectors_tcp_443" error: missing expected {
2023-10-09T23:07:36.523Z [ERROR] vertex "cloudflare_spectrum_application.staging_collectors_tcp_443 (expand)" error: missing expected {
jacobbednarz commented 11 months ago

without debug logs, there is very little we can assist with here so here is some general advice.

if these don't help, please open an issue with the output of the debug logs and we can take a deeper look as without them it's not clear what state everything is in and attempting to move towards.