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

requested_validity in cloudflare_origin_ca_certificate is ignored as an input #1448

Closed
2 tasks done
acchiao opened this issue Feb 12, 2022 · 6 comments
Closed
2 tasks done
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@acchiao
Copy link

acchiao commented Feb 12, 2022

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.1.5
on darwin_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v3.8.0
+ provider registry.terraform.io/digitalocean/digitalocean v2.17.1
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/tls v3.1.0
+ provider registry.terraform.io/okta/okta v3.21.0

Affected resource(s)

  • cloudflare_origin_ca_certificate

Terraform configuration files

terraform {
  required_version = "~> 1.1.5"

  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 3.8.0"
    }

    tls = {
      source  = "hashicorp/tls"
      version = "~> 3.1.0"
    }
  }
}

provider "cloudflare" {}

resource "tls_private_key" "app" {
  algorithm = "RSA"
  rsa_bits  = 2048
}

resource "tls_cert_request" "app" {
  key_algorithm   = tls_private_key.app.algorithm
  private_key_pem = tls_private_key.app.private_key_pem

  subject {
    common_name    = "Cloudflare Origin Certificate"
    street_address = []
  }
}

resource "cloudflare_origin_ca_certificate" "app" {
  csr = tls_cert_request.app.cert_request_pem

  request_type       = "origin-rsa"
  requested_validity = "730"

  hostnames = [
    "raccoon.team",
  ]
}

Debug output

$ TF_LOG=DEBUG terraform plan -out=app.plan
2022-02-13T21:58:25.101-0600 [INFO]  Terraform version: 1.1.5
2022-02-13T21:58:25.102-0600 [INFO]  Go runtime version: go1.17.6
2022-02-13T21:58:25.102-0600 [INFO]  CLI args: []string{"terraform", "plan", "-out=app.plan"}
2022-02-13T21:58:25.102-0600 [DEBUG] Attempting to open CLI config file: /Users/atlas/.terraformrc
2022-02-13T21:58:25.102-0600 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022-02-13T21:58:25.102-0600 [INFO]  Loading CLI configuration from /Users/atlas/.terraform.d/credentials.tfrc.json
2022-02-13T21:58:25.102-0600 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022-02-13T21:58:25.102-0600 [DEBUG] ignoring non-existing provider search directory /Users/atlas/.terraform.d/plugins
2022-02-13T21:58:25.102-0600 [DEBUG] ignoring non-existing provider search directory /Users/atlas/Library/Application Support/io.terraform/plugins
2022-02-13T21:58:25.102-0600 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2022-02-13T21:58:25.102-0600 [INFO]  CLI command args: []string{"plan", "-out=app.plan"}
2022-02-13T21:58:25.103-0600 [DEBUG] New state was assigned lineage "410aeb0f-8f16-6c77-bef4-b5ca43c63c42"
2022-02-13T21:58:25.194-0600 [DEBUG] checking for provisioner in "."
2022-02-13T21:58:25.208-0600 [DEBUG] checking for provisioner in "/usr/local/bin"
2022-02-13T21:58:25.208-0600 [INFO]  backend/local: starting Plan operation
2022-02-13T21:58:25.209-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:25.209-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:25.218-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 args=[.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0]
2022-02-13T21:58:25.221-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80165
2022-02-13T21:58:25.221-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0
2022-02-13T21:58:25.231-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: configuring server automatic mTLS: timestamp=2022-02-13T21:58:25.231-0600
2022-02-13T21:58:25.241-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:25.241-0600 [DEBUG] provider.terraform-provider-cloudflare_v3.8.0: plugin address: network=unix address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin3693132767 timestamp=2022-02-13T21:58:25.241-0600
2022-02-13T21:58:25.261-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:25.262-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80165
2022-02-13T21:58:25.262-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:25.262-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:25.262-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:25.270-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5]
2022-02-13T21:58:25.272-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80166
2022-02-13T21:58:25.272-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5
2022-02-13T21:58:25.280-0600 [INFO]  provider.terraform-provider-tls_v3.1.0_x5: configuring server automatic mTLS: timestamp=2022-02-13T21:58:25.280-0600
2022-02-13T21:58:25.315-0600 [DEBUG] provider.terraform-provider-tls_v3.1.0_x5: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin004137309 network=unix timestamp=2022-02-13T21:58:25.315-0600
2022-02-13T21:58:25.315-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:25.340-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:25.341-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80166
2022-02-13T21:58:25.341-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:25.341-0600 [DEBUG] Building and walking validate graph
2022-02-13T21:58:25.341-0600 [DEBUG] ProviderTransformer: "tls_private_key.app" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:25.341-0600 [DEBUG] ProviderTransformer: "tls_cert_request.app" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:25.341-0600 [DEBUG] ProviderTransformer: "cloudflare_origin_ca_certificate.app" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/cloudflare/cloudflare"]
2022-02-13T21:58:25.341-0600 [DEBUG] ReferenceTransformer: "tls_cert_request.app" references: [tls_private_key.app tls_private_key.app]
2022-02-13T21:58:25.341-0600 [DEBUG] ReferenceTransformer: "cloudflare_origin_ca_certificate.app" references: [tls_cert_request.app]
2022-02-13T21:58:25.341-0600 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/tls\"]" references: []
2022-02-13T21:58:25.341-0600 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/cloudflare/cloudflare\"]" references: []
2022-02-13T21:58:25.341-0600 [DEBUG] ReferenceTransformer: "tls_private_key.app" references: []
2022-02-13T21:58:25.342-0600 [DEBUG] Starting graph walk: walkValidate
2022-02-13T21:58:25.342-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:25.342-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:25.351-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 args=[.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0]
2022-02-13T21:58:25.353-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80167
2022-02-13T21:58:25.353-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0
2022-02-13T21:58:25.364-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: configuring server automatic mTLS: timestamp=2022-02-13T21:58:25.363-0600
2022-02-13T21:58:25.374-0600 [DEBUG] provider.terraform-provider-cloudflare_v3.8.0: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin352335451 network=unix timestamp=2022-02-13T21:58:25.374-0600
2022-02-13T21:58:25.374-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:25.388-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:25.388-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:25.397-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5]
2022-02-13T21:58:25.399-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80168
2022-02-13T21:58:25.400-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5
2022-02-13T21:58:25.408-0600 [INFO]  provider.terraform-provider-tls_v3.1.0_x5: configuring server automatic mTLS: timestamp=2022-02-13T21:58:25.408-0600
2022-02-13T21:58:25.445-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:25.445-0600 [DEBUG] provider.terraform-provider-tls_v3.1.0_x5: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin784772455 network=unix timestamp=2022-02-13T21:58:25.445-0600
2022-02-13T21:58:25.471-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:25.472-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80168
2022-02-13T21:58:25.472-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:25.480-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:25.481-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80167
2022-02-13T21:58:25.481-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:25.481-0600 [INFO]  backend/local: plan calling Plan
2022-02-13T21:58:25.481-0600 [DEBUG] Building and walking plan graph for NormalMode
2022-02-13T21:58:25.482-0600 [DEBUG] ProviderTransformer: "tls_cert_request.app (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:25.482-0600 [DEBUG] ProviderTransformer: "cloudflare_origin_ca_certificate.app (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/cloudflare/cloudflare"]
2022-02-13T21:58:25.482-0600 [DEBUG] ProviderTransformer: "tls_private_key.app (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:25.482-0600 [DEBUG] ReferenceTransformer: "tls_private_key.app (expand)" references: []
2022-02-13T21:58:25.482-0600 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/tls\"]" references: []
2022-02-13T21:58:25.482-0600 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/cloudflare/cloudflare\"]" references: []
2022-02-13T21:58:25.482-0600 [DEBUG] ReferenceTransformer: "tls_cert_request.app (expand)" references: [tls_private_key.app (expand) tls_private_key.app (expand)]
2022-02-13T21:58:25.482-0600 [DEBUG] ReferenceTransformer: "cloudflare_origin_ca_certificate.app (expand)" references: [tls_cert_request.app (expand)]
2022-02-13T21:58:25.482-0600 [DEBUG] Starting graph walk: walkPlan
2022-02-13T21:58:25.482-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:25.482-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:25.490-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5]
2022-02-13T21:58:25.492-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80169
2022-02-13T21:58:25.492-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5
2022-02-13T21:58:25.500-0600 [INFO]  provider.terraform-provider-tls_v3.1.0_x5: configuring server automatic mTLS: timestamp=2022-02-13T21:58:25.500-0600
2022-02-13T21:58:25.537-0600 [DEBUG] provider.terraform-provider-tls_v3.1.0_x5: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin158476876 network=unix timestamp=2022-02-13T21:58:25.537-0600
2022-02-13T21:58:25.537-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:25.561-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:25.561-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:25.568-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 args=[.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0]
2022-02-13T21:58:25.571-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80170
2022-02-13T21:58:25.571-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0
2022-02-13T21:58:25.579-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: configuring server automatic mTLS: timestamp=2022-02-13T21:58:25.579-0600
2022-02-13T21:58:25.589-0600 [DEBUG] provider.terraform-provider-cloudflare_v3.8.0: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin2509772301 network=unix timestamp=2022-02-13T21:58:25.589-0600
2022-02-13T21:58:25.589-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:25.604-0600 [DEBUG] Resource instance state not found for node "tls_private_key.app", instance tls_private_key.app
2022-02-13T21:58:25.604-0600 [DEBUG] ReferenceTransformer: "tls_private_key.app" references: []
2022-02-13T21:58:25.604-0600 [DEBUG] refresh: tls_private_key.app: no state, so not refreshing
2022-02-13T21:58:25.605-0600 [WARN]  Provider "registry.terraform.io/hashicorp/tls" produced an invalid plan for tls_private_key.app, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .ecdsa_curve: planned value cty.StringVal("P224") for a non-computed attribute
2022-02-13T21:58:25.605-0600 [DEBUG] Resource instance state not found for node "tls_cert_request.app", instance tls_cert_request.app
2022-02-13T21:58:25.606-0600 [DEBUG] ReferenceTransformer: "tls_cert_request.app" references: []
2022-02-13T21:58:25.606-0600 [DEBUG] refresh: tls_cert_request.app: no state, so not refreshing
2022-02-13T21:58:25.608-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:25.609-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80169
2022-02-13T21:58:25.609-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:25.618-0600 [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/cloudflare/cloudflare\"]" changed the config value, but that value is unused
2022-02-13T21:58:25.618-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:25 [INFO] Cloudflare Client configured for user:: timestamp=2022-02-13T21:58:25.618-0600
2022-02-13T21:58:25.618-0600 [DEBUG] Resource instance state not found for node "cloudflare_origin_ca_certificate.app", instance cloudflare_origin_ca_certificate.app
2022-02-13T21:58:25.619-0600 [DEBUG] ReferenceTransformer: "cloudflare_origin_ca_certificate.app" references: []
2022-02-13T21:58:25.619-0600 [DEBUG] refresh: cloudflare_origin_ca_certificate.app: no state, so not refreshing
2022-02-13T21:58:25.620-0600 [WARN]  Provider "registry.terraform.io/cloudflare/cloudflare" produced an invalid plan for cloudflare_origin_ca_certificate.app, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .requested_validity: planned value cty.UnknownVal(cty.Number) does not match config value cty.NumberIntVal(730)
2022-02-13T21:58:25.621-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:25.622-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80170
2022-02-13T21:58:25.622-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:25.622-0600 [INFO]  backend/local: plan operation completed
2022-02-13T21:58:25.622-0600 [INFO]  backend/local: writing plan output to: app.plan

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
  + create

Terraform will perform the following actions:

  # cloudflare_origin_ca_certificate.app will be created
  + resource "cloudflare_origin_ca_certificate" "app" {
      + certificate        = (known after apply)
      + csr                = (known after apply)
      + expires_on         = (known after apply)
      + hostnames          = [
          + "raccoon.team",
        ]
      + id                 = (known after apply)
      + request_type       = "origin-rsa"
      + requested_validity = (known after apply)
    }

  # tls_cert_request.app will be created
  + resource "tls_cert_request" "app" {
      + cert_request_pem = (known after apply)
      + id               = (known after apply)
      + key_algorithm    = "RSA"
      + private_key_pem  = (sensitive value)

      + subject {
          + common_name    = "Cloudflare Origin Certificate"
          + street_address = []
        }
    }

  # tls_private_key.app will be created
  + resource "tls_private_key" "app" {
      + algorithm                  = "RSA"
      + ecdsa_curve                = "P224"
      + id                         = (known after apply)
      + private_key_pem            = (sensitive value)
      + public_key_fingerprint_md5 = (known after apply)
      + public_key_openssh         = (known after apply)
      + public_key_pem             = (known after apply)
      + rsa_bits                   = 2048
    }

Plan: 3 to add, 0 to change, 0 to destroy.

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Saved the plan to: app.plan

To perform exactly these actions, run the following command to apply:
    terraform apply "app.plan"

$ TF_LOG=DEBUG terraform apply app.plan
2022-02-13T21:58:33.289-0600 [INFO]  Terraform version: 1.1.5
2022-02-13T21:58:33.289-0600 [INFO]  Go runtime version: go1.17.6
2022-02-13T21:58:33.289-0600 [INFO]  CLI args: []string{"terraform", "apply", "app.plan"}
2022-02-13T21:58:33.289-0600 [DEBUG] Attempting to open CLI config file: /Users/atlas/.terraformrc
2022-02-13T21:58:33.289-0600 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022-02-13T21:58:33.289-0600 [INFO]  Loading CLI configuration from /Users/atlas/.terraform.d/credentials.tfrc.json
2022-02-13T21:58:33.289-0600 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022-02-13T21:58:33.289-0600 [DEBUG] ignoring non-existing provider search directory /Users/atlas/.terraform.d/plugins
2022-02-13T21:58:33.289-0600 [DEBUG] ignoring non-existing provider search directory /Users/atlas/Library/Application Support/io.terraform/plugins
2022-02-13T21:58:33.289-0600 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2022-02-13T21:58:33.289-0600 [INFO]  CLI command args: []string{"apply", "app.plan"}
2022-02-13T21:58:33.381-0600 [DEBUG] checking for provisioner in "."
2022-02-13T21:58:33.396-0600 [DEBUG] checking for provisioner in "/usr/local/bin"
2022-02-13T21:58:33.397-0600 [INFO]  backend/local: starting Apply operation
2022-02-13T21:58:33.398-0600 [INFO]  backend/local: apply calling Apply
2022-02-13T21:58:33.398-0600 [DEBUG] Building and walking apply graph for NormalMode plan
2022-02-13T21:58:33.399-0600 [DEBUG] Resource state not found for node "cloudflare_origin_ca_certificate.app", instance cloudflare_origin_ca_certificate.app
2022-02-13T21:58:33.399-0600 [DEBUG] Resource state not found for node "tls_private_key.app", instance tls_private_key.app
2022-02-13T21:58:33.399-0600 [DEBUG] Resource state not found for node "tls_cert_request.app", instance tls_cert_request.app
2022-02-13T21:58:33.399-0600 [DEBUG] ProviderTransformer: "tls_private_key.app" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:33.399-0600 [DEBUG] ProviderTransformer: "tls_cert_request.app" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:33.399-0600 [DEBUG] ProviderTransformer: "cloudflare_origin_ca_certificate.app" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/cloudflare/cloudflare"]
2022-02-13T21:58:33.399-0600 [DEBUG] ProviderTransformer: "tls_private_key.app (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:33.399-0600 [DEBUG] ProviderTransformer: "tls_cert_request.app (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hashicorp/tls"]
2022-02-13T21:58:33.399-0600 [DEBUG] ProviderTransformer: "cloudflare_origin_ca_certificate.app (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/cloudflare/cloudflare"]
2022-02-13T21:58:33.399-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:33.399-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:33.410-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5]
2022-02-13T21:58:33.413-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80177
2022-02-13T21:58:33.413-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5
2022-02-13T21:58:33.423-0600 [INFO]  provider.terraform-provider-tls_v3.1.0_x5: configuring server automatic mTLS: timestamp=2022-02-13T21:58:33.423-0600
2022-02-13T21:58:33.462-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:33.462-0600 [DEBUG] provider.terraform-provider-tls_v3.1.0_x5: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin826517524 network=unix timestamp=2022-02-13T21:58:33.462-0600
2022-02-13T21:58:33.488-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:33.489-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80177
2022-02-13T21:58:33.489-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:33.489-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:33.489-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:33.497-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 args=[.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0]
2022-02-13T21:58:33.500-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80178
2022-02-13T21:58:33.500-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0
2022-02-13T21:58:33.510-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: configuring server automatic mTLS: timestamp=2022-02-13T21:58:33.510-0600
2022-02-13T21:58:33.521-0600 [DEBUG] provider.terraform-provider-cloudflare_v3.8.0: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin1091173405 network=unix timestamp=2022-02-13T21:58:33.521-0600
2022-02-13T21:58:33.521-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:33.545-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:33.546-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80178
2022-02-13T21:58:33.546-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "tls_private_key.app (expand)" references: []
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "tls_cert_request.app (expand)" references: []
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "cloudflare_origin_ca_certificate.app (expand)" references: []
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "tls_private_key.app" references: []
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "tls_cert_request.app" references: [tls_private_key.app (expand) tls_private_key.app tls_private_key.app tls_private_key.app (expand) tls_private_key.app tls_private_key.app]
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "cloudflare_origin_ca_certificate.app" references: [tls_cert_request.app (expand) tls_cert_request.app tls_cert_request.app]
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/tls\"]" references: []
2022-02-13T21:58:33.546-0600 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/cloudflare/cloudflare\"]" references: []
2022-02-13T21:58:33.547-0600 [DEBUG] Starting graph walk: walkApply
2022-02-13T21:58:33.547-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:33.547-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:33.557-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 args=[.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0]
2022-02-13T21:58:33.560-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80179
2022-02-13T21:58:33.560-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0
2022-02-13T21:58:33.570-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: configuring server automatic mTLS: timestamp=2022-02-13T21:58:33.570-0600
2022-02-13T21:58:33.581-0600 [DEBUG] provider.terraform-provider-cloudflare_v3.8.0: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin955377971 network=unix timestamp=2022-02-13T21:58:33.581-0600
2022-02-13T21:58:33.581-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:33.594-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:58:33.595-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:58:33.606-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5]
2022-02-13T21:58:33.609-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80180
2022-02-13T21:58:33.609-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5
2022-02-13T21:58:33.611-0600 [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/cloudflare/cloudflare\"]" changed the config value, but that value is unused
2022-02-13T21:58:33.619-0600 [INFO]  provider.terraform-provider-tls_v3.1.0_x5: configuring server automatic mTLS: timestamp=2022-02-13T21:58:33.619-0600
2022-02-13T21:58:33.655-0600 [DEBUG] provider.terraform-provider-tls_v3.1.0_x5: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin860289339 network=unix timestamp=2022-02-13T21:58:33.655-0600
2022-02-13T21:58:33.655-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:58:33.679-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:33 [INFO] Cloudflare Client configured for user:: timestamp=2022-02-13T21:58:33.679-0600
2022-02-13T21:58:33.682-0600 [WARN]  Provider "registry.terraform.io/hashicorp/tls" produced an invalid plan for tls_private_key.app, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .ecdsa_curve: planned value cty.StringVal("P224") for a non-computed attribute
tls_private_key.app: Creating...
2022-02-13T21:58:33.682-0600 [INFO]  Starting apply for tls_private_key.app
2022-02-13T21:58:33.682-0600 [DEBUG] tls_private_key.app: applying the planned Create change
tls_private_key.app: Creation complete after 0s [id=c2c9489254aadb8eba0403094b77ad85894f2936]
2022-02-13T21:58:33.879-0600 [WARN]  Provider "registry.terraform.io/hashicorp/tls" produced an invalid plan for tls_cert_request.app, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .private_key_pem: sensitive planned value does not match config value
tls_cert_request.app: Creating...
2022-02-13T21:58:33.879-0600 [INFO]  Starting apply for tls_cert_request.app
2022-02-13T21:58:33.879-0600 [DEBUG] tls_cert_request.app: applying the planned Create change
2022-02-13T21:58:33.882-0600 [WARN]  Provider "provider[\"registry.terraform.io/hashicorp/tls\"]" produced an unexpected new value for tls_cert_request.app, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .subject[0].country: was null, but now cty.StringVal("")
      - .subject[0].locality: was null, but now cty.StringVal("")
      - .subject[0].postal_code: was null, but now cty.StringVal("")
      - .subject[0].province: was null, but now cty.StringVal("")
      - .subject[0].organizational_unit: was null, but now cty.StringVal("")
      - .subject[0].serial_number: was null, but now cty.StringVal("")
      - .subject[0].organization: was null, but now cty.StringVal("")
tls_cert_request.app: Creation complete after 0s [id=fff0044de246e09610017e6a4d257205b0b0af79]
2022-02-13T21:58:33.903-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:33.904-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80180
2022-02-13T21:58:33.904-0600 [DEBUG] provider: plugin exited
2022-02-13T21:58:33.906-0600 [WARN]  Provider "registry.terraform.io/cloudflare/cloudflare" produced an invalid plan for cloudflare_origin_ca_certificate.app, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .requested_validity: planned value cty.UnknownVal(cty.Number) does not match config value cty.NumberIntVal(730)
cloudflare_origin_ca_certificate.app: Creating...
2022-02-13T21:58:33.906-0600 [INFO]  Starting apply for cloudflare_origin_ca_certificate.app
2022-02-13T21:58:33.906-0600 [DEBUG] cloudflare_origin_ca_certificate.app: applying the planned Create change
2022-02-13T21:58:33.907-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:33 [INFO] Creating Cloudflare OriginCACertificate: cloudflare.OriginCACertificate{ID:"", Certificate:"", Hostnames:[]string{"raccoon.team"}, ExpiresOn:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), RequestType:"origin-rsa", RequestValidity:0, RevokedAt:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), CSR:"-----BEGIN CERTIFICATE REQUEST-----\nMIICbTCCAVUCAQAwKDEmMCQGA1UEAxMdQ2xvdWRmbGFyZSBPcmlnaW4gQ2VydGlm\naWNhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTFAAUDquEAqH6\ng9TjnLm15jlyRCsLPYEcNsRbrM1NM30TPLmt0co3q4fSC7KLk5HgIdeDTQ3XTOgD\nGRP9cSCcUDL0+xQQ5cXbgcmIiJ+kdM/1GgZmJmoXh8N8a1QvG4Xmd5iyJBI6fM0T\nk3sscTNqpX79b4Ua4wSN/6Jr538Jz8yirEQl445/IoNPqHtEZlP+aTfhsr9e7bKv\nqHNO8aIwuD2DwHJ1FbSVXOmhewzsvZoU5nKiS5kxb8Jbnc1Pv1V8QiX2KG6sOmi3\nWM/309jl/bn8SNuZCG2zMgFIuxCD7KlUDoNWpB0/QF/7O1xzncuW0/MPCVoGnDlZ\nX3AM4aDRAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAbyiPwItHL76JTmgmVzW5\nNnifE+b4mIDqLmlJYVpcnU8Q/l0Z26jxFrk/24vgx02Kp9zPMx/re3xys1P/h3pv\ny1MowJcHrzoDrZB+3NC7gJs/7Yv0MG7h8aGiLc3wl9/WLAQlIi6YAakDxqkbDSjM\n+ld4zXRcpq2RhdT5N855DABtIyk8bmMtGTLDjmQttf6UO0ZUcHbjSmZqY+eXjt8Y\n90tDkG8P6B4+NpC/lBnJatbQea6fBwBw6JHWu2hU+cT4GsWv8P912iZnC9puK+vk\nbMRU7MTJoKzpAISpdL41Sz8AylHIrEYHd6vxKKui2pXrTm225DquC0bA5jaY0NEb\n5A==\n-----END CERTIFICATE REQUEST-----\n"}: timestamp=2022-02-13T21:58:33.907-0600
2022-02-13T21:58:33.907-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:33 [DEBUG] Cloudflare API Request Details:
---[ REQUEST ]---------------------------------------
POST /client/v4/certificates HTTP/1.1
Host: api.cloudflare.com
User-Agent: terraform/1.1.5 terraform-plugin-sdk/2.10.1 terraform-provider-cloudflare/3.8.0
Content-Length: 1123
Content-Type: application/json
X-Auth-User-Service-Key:
Accept-Encoding: gzip

{
 "id": "",
 "certificate": "",
 "hostnames": [
  "raccoon.team"
 ],
 "expires_on": "0001-01-01T00:00:00Z",
 "request_type": "origin-rsa",
 "requested_validity": 0,
 "revoked_at": "0001-01-01T00:00:00Z",
 "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICbTCCAVUCAQAwKDEmMCQGA1UEAxMdQ2xvdWRmbGFyZSBPcmlnaW4gQ2VydGlm\naWNhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTFAAUDquEAqH6\ng9TjnLm15jlyRCsLPYEcNsRbrM1NM30TPLmt0co3q4fSC7KLk5HgIdeDTQ3XTOgD\nGRP9cSCcUDL0+xQQ5cXbgcmIiJ+kdM/1GgZmJmoXh8N8a1QvG4Xmd5iyJBI6fM0T\nk3sscTNqpX79b4Ua4wSN/6Jr538Jz8yirEQl445/IoNPqHtEZlP+aTfhsr9e7bKv\nqHNO8aIwuD2DwHJ1FbSVXOmhewzsvZoU5nKiS5kxb8Jbnc1Pv1V8QiX2KG6sOmi3\nWM/309jl/bn8SNuZCG2zMgFIuxCD7KlUDoNWpB0/QF/7O1xzncuW0/MPCVoGnDlZ\nX3AM4aDRAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAbyiPwItHL76JTmgmVzW5\nNnifE+b4mIDqLmlJYVpcnU8Q/l0Z26jxFrk/24vgx02Kp9zPMx/re3xys1P/h3pv\ny1MowJcHrzoDrZB+3NC7gJs/7Yv0MG7h8aGiLc3wl9/WLAQlIi6YAakDxqkbDSjM\n+ld4zXRcpq2RhdT5N855DABtIyk8bmMtGTLDjmQttf6UO0ZUcHbjSmZqY+eXjt8Y\n90tDkG8P6B4+NpC/lBnJatbQea6fBwBw6JHWu2hU+cT4GsWv8P912iZnC9puK+vk\nbMRU7MTJoKzpAISpdL41Sz8AylHIrEYHd6vxKKui2pXrTm225DquC0bA5jaY0NEb\n5A==\n-----END CERTIFICATE REQUEST-----\n"
}
-----------------------------------------------------: timestamp=2022-02-13T21:58:33.907-0600
2022-02-13T21:58:34.471-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:34 [DEBUG] Cloudflare API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Cf-Cache-Status: DYNAMIC
Cf-Ray: 6dd360f8aaf3b5be-MEM
Content-Type: application/json
Date: Mon, 14 Feb 2022 03:58:34 GMT
Expect-Ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
Set-Cookie: __cflb=0H28vgHxwvgAQtjUGU4vq74ZFe3sNVUZN1fCJHytfCy; SameSite=Lax; path=/; expires=Mon, 14-Feb-22 06:28:35 GMT; HttpOnly
Set-Cookie: __cfruid=ef49aa50ba6b784fc85a1f1ceac77cfa125ff988-1644811114; path=/; domain=.api.cloudflare.com; HttpOnly; Secure; SameSite=None
Vary: Accept-Encoding
X-Envoy-Upstream-Service-Time: 105

{
 "success": true,
 "result": {
  "id": "610280954938430757279665318466077496955380339098",
  "certificate": "-----BEGIN CERTIFICATE-----\nMIIElDCCA3ygAwIBAgIUauXxyVyEHSIHaFEiWyoTppBmkZowDQYJKoZIhvcNAQEL\nBQAwgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQw\nMgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9y\naXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlh\nMB4XDTIyMDIxNDAzNTQwMFoXDTM3MDIxMDAzNTQwMFowYjEZMBcGA1UEChMQQ2xv\ndWRGbGFyZSwgSW5jLjEdMBsGA1UECxMUQ2xvdWRGbGFyZSBPcmlnaW4gQ0ExJjAk\nBgNVBAMTHUNsb3VkRmxhcmUgT3JpZ2luIENlcnRpZmljYXRlMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0xQAFA6rhAKh+oPU45y5teY5ckQrCz2BHDbE\nW6zNTTN9Ezy5rdHKN6uH0guyi5OR4CHXg00N10zoAxkT/XEgnFAy9PsUEOXF24HJ\niIifpHTP9RoGZiZqF4fDfGtULxuF5neYsiQSOnzNE5N7LHEzaqV+/W+FGuMEjf+i\na+d/Cc/MoqxEJeOOfyKDT6h7RGZT/mk34bK/Xu2yr6hzTvGiMLg9g8BydRW0lVzp\noXsM7L2aFOZyokuZMW/CW53NT79VfEIl9ihurDpot1jP99PY5f25/EjbmQhtszIB\nSLsQg+ypVA6DVqQdP0Bf+ztcc53LltPzDwlaBpw5WV9wDOGg0QIDAQABo4IBFjCC\nARIwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcD\nATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSWyfMfGZ8ec5k5tW6RjeJYAP0FITAf\nBgNVHSMEGDAWgBQk6FNXXXw0QIep65TbuuEWePwppDBABggrBgEFBQcBAQQ0MDIw\nMAYIKwYBBQUHMAGGJGh0dHA6Ly9vY3NwLmNsb3VkZmxhcmUuY29tL29yaWdpbl9j\nYTAXBgNVHREEEDAOggxyYWNjb29uLnRlYW0wOAYDVR0fBDEwLzAtoCugKYYnaHR0\ncDovL2NybC5jbG91ZGZsYXJlLmNvbS9vcmlnaW5fY2EuY3JsMA0GCSqGSIb3DQEB\nCwUAA4IBAQAo1riBViOck2+prmOaZ7kZLCFsAq+6teVy+G4GlcMXqqcU5bUHRMwD\nhREwU9h5ob9WWt05rlvumHyLsIMhr3VCCEmHUxtxWFf71YFolyjyCi8teKxJwfv+\nXRxzvta3DIFYW2CJotMup/eGJ+5FMIqkTCBsQAzrHak4v6O5LtLSmQw+awP/7wD9\n+GXVrxjfEf+unWsZGOOuCtYy+Yn6yGDcdc+rCdEb0eA5JO/OZtI5c7gZYiSw5uHG\nYY5g92L/RiCE3wSqnuER6aAAsNrxevNRpCaLofnX8lLgU/tB5AAg/m7BFOFcD6/O\n0hOlfKA/ejY9yPybvwWKO02KwRd1RENl\n-----END CERTIFICATE-----\n",
  "expires_on": "2037-02-10 03:54:00 +0000 UTC",
  "request_type": "origin-rsa",
  "hostnames": [
   "raccoon.team"
  ],
  "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICbTCCAVUCAQAwKDEmMCQGA1UEAxMdQ2xvdWRmbGFyZSBPcmlnaW4gQ2VydGlm\naWNhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTFAAUDquEAqH6\ng9TjnLm15jlyRCsLPYEcNsRbrM1NM30TPLmt0co3q4fSC7KLk5HgIdeDTQ3XTOgD\nGRP9cSCcUDL0+xQQ5cXbgcmIiJ+kdM/1GgZmJmoXh8N8a1QvG4Xmd5iyJBI6fM0T\nk3sscTNqpX79b4Ua4wSN/6Jr538Jz8yirEQl445/IoNPqHtEZlP+aTfhsr9e7bKv\nqHNO8aIwuD2DwHJ1FbSVXOmhewzsvZoU5nKiS5kxb8Jbnc1Pv1V8QiX2KG6sOmi3\nWM/309jl/bn8SNuZCG2zMgFIuxCD7KlUDoNWpB0/QF/7O1xzncuW0/MPCVoGnDlZ\nX3AM4aDRAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAbyiPwItHL76JTmgmVzW5\nNnifE+b4mIDqLmlJYVpcnU8Q/l0Z26jxFrk/24vgx02Kp9zPMx/re3xys1P/h3pv\ny1MowJcHrzoDrZB+3NC7gJs/7Yv0MG7h8aGiLc3wl9/WLAQlIi6YAakDxqkbDSjM\n+ld4zXRcpq2RhdT5N855DABtIyk8bmMtGTLDjmQttf6UO0ZUcHbjSmZqY+eXjt8Y\n90tDkG8P6B4+NpC/lBnJatbQea6fBwBw6JHWu2hU+cT4GsWv8P912iZnC9puK+vk\nbMRU7MTJoKzpAISpdL41Sz8AylHIrEYHd6vxKKui2pXrTm225DquC0bA5jaY0NEb\n5A==\n-----END CERTIFICATE REQUEST-----\n",
  "requested_validity": 5475
 },
 "errors": [],
 "messages": []
}

-----------------------------------------------------: timestamp=2022-02-13T21:58:34.471-0600
2022-02-13T21:58:34.472-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:34 [DEBUG] Cloudflare API Request Details:
---[ REQUEST ]---------------------------------------
GET /client/v4/certificates/610280954938430757279665318466077496955380339098 HTTP/1.1
Host: api.cloudflare.com
User-Agent: terraform/1.1.5 terraform-plugin-sdk/2.10.1 terraform-provider-cloudflare/3.8.0
Content-Type: application/json
X-Auth-User-Service-Key:
Accept-Encoding: gzip


-----------------------------------------------------: timestamp=2022-02-13T21:58:34.472-0600
2022-02-13T21:58:34.720-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:34 [DEBUG] Cloudflare API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Cf-Cache-Status: DYNAMIC
Cf-Ray: 6dd360fafb91b5b8-MEM
Content-Type: application/json
Date: Mon, 14 Feb 2022 03:58:34 GMT
Expect-Ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
Set-Cookie: __cflb=0H28vgHxwvgAQtjUGU4vq74ZFe3sNVUZN1fCJHytfCy; SameSite=Lax; path=/; expires=Mon, 14-Feb-22 06:28:35 GMT; HttpOnly
Set-Cookie: __cfruid=ef49aa50ba6b784fc85a1f1ceac77cfa125ff988-1644811114; path=/; domain=.api.cloudflare.com; HttpOnly; Secure; SameSite=None
Vary: Accept-Encoding
X-Envoy-Upstream-Service-Time: 29

{
 "success": true,
 "result": {
  "id": "610280954938430757279665318466077496955380339098",
  "certificate": "-----BEGIN CERTIFICATE-----\nMIIElDCCA3ygAwIBAgIUauXxyVyEHSIHaFEiWyoTppBmkZowDQYJKoZIhvcNAQEL\nBQAwgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQw\nMgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9y\naXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlh\nMB4XDTIyMDIxNDAzNTQwMFoXDTM3MDIxMDAzNTQwMFowYjEZMBcGA1UEChMQQ2xv\ndWRGbGFyZSwgSW5jLjEdMBsGA1UECxMUQ2xvdWRGbGFyZSBPcmlnaW4gQ0ExJjAk\nBgNVBAMTHUNsb3VkRmxhcmUgT3JpZ2luIENlcnRpZmljYXRlMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0xQAFA6rhAKh+oPU45y5teY5ckQrCz2BHDbE\nW6zNTTN9Ezy5rdHKN6uH0guyi5OR4CHXg00N10zoAxkT/XEgnFAy9PsUEOXF24HJ\niIifpHTP9RoGZiZqF4fDfGtULxuF5neYsiQSOnzNE5N7LHEzaqV+/W+FGuMEjf+i\na+d/Cc/MoqxEJeOOfyKDT6h7RGZT/mk34bK/Xu2yr6hzTvGiMLg9g8BydRW0lVzp\noXsM7L2aFOZyokuZMW/CW53NT79VfEIl9ihurDpot1jP99PY5f25/EjbmQhtszIB\nSLsQg+ypVA6DVqQdP0Bf+ztcc53LltPzDwlaBpw5WV9wDOGg0QIDAQABo4IBFjCC\nARIwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcD\nATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSWyfMfGZ8ec5k5tW6RjeJYAP0FITAf\nBgNVHSMEGDAWgBQk6FNXXXw0QIep65TbuuEWePwppDBABggrBgEFBQcBAQQ0MDIw\nMAYIKwYBBQUHMAGGJGh0dHA6Ly9vY3NwLmNsb3VkZmxhcmUuY29tL29yaWdpbl9j\nYTAXBgNVHREEEDAOggxyYWNjb29uLnRlYW0wOAYDVR0fBDEwLzAtoCugKYYnaHR0\ncDovL2NybC5jbG91ZGZsYXJlLmNvbS9vcmlnaW5fY2EuY3JsMA0GCSqGSIb3DQEB\nCwUAA4IBAQAo1riBViOck2+prmOaZ7kZLCFsAq+6teVy+G4GlcMXqqcU5bUHRMwD\nhREwU9h5ob9WWt05rlvumHyLsIMhr3VCCEmHUxtxWFf71YFolyjyCi8teKxJwfv+\nXRxzvta3DIFYW2CJotMup/eGJ+5FMIqkTCBsQAzrHak4v6O5LtLSmQw+awP/7wD9\n+GXVrxjfEf+unWsZGOOuCtYy+Yn6yGDcdc+rCdEb0eA5JO/OZtI5c7gZYiSw5uHG\nYY5g92L/RiCE3wSqnuER6aAAsNrxevNRpCaLofnX8lLgU/tB5AAg/m7BFOFcD6/O\n0hOlfKA/ejY9yPybvwWKO02KwRd1RENl\n-----END CERTIFICATE-----\n",
  "expires_on": "2037-02-10 03:54:00 +0000 UTC",
  "request_type": "origin-rsa",
  "hostnames": [
   "raccoon.team"
  ]
 },
 "errors": [],
 "messages": []
}

-----------------------------------------------------: timestamp=2022-02-13T21:58:34.720-0600
2022-02-13T21:58:34.720-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: 2022/02/13 21:58:34 [DEBUG] OriginCACertificate: &cloudflare.OriginCACertificate{ID:"610280954938430757279665318466077496955380339098", Certificate:"-----BEGIN CERTIFICATE-----\nMIIElDCCA3ygAwIBAgIUauXxyVyEHSIHaFEiWyoTppBmkZowDQYJKoZIhvcNAQEL\nBQAwgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQw\nMgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9y\naXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlh\nMB4XDTIyMDIxNDAzNTQwMFoXDTM3MDIxMDAzNTQwMFowYjEZMBcGA1UEChMQQ2xv\ndWRGbGFyZSwgSW5jLjEdMBsGA1UECxMUQ2xvdWRGbGFyZSBPcmlnaW4gQ0ExJjAk\nBgNVBAMTHUNsb3VkRmxhcmUgT3JpZ2luIENlcnRpZmljYXRlMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0xQAFA6rhAKh+oPU45y5teY5ckQrCz2BHDbE\nW6zNTTN9Ezy5rdHKN6uH0guyi5OR4CHXg00N10zoAxkT/XEgnFAy9PsUEOXF24HJ\niIifpHTP9RoGZiZqF4fDfGtULxuF5neYsiQSOnzNE5N7LHEzaqV+/W+FGuMEjf+i\na+d/Cc/MoqxEJeOOfyKDT6h7RGZT/mk34bK/Xu2yr6hzTvGiMLg9g8BydRW0lVzp\noXsM7L2aFOZyokuZMW/CW53NT79VfEIl9ihurDpot1jP99PY5f25/EjbmQhtszIB\nSLsQg+ypVA6DVqQdP0Bf+ztcc53LltPzDwlaBpw5WV9wDOGg0QIDAQABo4IBFjCC\nARIwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcD\nATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSWyfMfGZ8ec5k5tW6RjeJYAP0FITAf\nBgNVHSMEGDAWgBQk6FNXXXw0QIep65TbuuEWePwppDBABggrBgEFBQcBAQQ0MDIw\nMAYIKwYBBQUHMAGGJGh0dHA6Ly9vY3NwLmNsb3VkZmxhcmUuY29tL29yaWdpbl9j\nYTAXBgNVHREEEDAOggxyYWNjb29uLnRlYW0wOAYDVR0fBDEwLzAtoCugKYYnaHR0\ncDovL2NybC5jbG91ZGZsYXJlLmNvbS9vcmlnaW5fY2EuY3JsMA0GCSqGSIb3DQEB\nCwUAA4IBAQAo1riBViOck2+prmOaZ7kZLCFsAq+6teVy+G4GlcMXqqcU5bUHRMwD\nhREwU9h5ob9WWt05rlvumHyLsIMhr3VCCEmHUxtxWFf71YFolyjyCi8teKxJwfv+\nXRxzvta3DIFYW2CJotMup/eGJ+5FMIqkTCBsQAzrHak4v6O5LtLSmQw+awP/7wD9\n+GXVrxjfEf+unWsZGOOuCtYy+Yn6yGDcdc+rCdEb0eA5JO/OZtI5c7gZYiSw5uHG\nYY5g92L/RiCE3wSqnuER6aAAsNrxevNRpCaLofnX8lLgU/tB5AAg/m7BFOFcD6/O\n0hOlfKA/ejY9yPybvwWKO02KwRd1RENl\n-----END CERTIFICATE-----\n", Hostnames:[]string{"raccoon.team"}, ExpiresOn:time.Date(2037, time.February, 10, 3, 54, 0, 0, time.UTC), RequestType:"origin-rsa", RequestValidity:0, RevokedAt:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), CSR:""}: timestamp=2022-02-13T21:58:34.720-0600
cloudflare_origin_ca_certificate.app: Creation complete after 1s [id=610280954938430757279665318466077496955380339098]
2022-02-13T21:58:34.743-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:58:34.744-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80179
2022-02-13T21:58:34.745-0600 [DEBUG] provider: plugin exited

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

$ TF_LOG=DEBUG terraform state show cloudflare_origin_ca_certificate.app
2022-02-13T21:59:27.938-0600 [INFO]  Terraform version: 1.1.5
2022-02-13T21:59:27.938-0600 [INFO]  Go runtime version: go1.17.6
2022-02-13T21:59:27.938-0600 [INFO]  CLI args: []string{"terraform", "state", "show", "cloudflare_origin_ca_certificate.app"}
2022-02-13T21:59:27.938-0600 [DEBUG] Attempting to open CLI config file: /Users/atlas/.terraformrc
2022-02-13T21:59:27.938-0600 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022-02-13T21:59:27.938-0600 [INFO]  Loading CLI configuration from /Users/atlas/.terraform.d/credentials.tfrc.json
2022-02-13T21:59:27.938-0600 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022-02-13T21:59:27.938-0600 [DEBUG] ignoring non-existing provider search directory /Users/atlas/.terraform.d/plugins
2022-02-13T21:59:27.938-0600 [DEBUG] ignoring non-existing provider search directory /Users/atlas/Library/Application Support/io.terraform/plugins
2022-02-13T21:59:27.938-0600 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2022-02-13T21:59:27.939-0600 [INFO]  CLI command args: []string{"state", "show", "cloudflare_origin_ca_certificate.app"}
2022-02-13T21:59:27.940-0600 [DEBUG] New state was assigned lineage "bdf51366-4a2d-f8a7-b361-4e89418ad0d0"
2022-02-13T21:59:28.030-0600 [DEBUG] checking for provisioner in "."
2022-02-13T21:59:28.044-0600 [DEBUG] checking for provisioner in "/usr/local/bin"
2022-02-13T21:59:28.046-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:59:28.046-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:59:28.056-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 args=[.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0]
2022-02-13T21:59:28.059-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80207
2022-02-13T21:59:28.059-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0
2022-02-13T21:59:28.070-0600 [INFO]  provider.terraform-provider-cloudflare_v3.8.0: configuring server automatic mTLS: timestamp=2022-02-13T21:59:28.069-0600
2022-02-13T21:59:28.080-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:59:28.080-0600 [DEBUG] provider.terraform-provider-cloudflare_v3.8.0: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin3544501362 network=unix timestamp=2022-02-13T21:59:28.080-0600
2022-02-13T21:59:28.103-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:59:28.104-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/3.8.0/darwin_amd64/terraform-provider-cloudflare_v3.8.0 pid=80207
2022-02-13T21:59:28.104-0600 [DEBUG] provider: plugin exited
2022-02-13T21:59:28.104-0600 [DEBUG] created provider logger: level=debug
2022-02-13T21:59:28.104-0600 [INFO]  provider: configuring client automatic mTLS
2022-02-13T21:59:28.113-0600 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5]
2022-02-13T21:59:28.115-0600 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80208
2022-02-13T21:59:28.115-0600 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5
2022-02-13T21:59:28.124-0600 [INFO]  provider.terraform-provider-tls_v3.1.0_x5: configuring server automatic mTLS: timestamp=2022-02-13T21:59:28.123-0600
2022-02-13T21:59:28.158-0600 [DEBUG] provider.terraform-provider-tls_v3.1.0_x5: plugin address: address=/var/folders/f8/jf67cqw15db31zchw9vnb2zw0000gn/T/plugin071868815 network=unix timestamp=2022-02-13T21:59:28.158-0600
2022-02-13T21:59:28.158-0600 [DEBUG] provider: using plugin: version=5
2022-02-13T21:59:28.184-0600 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-02-13T21:59:28.185-0600 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/tls/3.1.0/darwin_amd64/terraform-provider-tls_v3.1.0_x5 pid=80208
2022-02-13T21:59:28.185-0600 [DEBUG] provider: plugin exited
# cloudflare_origin_ca_certificate.app:
resource "cloudflare_origin_ca_certificate" "app" {
    certificate        = <<-EOT
        -----BEGIN CERTIFICATE-----
        MIIElDCCA3ygAwIBAgIUauXxyVyEHSIHaFEiWyoTppBmkZowDQYJKoZIhvcNAQEL
        BQAwgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQw
        MgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9y
        aXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlh
        MB4XDTIyMDIxNDAzNTQwMFoXDTM3MDIxMDAzNTQwMFowYjEZMBcGA1UEChMQQ2xv
        dWRGbGFyZSwgSW5jLjEdMBsGA1UECxMUQ2xvdWRGbGFyZSBPcmlnaW4gQ0ExJjAk
        BgNVBAMTHUNsb3VkRmxhcmUgT3JpZ2luIENlcnRpZmljYXRlMIIBIjANBgkqhkiG
        9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0xQAFA6rhAKh+oPU45y5teY5ckQrCz2BHDbE
        W6zNTTN9Ezy5rdHKN6uH0guyi5OR4CHXg00N10zoAxkT/XEgnFAy9PsUEOXF24HJ
        iIifpHTP9RoGZiZqF4fDfGtULxuF5neYsiQSOnzNE5N7LHEzaqV+/W+FGuMEjf+i
        a+d/Cc/MoqxEJeOOfyKDT6h7RGZT/mk34bK/Xu2yr6hzTvGiMLg9g8BydRW0lVzp
        oXsM7L2aFOZyokuZMW/CW53NT79VfEIl9ihurDpot1jP99PY5f25/EjbmQhtszIB
        SLsQg+ypVA6DVqQdP0Bf+ztcc53LltPzDwlaBpw5WV9wDOGg0QIDAQABo4IBFjCC
        ARIwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcD
        ATAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSWyfMfGZ8ec5k5tW6RjeJYAP0FITAf
        BgNVHSMEGDAWgBQk6FNXXXw0QIep65TbuuEWePwppDBABggrBgEFBQcBAQQ0MDIw
        MAYIKwYBBQUHMAGGJGh0dHA6Ly9vY3NwLmNsb3VkZmxhcmUuY29tL29yaWdpbl9j
        YTAXBgNVHREEEDAOggxyYWNjb29uLnRlYW0wOAYDVR0fBDEwLzAtoCugKYYnaHR0
        cDovL2NybC5jbG91ZGZsYXJlLmNvbS9vcmlnaW5fY2EuY3JsMA0GCSqGSIb3DQEB
        CwUAA4IBAQAo1riBViOck2+prmOaZ7kZLCFsAq+6teVy+G4GlcMXqqcU5bUHRMwD
        hREwU9h5ob9WWt05rlvumHyLsIMhr3VCCEmHUxtxWFf71YFolyjyCi8teKxJwfv+
        XRxzvta3DIFYW2CJotMup/eGJ+5FMIqkTCBsQAzrHak4v6O5LtLSmQw+awP/7wD9
        +GXVrxjfEf+unWsZGOOuCtYy+Yn6yGDcdc+rCdEb0eA5JO/OZtI5c7gZYiSw5uHG
        YY5g92L/RiCE3wSqnuER6aAAsNrxevNRpCaLofnX8lLgU/tB5AAg/m7BFOFcD6/O
        0hOlfKA/ejY9yPybvwWKO02KwRd1RENl
        -----END CERTIFICATE-----
    EOT
    csr                = <<-EOT
        -----BEGIN CERTIFICATE REQUEST-----
        MIICbTCCAVUCAQAwKDEmMCQGA1UEAxMdQ2xvdWRmbGFyZSBPcmlnaW4gQ2VydGlm
        aWNhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTFAAUDquEAqH6
        g9TjnLm15jlyRCsLPYEcNsRbrM1NM30TPLmt0co3q4fSC7KLk5HgIdeDTQ3XTOgD
        GRP9cSCcUDL0+xQQ5cXbgcmIiJ+kdM/1GgZmJmoXh8N8a1QvG4Xmd5iyJBI6fM0T
        k3sscTNqpX79b4Ua4wSN/6Jr538Jz8yirEQl445/IoNPqHtEZlP+aTfhsr9e7bKv
        qHNO8aIwuD2DwHJ1FbSVXOmhewzsvZoU5nKiS5kxb8Jbnc1Pv1V8QiX2KG6sOmi3
        WM/309jl/bn8SNuZCG2zMgFIuxCD7KlUDoNWpB0/QF/7O1xzncuW0/MPCVoGnDlZ
        X3AM4aDRAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAbyiPwItHL76JTmgmVzW5
        NnifE+b4mIDqLmlJYVpcnU8Q/l0Z26jxFrk/24vgx02Kp9zPMx/re3xys1P/h3pv
        y1MowJcHrzoDrZB+3NC7gJs/7Yv0MG7h8aGiLc3wl9/WLAQlIi6YAakDxqkbDSjM
        +ld4zXRcpq2RhdT5N855DABtIyk8bmMtGTLDjmQttf6UO0ZUcHbjSmZqY+eXjt8Y
        90tDkG8P6B4+NpC/lBnJatbQea6fBwBw6JHWu2hU+cT4GsWv8P912iZnC9puK+vk
        bMRU7MTJoKzpAISpdL41Sz8AylHIrEYHd6vxKKui2pXrTm225DquC0bA5jaY0NEb
        5A==
        -----END CERTIFICATE REQUEST-----
    EOT
    expires_on         = "2037-02-10T03:54:00Z"
    hostnames          = [
        "raccoon.team",
    ]
    id                 = "610280954938430757279665318466077496955380339098"
    request_type       = "origin-rsa"
    requested_validity = 5475
}

Panic output

No response

Expected output

The expected output would be the requested_validity field being set to 730 days in the Terraform plan.

Actual output

The requested_validity parameter is interpreted as a computed field and defaults to 5475 despite being set to 730.

Steps to reproduce

  1. Run a plan action with the requested_validity parameter set to an accepted value besides 5475 (ex: 730).
  2. Verify that the requested_validity in the plan output shows as requested_validity = (known after apply).
  3. Apply the plan and verify that the requested_validity in the Terraform state is not what is expected and has defaulted to 5475.

Additional factoids

No response

References

hashicorp/terraform-plugin-sdk#806
#1276
#1031

@acchiao acchiao added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 12, 2022
@jacobbednarz
Copy link
Member

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.

@jacobbednarz jacobbednarz added triage/needs-information Indicates an issue needs more information in order to work on it. and removed kind/bug Categorizes issue or PR as related to a bug. labels Feb 13, 2022
@acchiao
Copy link
Author

acchiao commented Feb 14, 2022

@jacobbednarz Thanks for the heads up! I've updated the issue to include the full debug output for all actions.

@jacobbednarz jacobbednarz added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it. labels Feb 14, 2022
@jacobbednarz
Copy link
Member

thanks @acchiao. it looks like we're sending 0 as the requested validity timespan (and the service is defaulting to the longest) so will need to dig into why that is :/

@nboaldin
Copy link

nboaldin commented Mar 8, 2022

👋 Is there any progress on this?

boekkooi-lengoo added a commit to boekkooi-lengoo/terraform-provider-cloudflare that referenced this issue Mar 10, 2022
Instead of trying and failing to calculate the requested validity of the certificate we can use the returned validity.
It looks like `requested_validity` was being used in 2 ways.
The first one was to request the certificate for a time period and the second to indicate the amount of day the certificate is still valid.

The calculation is no longer done and could be seen as a BC break but since the current setup is causing issue like cloudflare#1448, cloudflare#1276 and cloudflare#1031. I expect that this is acceptable.

Related API docs: https://api.cloudflare.com/#origin-ca-get-certificate
@peruzzof
Copy link
Contributor

I think that this issue was fixed with the PR #1502 and can be closed.

@jacobbednarz
Copy link
Member

thanks @peruzzof

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants