Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description field on resources not parsing/ignoring certain unicode symbols #771

Closed
c-ameron opened this issue Aug 17, 2020 · 2 comments
Closed

Comments

@c-ameron
Copy link

c-ameron commented Aug 17, 2020

Hi, it looks like the API is storing the description for resources in unicode, and its not being properly translated (or ignored) in Terraform. Could we maybe ignore certain symbols on a diff? Thanks!

Terraform Version

Terraform v0.12.28
provider.cloudflare v2.9.0

Affected Resource(s)

  • cloudflare_firewall_rule
  • cloudflare_filter

Terraform Configuration Files

resource "cloudflare_filter" "botnet_le_10" {
  zone_id    = "yy"
  description = "Botnet Score < 10"
  expression = "(cf.bot_management.score lt 10)"
}

resource "cloudflare_firewall_rule" "botnet_lt_10" {
  zone_id     = "yy"
  description = "Botnet Score < 10"
  filter_id   = cloudflare_filter.botnet_le_10.id
  action      = "log"
}

Expected Behavior

No change after creation

Actual Behavior

Upon successful creation, apply again and you'll always get the diff

  # cloudflare_firewall_rule.botnet_lt_10 will be updated in-place
~ resource "cloudflare_firewall_rule" "botnet_lt_10" {
        action      = "log"
      ~ description = "Botnet Score &lt; 10" -> "Botnet Score < 10"
        filter_id   = "123"
        id          = "xx"
        paused      = false
        products    = []
        zone_id     = "yy"
    }

  # cloudflare_filter.botnet_lt_10 will be updated in-place
~ resource "cloudflare_filter" "botnet_lt_10" {
      ~ description =  "Botnet Score &lt; 10" -> "Botnet Score < 10"
        expression  = "(cf.bot_management.score lt 10)"
        id          = "xx"
        paused      = false
        zone_id     = "yy"
    }

Steps to Reproduce

  1. terraform apply

Important Factoids

I'm seeing from the API a similar issue with symbols being stored as "description": "Botnet Score \u0026lt; 10"

I know I can ignore it with an ignore_changes block but thought I'd create a ticket anyway for visibility. Thanks!!

@jacobbednarz
Copy link
Member

This was fixed in #758 and is pending a release. You're welcome to use master for now if you need it.

@c-ameron
Copy link
Author

Ah awesome! great timing, thanks!! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants