Comments (3)
I recently updated my tfplugindocs and now encountered this. I find this behavior confusing as well and I agree with all your points.
from terraform-plugin-docs.
It would be great if it skips marking the schema as Optional when Required
is set to true
from terraform-plugin-docs.
I looked into this and I think this is not something that can be fixed in terraform-plugin-docs
. It reads the json schema provided by the plugin and, for example, this code in the provider schema:
"api_token": {
Type: schema.TypeString,
Required: true,
DefaultFunc: schema.EnvDefaultFunc("NETBOX_API_TOKEN", nil),
Description: "Netbox API authentication token. Can be set via the `NETBOX_API_TOKEN` environment variable.",
},
leads to this in the schema (shown with terraform providers schema -json
):
"api_token": {
"type": "string",
"description": "Netbox API authentication token. Can be set via the `NETBOX_API_TOKEN` environment variable.",
"description_kind": "markdown",
"optional": true
},
Note that we went from Required: true
in to "optional": true
. So when terraform-plugin-docs
does its thing, the damage is already done.
from terraform-plugin-docs.
Related Issues (20)
- Module support HOT 2
- Support external provider binaries that are not built by go HOT 4
- Bump Expected Minimum Go Version to 1.18
- How to publish docs HOT 2
- The provider metadata schema is not generated in document
- Support new provider, resource and data source schema types HOT 3
- ID of nested schema is marked as read-only when no description HOT 2
- Error executing command: unable to generate website: unexpected error: openpgp: signature made by unknown entity HOT 1
- `v0.14.0` causes unrelated provider acceptance failures HOT 1
- Bump Expected Minimum Go Version to 1.19 HOT 1
- Data source output markdown file missing example usage subsection HOT 3
- Add validator docstrings to params for providers using terraform-plugin-framework HOT 1
- Error when resource schema element has a default value with double curly braces HOT 4
- Errors when using plugin mux with plugin sdk and framework HOT 1
- Show default values for supported timeouts HOT 5
- Hide specific config options in the docs HOT 2
- Resource schema documentation generation ignores property values HOT 2
- SchemaMarkdown contains wrong nested attribute titles
- Consider Warning/Error With Mismatched Terraform Architecture HOT 11
- Support Provider-Defined Function Documentation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-plugin-docs.