Resource cloudflare_api_token
fails due to schema issues with permission_groups.id
#4591
Closed
3 tasks done
Labels
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.
triage/debug-log-attached
Indicates an issue or PR has a complete Terraform debug log.
Confirmation
Terraform and Cloudflare provider version
Terraform v1.8.5
on windows_amd64
Affected resource(s)
cloudflare_api_token
Terraform configuration files
Link to debug output
https://gist.github.com/jrogers-dlp/a2e4e2d6dabcc623a770ee36c597cf73
Panic output
No response
Expected output
Expected id to be set for permission group and terraform plan shown like so:
Actual output
Terraform error on attempting to set a read-only attribute.
Steps to reproduce
terraform init
with cloudflare provider version5.0.0-alpha1
cloudflare_api_token
that creates an api tokenterraform apply
Additional factoids
Feels like with the current way that it is written, there is no valid resource configuration for
cloudflare_api_token
, aspolicies.permission_groups.id
is listed as computed in the schema so it cannot be set.I also tried modifying
internal/services/api_token/resource.go
andinternal/services/api_token/model.go
to change id fromcomputed
torequired
and rebuilt, and the resource does then succeed to at least the plan step. However, I'm currently having issues with the api not accepting anything I give the resources attribute so I havent gotten the resource to fully create yet, but that part is potentially just my own ignorance.References
No response
The text was updated successfully, but these errors were encountered: