Skip to content

docs: add support for description in all field of the schemas #3273

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

Merged
merged 10 commits into from
Aug 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tfproviderlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
run: go install github.com/bflad/tfproviderlint/cmd/tfproviderlint
- name: Run tfproviderlint
run: make tfproviderlint
- name: Run tfproviderlintx
run: make tfproviderlintx
tfproviderdocs:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ tfproviderlint:

tfproviderdocs:
go tool tfproviderdocs check -provider-name scaleway -enable-contents-check

tfproviderlintx:
go tool tfproviderlintx -XR001=false -XS002=false ./...
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ require (
tool (
github.com/bflad/tfproviderdocs
github.com/bflad/tfproviderlint/cmd/tfproviderlint
github.com/bflad/tfproviderlint/cmd/tfproviderlintx
github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
github.com/katbyte/terrafmt
)
5 changes: 3 additions & 2 deletions internal/services/baremetal/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ If this behaviour is wanted, please set 'reinstall_on_ssh_key_changes' argument
Elem: ResourceServerIP(),
},
"domain": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Domain associated with the server",
Computed: true,
},
"options": {
Type: schema.TypeSet,
Expand Down
10 changes: 6 additions & 4 deletions internal/services/billing/consumption_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ func DataSourceConsumptions() *schema.Resource {
"organization_id": account.OrganizationIDSchema(),
"project_id": account.ProjectIDSchema(),
"consumptions": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Description: "List of the consumptions.",
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"value": {
Expand Down Expand Up @@ -63,8 +64,9 @@ func DataSourceConsumptions() *schema.Resource {
},
},
"updated_at": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "Date and time when the consumption was updated",
Type: schema.TypeString,
},
},
}
Expand Down
5 changes: 3 additions & 2 deletions internal/services/billing/invoices_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ func DataSourceInvoices() *schema.Resource {
Description: "The invoice type. It can either be `periodic` or `purchase`",
},
"invoices": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Description: "List of invoices",
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Expand Down
1 change: 0 additions & 1 deletion internal/services/container/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func ResourceDomain() *schema.Resource {
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(defaultContainerDomainTimeout),
Read: schema.DefaultTimeout(defaultContainerDomainTimeout),
Update: schema.DefaultTimeout(defaultContainerDomainTimeout),
Delete: schema.DefaultTimeout(defaultContainerDomainTimeout),
Default: schema.DefaultTimeout(defaultContainerDomainTimeout),
},
Expand Down
17 changes: 11 additions & 6 deletions internal/services/container/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,39 @@ func ResourceToken() *schema.Resource {
Schema: map[string]*schema.Schema{
"container_id": {
Type: schema.TypeString,
Description: "Container ID",
ForceNew: true,
Optional: true,
ExactlyOneOf: []string{"namespace_id"},
DiffSuppressFunc: dsf.Locality,
},
"namespace_id": {
Type: schema.TypeString,
Description: "Namespace ID",
ForceNew: true,
Optional: true,
ExactlyOneOf: []string{"container_id"},
DiffSuppressFunc: dsf.Locality,
},
"description": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Description: "Description of the token.",
Optional: true,
ForceNew: true,
},
"expires_at": {
Type: schema.TypeString,
Description: "Expiration date of the token (TimeRFC3339)",
Optional: true,
ForceNew: true,
ValidateDiagFunc: verify.IsDate(),
DiffSuppressFunc: dsf.TimeRFC3339,
},
"token": {
Type: schema.TypeString,
Computed: true,
Sensitive: true,
Type: schema.TypeString,
Description: "Token",
Computed: true,
Sensitive: true,
},

"region": regional.Schema(),
Expand Down
7 changes: 4 additions & 3 deletions internal/services/domain/registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ func ResourceRegistration() *schema.Resource {
Description: "List of domain names to be managed.",
},
"duration_in_years": {
Type: schema.TypeInt,
Optional: true,
Default: 1,
Type: schema.TypeInt,
Description: "Duration of the registration period in years.",
Optional: true,
Default: 1,
},
"owner_contact_id": {
Type: schema.TypeString,
Expand Down
5 changes: 3 additions & 2 deletions internal/services/edgeservices/cache_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ func ResourceCacheStage() *schema.Resource {
Description: "The Time To Live (TTL) in seconds. Defines how long content is cached",
},
"purge_requests": {
Type: schema.TypeSet,
Optional: true,
Type: schema.TypeSet,
Description: "Set of purge requests",
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"pipeline_id": {
Expand Down
45 changes: 27 additions & 18 deletions internal/services/flexibleip/data_source_flexible_ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,43 @@ func DataSourceFlexibleIPs() *schema.Resource {
Description: "Flexible IPs with these exact tags are listed",
},
"ips": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Description: "List of flexible IPs",
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "ID of the flexible IP",
Type: schema.TypeString,
},
"description": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "Description of the flexible IP",
Type: schema.TypeString,
},
"tags": {
Computed: true,
Type: schema.TypeList,
Computed: true,
Description: "List of flexible IP tags",
Type: schema.TypeList,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"status": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "Status of the flexible IP",
Type: schema.TypeString,
},
"ip_address": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "IP address of the flexible IP",
Type: schema.TypeString,
},
"reverse": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "Reverse DNS of the flexible IP",
Type: schema.TypeString,
},
"mac_address": {
Type: schema.TypeList,
Expand Down Expand Up @@ -106,12 +113,14 @@ func DataSourceFlexibleIPs() *schema.Resource {
},
},
"created_at": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "Date on which the flexible IP was created (RFC 3339 format)",
Type: schema.TypeString,
},
"updated_at": {
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: "Date on which the flexible IP was last updated (RFC 3339 format)",
Type: schema.TypeString,
},
"zone": zonal.ComputedSchema(),
"organization_id": account.OrganizationIDSchema(),
Expand Down
1 change: 0 additions & 1 deletion internal/services/function/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func ResourceDomain() *schema.Resource {
Timeouts: &schema.ResourceTimeout{
Default: schema.DefaultTimeout(DefaultFunctionTimeout),
Read: schema.DefaultTimeout(DefaultFunctionTimeout),
Update: schema.DefaultTimeout(DefaultFunctionTimeout),
Delete: schema.DefaultTimeout(DefaultFunctionTimeout),
Create: schema.DefaultTimeout(DefaultFunctionTimeout),
},
Expand Down
17 changes: 11 additions & 6 deletions internal/services/function/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,39 @@ func ResourceToken() *schema.Resource {
Schema: map[string]*schema.Schema{
"function_id": {
Type: schema.TypeString,
Description: "The ID of the function",
ForceNew: true,
Optional: true,
ExactlyOneOf: []string{"namespace_id"},
DiffSuppressFunc: dsf.Locality,
},
"namespace_id": {
Type: schema.TypeString,
Description: "The ID of the namespace",
ForceNew: true,
Optional: true,
ExactlyOneOf: []string{"function_id"},
DiffSuppressFunc: dsf.Locality,
},
"description": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Description: "The description of the function",
Optional: true,
ForceNew: true,
},
"expires_at": {
Type: schema.TypeString,
Description: "The date after which the token expires RFC3339",
Optional: true,
ForceNew: true,
ValidateDiagFunc: verify.IsDate(),
DiffSuppressFunc: dsf.TimeRFC3339,
},
"token": {
Type: schema.TypeString,
Computed: true,
Sensitive: true,
Type: schema.TypeString,
Description: "Token generated",
Computed: true,
Sensitive: true,
},

"region": regional.Schema(),
Expand Down
1 change: 0 additions & 1 deletion internal/services/inference/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func ResourceModel() *schema.Resource {
Timeouts: &schema.ResourceTimeout{
Default: schema.DefaultTimeout(defaultModelTimeout),
Create: schema.DefaultTimeout(defaultModelTimeout),
Update: schema.DefaultTimeout(defaultModelTimeout),
Delete: schema.DefaultTimeout(defaultModelTimeout),
},
SchemaVersion: 0,
Expand Down
65 changes: 39 additions & 26 deletions internal/services/instance/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,59 +108,72 @@ func ResourceImage() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "UUID of the additional volume",
Computed: true,
},
"name": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Name of the additional volume",
Computed: true,
},
"export_uri": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "URI of the additional volume",
Computed: true,
},
"size": {
Type: schema.TypeInt,
Computed: true,
Type: schema.TypeInt,
Description: "Size of the additional volume",
Computed: true,
},
"volume_type": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Type of the additional volume",
Computed: true,
},
"creation_date": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Date and time of the creation of the additional volume (RFC3339)",
Computed: true,
},
"modification_date": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Date and time of the modification of the additional volume (RFC3339)",
Computed: true,
},
"organization": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Organization ID of the additional volume",
Computed: true,
},
"project": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Project ID of the additional volume",
Computed: true,
},
"tags": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Description: "List of tags attached to the additional volume",
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"state": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "The state of the additional volume",
Computed: true,
},
"zone": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Description: "Zone ID of the additional volume",
Computed: true,
},
"server": {
Type: schema.TypeMap,
Computed: true,
Type: schema.TypeMap,
Description: "Server",
Computed: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Expand Down
1 change: 1 addition & 0 deletions internal/services/instance/security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func ResourceSecurityGroup() *schema.Resource {
},
"external_rules": {
Type: schema.TypeBool,
Description: "External rules for this security group",
Optional: true,
Default: false,
ConflictsWith: []string{"inbound_rule", "outbound_rule"},
Expand Down
Loading
Loading