You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
╷
│ Error: Invalid use of ephemeral value
│
│ with restful_resource.test,
│ on main.tf line 30, in resource "restful_resource" "test":
│ 30: resource "restful_resource" "test" {
│
│ Ephemeral values are not valid for "ephemeral_body.secret", because it is not an assignable
│ attribute.
╵
Expected Behavior
Terraform should accept this config as ephemeral_body is marked as WriteOnly: true, albeit it is of dynamic type.
Actual Behavior
terraform validate failed with error:
╷
│ Error: Invalid use of ephemeral value
│
│ with restful_resource.test,
│ on main.tf line 30, in resource "restful_resource" "test":
│ 30: resource "restful_resource" "test" {
│
│ Ephemeral values are not valid for "ephemeral_body.secret", because it is not an assignable
│ attribute.
╵
Instruct terraform to use the locally built provider via modifying the .terraformrc
terraform validate with the config above
Additional Context
Since the write-only attribute support PR is merged in FW recently, I'm trying to support that in my restful provider.
The provider offers a general resource restful_resource, whose body is defined as a dynamic value. For the same reason, I've introduced a new optional attribute ephemeral_body which has the WriteOnly: true, and is also a dynamic value. I expect as long the ephemeral_body is marked as write-only, then it can reference a ephemeral value.
However, it turns out I can only directly assign an ephemeral value to ephemeral_body, but can't assign it to a nested field. I find the error is raised from Terraform, therefore submitting the issue here.
References
No response
Generative AI / LLM assisted development?
No response
The text was updated successfully, but these errors were encountered:
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
Terraform should accept this config as
ephemeral_body
is marked asWriteOnly: true
, albeit it is of dynamic type.Actual Behavior
terraform validate
failed with error:Steps to Reproduce
magodo/terraform-provider-restful
at branch: https://github.com/magodo/terraform-provider-restful/tree/ephemeral_body.terraformrc
terraform validate
with the config aboveAdditional Context
Since the write-only attribute support PR is merged in FW recently, I'm trying to support that in my restful provider.
The provider offers a general resource
restful_resource
, whosebody
is defined as a dynamic value. For the same reason, I've introduced a new optional attributeephemeral_body
which has theWriteOnly: true
, and is also a dynamic value. I expect as long theephemeral_body
is marked as write-only, then it can reference a ephemeral value.However, it turns out I can only directly assign an ephemeral value to
ephemeral_body
, but can't assign it to a nested field. I find the error is raised from Terraform, therefore submitting the issue here.References
No response
Generative AI / LLM assisted development?
No response
The text was updated successfully, but these errors were encountered: