-
Notifications
You must be signed in to change notification settings - Fork 17
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
Prefect Block Resource: Type error in docs #255
Comments
Hey @scondo-prof, thanks for reaching out. This field is a bit unique - it's technically a
Could you show an example of the configuration you were using so I can see what specific example you have in mind? This field was a bit weird to work with since it had to be so flexible, so I'm curious to see if we could use |
Thank you for the response mitchell:
|
Clarifies the expected data format for the "data" argument in the Block resource. The specific type is `schema.stringAttribute`, but we also set a CustomType of `jsontypes.NormalizedType`, which is an RFC 7159 JSON string. The Terraform Documentation tooling does not consider the CustomType field, so in the generated markdown it only say `String, Sensitive`. This can be confusing for users who expect to just pass any string here. So this change: - Clarifies the format expectations in the `data` argument description - Updates the examples to ensure we use `jsonencode` consistently Related to #255
Thanks for the extra context @scondo-prof, that helps a lot. I opened #257 to make this clearer. Could you take a look and see if that helps? |
Mitch, First, I would like to apologize for calling you Mitchell in my response. Second, that is incredibly helpful! I have another question Mitch unrelated to my confusion in the documentation, Will there be a Terraform Resource for Account API Keys developed? I know that there is one for ServiceAccount which in turn gives an API key with a permission set, but that requires to be on a paid version of Prefect. As a developer whom cant afford that at the current moment, I was wondering if you and your fellow incredible devs were thinking about creating that resource? For people whom are lower on the totem pole and are utilizing the lowest tier of Prefect, this Terraform Resource would truly help with credential rotation to keep an environment as secure as possible. Best, Scott |
No worries at all! I go by either name. We'll get that PR merged, just need to fix a CI configuration drift that's making acceptance tests fail. To your other question: this sounds very reasonable, and we definitely plan to (and already do) support APIs that are not specific to Prefect Cloud (see https://github.com/PrefectHQ/terraform-provider-prefect?tab=readme-ov-file#supported-objects). Let me open a separate issue and we can get on the same page there. |
* Block "data" argument: Clarify expected data format Clarifies the expected data format for the "data" argument in the Block resource. The specific type is `schema.stringAttribute`, but we also set a CustomType of `jsontypes.NormalizedType`, which is an RFC 7159 JSON string. The Terraform Documentation tooling does not consider the CustomType field, so in the generated markdown it only say `String, Sensitive`. This can be confusing for users who expect to just pass any string here. So this change: - Clarifies the format expectations in the `data` argument description - Updates the examples to ensure we use `jsonencode` consistently Related to #255 * Fix Marvin account email
The |
Community Note
Attribute in Prefect Block Resource
Data Type Difference
In the documentation it states that the type for Attribute Data -> String, Sensitive
This simply is not true, when I built it, it was of type map(string).
Godspeed and happy developing
The text was updated successfully, but these errors were encountered: