terraform-provider-cloudflare: Provider produced invalid plan
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: 1.3.9 cloudflare: 4.0.0
Affected resource(s)
efs_volumes
Terraform configuration files
main.tf
provider "cloudflare" {
email = var.cloudflare_email
api_key = var.cloudflare_api_key
}
Link to debug output
https://gist.github.com/mrarar/0626767498350b8049f4e06a8327c599
Panic output
No response
Expected output
Successful terraform plan.
Actual output
│ Error: Provider produced invalid plan │ │ Provider “registry.terraform.io/cloudflare/cloudflare” planned an invalid │ value for cloudflare_record.efs_volumes_stg.allow_overwrite: planned value │ cty.False for a non-computed attribute. │ │ This is a bug in the provider, which should be reported in the provider’s │ own issue tracker. ╵ ╷ │ Error: Provider produced invalid plan │ │ Provider “registry.terraform.io/cloudflare/cloudflare” planned an invalid │ value for cloudflare_record.efs_volumes_stg.tags: planned value │ cty.SetValEmpty(cty.String) for a non-computed attribute. │ │ This is a bug in the provider, which should be reported in the provider’s │ own issue tracker. ╵ ╷ │ Error: Provider produced invalid plan │ │ Provider “registry.terraform.io/cloudflare/cloudflare” planned an invalid │ value for cloudflare_record.efs_volumes_stg.comment: planned value │ cty.StringVal(“”) for a non-computed attribute. │ │ This is a bug in the provider, which should be reported in the provider’s │ own issue tracker. ╵ ╷ │ Error: Provider produced invalid plan │ │ Provider “registry.terraform.io/cloudflare/cloudflare” planned an invalid │ value for cloudflare_record.efs_volumes_stg.proxied: planned value │ cty.False for a non-computed attribute. │ │ This is a bug in the provider, which should be reported in the provider’s │ own issue tracker.
Steps to reproduce
terraform init. terraform plan.
Additional factoids
No response
References
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 22
- Comments: 20 (1 by maintainers)
I was doing a POC and I had to use version 3.31.0 of the provider for it to run properly without
commentsandtagsarguments. The issue starts on 3.32.0 https://github.com/cloudflare/terraform-provider-cloudflare/commit/3401db071cea511b73e9347095dff3455b512be4Also setting
tagswill not work if you are using a free account: https://developers.cloudflare.com/dns/manage-dns-records/reference/record-attributes/#record-tagsSame issue with different resources: Cloudflare Provider Version: v4.5.0
It appears what is happening is that the cloudflare_record resource is forcing the optional configs and would not pass my terraform plan until I added in values to
allow_overwrite,comment,proxied, andtags.thanks @simpson-ross 🙇 that helps clarify things here.
this is expected since terraform < 1.1.5 had an issue (hashicorp/terraform#30330) which incorrectly marked fields as
nullable=false. it was already addressed in 1.2.x but this fix was backported to 1.1.5 if you must run the 1.x release series.do you see this behaviour with terraform > 1.2 and the 4.x release of the provider?
I am having this problem in other resources (mainly from cloudflare zerotrust) and in my case I have some resources that I need to create that are only available in the 4+ versions of the provider, so I am waiting for the resolution of this case. For now I use the provider in version 3.31, but without creating some resources having to resort to clickops (for example zerotrust lists)
Same here, we have to pin back to 3.32 in our case
This worked for me as well @edumgui
same even for us
[31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[2].tags: planned value [31m│[0m [0mcty.SetValEmpty(cty.String) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[2].allow_overwrite: planned value [31m│[0m [0mcty.False for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[2].proxied: planned value cty.False for a [31m│[0m [0mnon-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[2].comment: planned value [31m│[0m [0mcty.StringVal(“”) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[3].allow_overwrite: planned value [31m│[0m [0mcty.False for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[3].tags: planned value [31m│[0m [0mcty.SetValEmpty(cty.String) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[3].proxied: planned value cty.False for a [31m│[0m [0mnon-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[3].comment: planned value [31m│[0m [0mcty.StringVal(“”) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[0].allow_overwrite: planned value [31m│[0m [0mcty.False for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[0].tags: planned value [31m│[0m [0mcty.SetValEmpty(cty.String) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[0].proxied: planned value cty.False for a [31m│[0m [0mnon-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[0].comment: planned value [31m│[0m [0mcty.StringVal(“”) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[1].tags: planned value [31m│[0m [0mcty.SetValEmpty(cty.String) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[1].allow_overwrite: planned value [31m│[0m [0mcty.False for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[1].proxied: planned value cty.False for a [31m│[0m [0mnon-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m [31m╷[0m[0m [31m│[0m [0m[1m[31mError: [0m[0m[1mProvider produced invalid plan[0m [31m│[0m [0m [31m│[0m [0m[0mProvider “registry.terraform.io/cloudflare/cloudflare” planned an invalid [31m│[0m [0mvalue for cloudflare_record.main[1].comment: planned value [31m│[0m [0mcty.StringVal(“”) for a non-computed attribute. [31m│[0m [0m [31m│[0m [0mThis is a bug in the provider, which should be reported in the provider’s [31m│[0m [0mown issue tracker. [31m╵[0m[0m