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

Block "data" argument: Clarify expected data format #257

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

mitchnielsen
Copy link
Contributor

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

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
@mitchnielsen mitchnielsen merged commit f1ab693 into main Sep 20, 2024
7 checks passed
@mitchnielsen mitchnielsen deleted the block-data-clarify-type branch September 20, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants