FEATURES:
- generate: Add support for state stores (#570)
- migrate: Add support for state stores (#570)
- validate: Add support for state stores (#570)
BUG FIXES:
- deps: bump github.com/hashicorp/hc-install to v0.9.4 (#589)
FEATURES:
- generate: Support multiple configuration example files in default templates (#508)
- generate/migrate/validate: Add support for list resources (#528)
FEATURES:
- generate: Add support for actions (#505)
- migrate: Add support for actions (#505)
- validate: Add support for actions (#505)
BREAKING CHANGES:
- generate: The
.ProviderShortNametemplate function now uses the rendered provider name to derive the provider short name. Users that pass in the--rendered-provider-nameflag might see a different output for this function (#492)
NOTES:
- generate: Generated import documentation will now contain more information about which methods are supported by the provider (CLI command, config by ID, config by identity). (#495)
FEATURES:
- generate: Added support for defining import example file (
import-by-string-id.tf) using Terraform configuration and theidattribute (#472) - generate: Added support for defining import example file (
import-by-identity.tf) using Terraform configuration and theidentityattribute (managed resource identity) (#496)
ENHANCEMENTS:
- validate: Add
allowed-guide-subcategoriesandallowed-resource-subcategoriesto provide a list of allowed subcategories (#456) - validate: Add
allowed-guide-subcategories-fileandallowed-resource-subcategories-fileto provide a file containing a list of allowed subcategories (#456) - generate: Default resource and function templates now use
.RenderedProviderNameinstead of.ProviderName(#492) - generate: Remove trailing whitespace from default function template when
.HasVariadicevaluates to false (#489)
BUG FIXES:
- validate: Fixed a bug that caused all non-index files to be detected as guides (#456)
- generate: Remove
subcategoryfield from default provider templates (#446)
FEATURES:
- generate: Add support for write-only arguments (#434)
BUG FIXES:
- validate: Fixed a bug that caused false positive validation errors for resource types that have the same name as the provider. (#419)
- generate: Fixed a bug that caused all generated resource documentation to have the same content when the provider has a resource type with the same name as the provider. (#419)
- generate: Fixed a bug that would return an error when a static file exists in both
templatesanddocs, which will now be ignored. (#421)
NOTES:
- all: This Go module has been updated to Go 1.22 per the Go support policy. It is recommended to review the Go 1.22 release notes before upgrading. Any consumers building on earlier Go versions may experience errors. (#400)
FEATURES:
- generate: Add support for ephemeral resources (#415)
- migrate: Add support for ephemeral resources (#415)
- validate: Add support for ephemeral resources (#415)
BUG FIXES:
- validate: File extension check now runs on
index.*files instead of justindex.mdfiles. (#413) - validate: File extension check now specifies the correct valid extensions in the error message. (#413)
- validate: Front matter check now runs with the correct options on legacy index files. (#413)
NOTES:
- validate: The number of files check has been removed to match the latest Terraform Registry ingress logic (#381)
BUG FIXES:
- generate: Prevented incorrect attribute paths with nested attributes that contain multiple attributes (#380)
BUG FIXES:
- validate: Fixed issue with provider name not defaulting to directory (#376)
BUG FIXES:
- migrate: Ensured idempotency of template files when command is ran multiple times (#364)
- generate: Prevented automatic
idattribute behaviors under blocks (#365)
BUG FIXES:
- generate: fixed a bug where attribute titles were not being generated for nested object attributes (#357)
- generate: fixed a bug where the
plainmarkdownfunction did not output plain URLs (#361)
BREAKING CHANGES:
- generate: the
plainmarkdownfunction now removes all markdown elements/formatting to render the output as plain text (#332) - schemamd: The
schemamdpackage has moved tointernal/schemamdand can no longer be imported (#354) - functionmd: The
functionmdpackage has moved tointernal/functionmdand can no longer be imported (#354)
FEATURES:
- validate: Added support for Provider-defined Function documentation to all checks (#341)
- validate: Added
InvalidDirectoriesCheckwhich checks for valid provider documentation folder structure (#341) - validate: Added
MixedDirectoriesCheckwhich throws an error if both legacy documentation and registry documentation are found (#341) - validate: Added
NumberOfFilesCheckwhich checks the number of provider documentation files against the registry limit (#341) - validate: Added
FileSizeCheckwhich checks the provider documentation file size against the registry limit (#341) - validate: Added
FileExtensionCheckwhich checks for valid provider documentation file extensions (#341) - validate: Added
FrontMatterCheckwhich checks the YAML frontmatter of provider documentation for missing required fields or invalid fields (#341) - validate: Added
FileMismatchCheckwhich checks the names/number of provider documentation files against the provider schema (#341)
ENHANCEMENTS:
- migrate: Added
--provider-nameflag to override the default provider name when any file names that contain provider name prefixes are removed during migration (#349)
BUG FIXES:
- migrate: use relative paths (from provider directory) instead of absolute paths for migrated code templates (#330)
- migrate: fixed a bug where documentation files with provider name prefixes were migrated to templates directory as-is, causing
generateto create duplicate templates (#349) - generate: fixed a bug where incorrect attribute titles were being generated for certain nested schemas (#350)
FEATURES:
- generate: Add support for Provider-defined Function documentation (#328)
- migrate: Add support for Provider-defined Function documentation (#328)
ENHANCEMENTS:
- validate: Add
functionsto list of allowed template and rendered website subdirectories (#328)
BREAKING CHANGES:
- generate: templates using
printfwith eithercodefileortffileto render code examples in markdown will need to switch to using those functions directly. For example, switch the following template code:{{printf "{{codefile \"shell\" %q}}" .ImportFile}}to{{codefile "shell" .ImportFile}}(#300)
FEATURES:
- migrate: Added new
migratesubcommand that migrates existing provider docs using the rendered website source directories (website/docs/or/docs/) to aterraform-plugin-docs-supported templates directory. (#314)
ENHANCEMENTS:
- generate: Add
provider-schemaflag to pass in a file path to a provider schema JSON file, allowing the command to skip building the provider and calling Terraform CLI (#299)
BUG FIXES:
- generate: fix
no such file or directoryerror when runninggeneratewith no existing rendered website directory. (#296) - generate: fix incorrect rendering of example and import files for providers with no docs templates or with generic fallback templates. (#300)
ENHANCEMENTS:
- generate: Prevent files and subdirectories in the rendered website directory that are not directly managed by
tfplugindocsfrom being deleted during generation (#267) - validate: Add
cdktfto list of allowed rendered website subdirectories (#267)
BREAKING CHANGES:
- generate: The
legacy-sidebarflag has been removed without replacement. It implemented no logic and is not necessary with Terraform Registry based documentation (#258)
NOTES:
- This Go module has been updated to Go 1.19 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#231)
ENHANCEMENTS:
- generate: Added
provider-dirflag, which enables the command to be run from any directory (#259)
BUG FIXES:
- dependencies:
github.com/hashicorp/terraform-execdependency upgraded tov0.18.1to avoid causing acceptance test failures whenterraform-plugin-sdkorterraform-plugin-testingare in use (#226)
NOTES:
- This Go module has been updated to Go 1.18 per the Go support policy. Any consumers building on earlier Go versions may experience errors (#199)
ENHANCEMENTS:
- schemamd: Nested attributes are now correctly grouped in "optional", "required" and "read-only" (#163).
BUG FIXES:
- template functions:
titlenow capitalizes each word in the input string, instead of upper-casing them (#165).
BUG FIXES:
- template data: A regression was introduced in #155 making template data field
HasExampleandHasImportalways true (#162).
NEW FEATURES:
- template functions: Added
lower,upperandtitle(#162).
ENHANCEMENTS:
- Added documentation for all the template functions and template data fields (#162).
NEW FEATURES:
- cmd/tfplugindocs: Additional CLI argument
ignore-deprecatedallows to skip deprecated resources and data-sources when generating docs (#154).
BUG FIXES:
- cmd/tfplugindocs: Pass through filepaths for
examplesandimportto allow use ofHasExampleandHasImporttemplate helpers in custom templates (#155). - cmd/tfplugindocs: Fixed issue with the generation of title and reference links, when nested attributes go too deep (#56).
BUG FIXES:
- cmd/tfplugindocs: Do not error when schema not found, issue log warning (#151).
BUG FIXES:
- cmd/tfplugindocs: Allow single word resources to use templates (#147).
- cmd/tfplugindocs: Pass in correct provider name for data-source and resource schema lookup when overidden with
rendered-provider-nameflag (#148).
ENHANCEMENTS:
- cmd/tfplugindocs: Expose
RenderedProviderNameto templates (#149).
NEW FEATURES:
- cmd/tfplugindocs: Additional CLI arguments
provider-name,rendered-provider-name,rendered-website-dir,examples-dir,website-temp-dir, andwebsite-source-dir. These allow to further customise generated doc (#95).
ENHANCEMENTS:
- cmd/tfplugindocs: Implemented usage output (i.e.
--help) forgenerateandvalidatecommands (#95).
BUG FIXES:
- cmd/tfplugindocs: Updated version of hc-install in response to change in HashiCorp Release API sending back a different
Content-Typeheader. This was causing failures when the tool attempted to install Terraform. (#135)
ENHANCEMENTS:
- template functions: Added
splitto help separating a string into substrings (#70).
BUG FIXES:
- cmd/tflugindocs: Support for schemas containing empty nested attributes or empty nested blocks (#99, #134).
- schemamd: Attribute
IDis considered "Read Only", unless there's a description defined, in which case it's handled like any other attribute in the schema (#46, #134).
ENHANCEMENTS:
- cmd/tfplugindocs: Use existing Terraform CLI binary if available on PATH, otherwise download latest Terraform CLI binary (#124).
- cmd/tfplugindocs: Added
tf-versionflag for specifying Terraform CLI binary version to download, superseding the PATH lookup (#124).
BUG FIXES:
- cmd/tfplugindocs: Swapped
.Typeand.Nameresource and data source template fields so they correctly align (#44). - schemamd: Switched attribute name rendering from bold text to code blocks so the Terraform Registry treats them as anchor links (#59).
NOTES:
- dependencies:
github.com/hashicorp/terraform-execdependency has been updated to matchterraform-plugin-sdk, which replaced the removedtfinstallpackage withgithub.com/hashicorp/hc-install. This will resolve Go build errors for projects that import bothterraform-plugin-docsandterraform-plugin-sdk.