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

h2_prioritization: "cannot be set as it is read only" #559

Closed
stractenberg-newell opened this issue Dec 11, 2019 · 6 comments
Closed

h2_prioritization: "cannot be set as it is read only" #559

stractenberg-newell opened this issue Dec 11, 2019 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@stractenberg-newell
Copy link

stractenberg-newell commented Dec 11, 2019

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v0.12.12
provider.cloudflare v2.2.0

Affected Resource(s)

  • cloudflare_zone_settings_override

Terraform Configuration Files

zone.tf:

provider "cloudflare" {
  version    = "~> 2.0"
  email      = "${var.cloudflare_email}"
  api_key    = "${var.cloudflare_token}"
  account_id = "${var.account_id}"
}

terraform {
  required_version = "~> 0.12.0"

  backend "remote" {
    hostname     = "app.terraform.io"
    organization = "<redacted>"

    workspaces {
      name = "<redacted>"
    }
  }
}

# Create the zone
resource "cloudflare_zone" "zone" {
  zone = "${var.zone}.com"
  plan = "enterprise"
  type = "partial"
}

vars.tf

variable "cloudflare_email" {}

variable "cloudflare_token" {}

variable "zone" {}

variable "account_id" {}

settings.tf

resource "cloudflare_zone_settings_override" "zone" {
  zone_id = "${cloudflare_zone.zone.id}"

  settings {
    always_use_https            = "on"
    waf                         = "on"
    http2                       = "on"
    min_tls_version             = "1.2"
    brotli                      = "on"
    polish                      = "lossless"
    webp                        = "on"
    security_level              = "high"
    opportunistic_encryption    = "on"
    automatic_https_rewrites    = "on"
    ssl                         = "full"
    sort_query_string_for_cache = "on"
    always_online               = "off"
    h2_prioritization           = "on"
    minify {
      css  = "on"
      js   = "on"
      html = "on"
    }
  }
}
...

Debug Output

https://gist.github.com/stractenberg-newell/31f1a37c4b46f58668b2a726294cf351

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

It should enable "Enhanced HTTP/2 Prioritization"

Actual Behavior

Error: invalid zone setting "h2_prioritization" (value: on) found - cannot be set as it is read only

  on settings.tf line 2, in resource "cloudflare_zone_settings_override" "zone":
   2: resource "cloudflare_zone_settings_override" "zone" {

Steps to Reproduce

  1. Set h2_prioritization = "on"
  2. terraform apply

Important Factoids

I've reproduced this on several CF zones. If I manually turn Enhanced HTTP/2 Prioritization on via the console, then turn it off again, Terraform is then able to enable it. But it can't do it the first time by itself.

References

n/a

@jacobbednarz
Copy link
Member

What version of the Cloudflare provider are you using?

@stractenberg-newell
Copy link
Author

provider.cloudflare v2.2.0

@inamg
Copy link

inamg commented Jan 6, 2020

happened with me as well. strangely re applying works

@stractenberg-newell
Copy link
Author

I can rerun 'terraform apply' over and over and it will never succeed for me. Until I manually enable/disable it in the CF console. Had to do this again just now (and will need to 9 more times next week)...

@jbergknoff-rival
Copy link

I'm also seeing this with v2.3.0 of the provider and a definition like this, which doesn't make any reference to h2_prioritization:

resource "cloudflare_zone_settings_override" "waf" {
  zone_id = var.zone_id

  settings {
    waf = var.waf_enabled ? "on" : "off"
  }
}

@patryk
Copy link
Contributor

patryk commented Apr 17, 2020

The issue should be fixed upstream. Please re-open if still occurs.

@patryk patryk closed this as completed Apr 17, 2020
@patryk patryk added kind/bug Categorizes issue or PR as related to a bug. upstream labels Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

5 participants