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

Setting a DNS record's proxied flag to false stopped working in 1.1.0 #103

Closed
maetthu opened this issue Jul 31, 2018 · 5 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/question Categorizes issue or PR as related to a question about the provider or the use of the provider. kind/regression Categorizes issue or PR as related to a regression from a prior release.

Comments

@maetthu
Copy link

maetthu commented Jul 31, 2018

Terraform Version

v0.11.7

Affected Resource(s)

  • cloudflare_record

Terraform Configuration Files

resource "cloudflare_record" "www-a" {
  domain  = "example.org"
  name    = "www"
  type    = "A"
  value   = "1.2.3.4"
  ttl     = 1
  proxied = "false"
}

Expected Behavior

Toggling proxied from true to false should disable the proxied state of the DNS record.

Actual Behavior

The changes are reported to be applied successfully, but the record stays proxied at Cloudflare, running terraform again also tries to apply changes again. Setting an unproxied record to proxied works, disabling it does not. Both work with provider version 1.0.0, but setting to false doesn't with 1.1.0.

@patryk
Copy link
Contributor

patryk commented Jul 31, 2018

It works fine for me. Could you send a trace log? https://www.terraform.io/docs/internals/debugging.html

@patryk patryk added kind/bug Categorizes issue or PR as related to a bug. kind/question Categorizes issue or PR as related to a question about the provider or the use of the provider. waiting-response kind/regression Categorizes issue or PR as related to a regression from a prior release. labels Jul 31, 2018
@maetthu
Copy link
Author

maetthu commented Jul 31, 2018

@patryk Sure, here you are:

  1. I created following record:
provider "cloudflare" {
  api_client_logging = true

  version = "~> 1.1.0"
}

resource "cloudflare_record" "blubber-a" {
  domain  = "gameswelt.de"
  name    = "blubber"
  type    = "A"
  value   = "1.1.1.1"
  ttl     = 1
  proxied = "true"
}

With following apply output:

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + cloudflare_record.blubber-a
      id:          <computed>
      created_on:  <computed>
      domain:      "gameswelt.de"
      hostname:    <computed>
      metadata.%:  <computed>
      modified_on: <computed>
      name:        "blubber"
      proxiable:   <computed>
      proxied:     "true"
      ttl:         "1"
      type:        "A"
      value:       "1.1.1.1"
      zone_id:     <computed>


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

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

cloudflare_record.blubber-a: Creating...
  created_on:  "" => "<computed>"
  domain:      "" => "gameswelt.de"
  hostname:    "" => "<computed>"
  metadata.%:  "" => "<computed>"
  modified_on: "" => "<computed>"
  name:        "" => "blubber"
  proxiable:   "" => "<computed>"
  proxied:     "" => "true"
  ttl:         "" => "1"
  type:        "" => "A"
  value:       "" => "1.1.1.1"
  zone_id:     "" => "<computed>"
cloudflare_record.blubber-a: Creation complete after 1s (ID: 0793c4efc5643411bf63bc01ef5f60fb)

Corresponding trace:
terraform-cloudflare-create.log

  1. Changed proxied from true to false
provider "cloudflare" {
  api_client_logging = true

  version = "~> 1.1.0"
}

resource "cloudflare_record" "blubber-a" {
  domain  = "gameswelt.de"
  name    = "blubber"
  type    = "A"
  value   = "1.1.1.1"
  ttl     = 1
  proxied = "false"
}

with following apply output:

cloudflare_record.blubber-a: Refreshing state... (ID: 0793c4efc5643411bf63bc01ef5f60fb)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ cloudflare_record.blubber-a
      proxied: "true" => "false"


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

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

cloudflare_record.blubber-a: Modifying... (ID: 0793c4efc5643411bf63bc01ef5f60fb)
  proxied: "true" => "false"
cloudflare_record.blubber-a: Modifications complete after 1s (ID: 0793c4efc5643411bf63bc01ef5f60fb)

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

And following trace: terraform-cloudflare-update.log

The record stayed as proxied in Cloudflare.
screenshot_20180731_170243

@garrettgalow
Copy link
Contributor

I can repro, so we should be able to figure out what the issue is. Thanks for the report

@patryk
Copy link
Contributor

patryk commented Aug 10, 2018

Thanks for report Matthias! The commit cloudflare/cloudflare-go@a467673 has fixed it. Will prepare a release soon.

@patryk patryk closed this as completed Aug 10, 2018
@maetthu
Copy link
Author

maetthu commented Aug 10, 2018

cool, thx!

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. kind/question Categorizes issue or PR as related to a question about the provider or the use of the provider. kind/regression Categorizes issue or PR as related to a regression from a prior release.
Projects
None yet
Development

No branches or pull requests

3 participants