Skip to content

Commit

Permalink
Add --blocks-section flag to generate command
Browse files Browse the repository at this point in the history
Render blocks in separate section if this flag is defined.
  • Loading branch information
kangasta committed Aug 12, 2024
1 parent d7f01fc commit 1cfcf0b
Show file tree
Hide file tree
Showing 24 changed files with 1,043 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RenderedProviderName: terraform-provider-scaffolding
SchemaMarkdown: <!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `configurable_attribute` (String) Example configurable attribute

Expand Down Expand Up @@ -102,7 +102,7 @@ RenderedProviderName: terraform-provider-scaffolding
SchemaMarkdown: <!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `endpoint` (String) Example provider attribute

Expand Down Expand Up @@ -149,7 +149,7 @@ RenderedProviderName: terraform-provider-scaffolding
SchemaMarkdown: <!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `configurable_attribute` (String) Example configurable attribute
- `defaulted` (String) Example configurable attribute with default value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RenderedProviderName: terraform-provider-scaffolding
SchemaMarkdown: <!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `configurable_attribute` (String) Example configurable attribute

Expand Down Expand Up @@ -102,7 +102,7 @@ RenderedProviderName: terraform-provider-scaffolding
SchemaMarkdown: <!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `endpoint` (String) Example provider attribute

Expand Down Expand Up @@ -149,7 +149,7 @@ RenderedProviderName: terraform-provider-scaffolding
SchemaMarkdown: <!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `configurable_attribute` (String) Example configurable attribute
- `defaulted` (String) Example configurable attribute with default value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ data "scaffolding_example" "example" {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `configurable_attribute` (String) Example configurable attribute

Expand Down Expand Up @@ -87,7 +87,7 @@ provider "scaffolding" {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `endpoint` (String) Example provider attribute
-- expected-resource.md --
Expand All @@ -114,7 +114,7 @@ resource "scaffolding_example" "example" {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `configurable_attribute` (String) Example configurable attribute
- `defaulted` (String) Example configurable attribute with default value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class MyConvertedCode(TerraformStack):
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `has_computed_default` (String) If set, its literal value will be stored and returned. If not, its value defaults to `"default"`. This argument exists primarily for testing and has little practical use.
- `inputs` (Map of String) A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.
Expand Down Expand Up @@ -339,7 +339,7 @@ class MyConvertedCode(TerraformStack):
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `triggers` (Map of String) A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.

Expand Down Expand Up @@ -456,7 +456,7 @@ class MyConvertedCode extends TerraformStack {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `hasComputedDefault` (String) If set, its literal value will be stored and returned. If not, its value defaults to `"default"`. This argument exists primarily for testing and has little practical use.
- `inputs` (Map of String) A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.
Expand Down Expand Up @@ -577,7 +577,7 @@ class MyConvertedCode extends TerraformStack {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `triggers` (Map of String) A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.

Expand Down Expand Up @@ -663,7 +663,7 @@ output "all_server_ips" {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `has_computed_default` (String) If set, its literal value will be stored and returned. If not, its value defaults to `"default"`. This argument exists primarily for testing and has little practical use.
- `inputs` (Map of String) A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.
Expand Down Expand Up @@ -758,7 +758,7 @@ resource "null_resource" "cluster" {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `triggers` (Map of String) A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Example provider
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `endpoint` (String) Example provider attribute
-- expected-resource.md --
Expand All @@ -66,12 +66,14 @@ example resource
<!-- schema generated by tfplugindocs -->
## Schema

### Optional Attributes
### Optional

- `bool_attribute` (Boolean) example bool attribute
- `float64_attribute` (Number) example float64 attribute
- `int64_attribute` (Number) example int64 attribute
- `list_attribute` (List of String) example list attribute
- `list_nested_block` (Block List) example list nested block (see [below for nested schema](#nestedblock--list_nested_block))
- `list_nested_block_sensitive_nested_attribute` (Block List) (see [below for nested schema](#nestedblock--list_nested_block_sensitive_nested_attribute))
- `map_attribute` (Map of String) example map attribute
- `number_attribute` (Number) example number attribute
- `object_attribute` (Object) example object attribute (see [below for nested schema](#nestedatt--object_attribute))
Expand All @@ -86,104 +88,96 @@ example resource
- `sensitive_set_attribute` (Set of String, Sensitive) example sensitive set attribute
- `sensitive_string_attribute` (String, Sensitive) example sensitive string attribute
- `set_attribute` (Set of String) example set attribute
- `string_attribute` (String) example string attribute

### Blocks

- `list_nested_block` (Block List) example list nested block (see [below for nested schema](#nestedblock--list_nested_block))
- `list_nested_block_sensitive_nested_attribute` (Block List) (see [below for nested schema](#nestedblock--list_nested_block_sensitive_nested_attribute))
- `set_nested_block` (Block Set) example set nested block (see [below for nested schema](#nestedblock--set_nested_block))
- `single_nested_block` (Block, Optional) example single nested block (see [below for nested schema](#nestedblock--single_nested_block))
- `single_nested_block_sensitive_nested_attribute` (Block, Optional) example sensitive single nested block (see [below for nested schema](#nestedblock--single_nested_block_sensitive_nested_attribute))
- `string_attribute` (String) example string attribute

### Read-Only

- `id` (String) The ID of this resource.
- `set_nested_block_sensitive_nested_attribute` (Block Set) example sensitive set nested block (see [below for nested schema](#nestedblock--set_nested_block_sensitive_nested_attribute))

<a id="nestedatt--object_attribute"></a>
### Nested Schema for `object_attribute`
<a id="nestedblock--list_nested_block"></a>
### Nested Schema for `list_nested_block`

Optional Attributes:
Optional:

- `object_attribute_attribute` (String)
- `list_nested_block_attribute` (String) example list nested block attribute
- `list_nested_block_attribute_with_default` (String) example list nested block attribute with default
- `nested_list_block` (Block List) (see [below for nested schema](#nestedblock--list_nested_block--nested_list_block))

<a id="nestedblock--list_nested_block--nested_list_block"></a>
### Nested Schema for `list_nested_block.nested_list_block`

<a id="nestedatt--object_attribute_with_nested_object_attribute"></a>
### Nested Schema for `object_attribute_with_nested_object_attribute`
Optional:

Optional Attributes:
- `nested_block_string_attribute` (String) example nested block string attribute

- `nested_object` (Object) (see [below for nested schema](#nestedobjatt--object_attribute_with_nested_object_attribute--nested_object))
- `object_attribute_attribute` (String)

<a id="nestedobjatt--object_attribute_with_nested_object_attribute--nested_object"></a>
### Nested Schema for `object_attribute_with_nested_object_attribute.nested_object`

Optional Attributes:
<a id="nestedblock--list_nested_block_sensitive_nested_attribute"></a>
### Nested Schema for `list_nested_block_sensitive_nested_attribute`

- `nested_object_attribute` (String)
Optional:

- `list_nested_block_attribute` (String) example list nested block attribute
- `list_nested_block_sensitive_attribute` (String, Sensitive) example sensitive list nested block attribute


<a id="nestedatt--sensitive_object_attribute"></a>
### Nested Schema for `sensitive_object_attribute`
<a id="nestedatt--object_attribute"></a>
### Nested Schema for `object_attribute`

Optional Attributes:
Optional:

- `object_attribute_attribute` (String)


<a id="nestedblock--list_nested_block"></a>
### Nested Schema for `list_nested_block`

Optional Attributes:

- `list_nested_block_attribute` (String) example list nested block attribute
- `list_nested_block_attribute_with_default` (String) example list nested block attribute with default
<a id="nestedatt--object_attribute_with_nested_object_attribute"></a>
### Nested Schema for `object_attribute_with_nested_object_attribute`

Blocks:
Optional:

- `nested_list_block` (Block List) (see [below for nested schema](#nestedblock--list_nested_block--nested_list_block))
- `nested_object` (Object) (see [below for nested schema](#nestedobjatt--object_attribute_with_nested_object_attribute--nested_object))
- `object_attribute_attribute` (String)

<a id="nestedblock--list_nested_block--nested_list_block"></a>
### Nested Schema for `list_nested_block.nested_list_block`
<a id="nestedobjatt--object_attribute_with_nested_object_attribute--nested_object"></a>
### Nested Schema for `object_attribute_with_nested_object_attribute.nested_object`

Optional Attributes:
Optional:

- `nested_block_string_attribute` (String) example nested block string attribute
- `nested_object_attribute` (String)



<a id="nestedblock--list_nested_block_sensitive_nested_attribute"></a>
### Nested Schema for `list_nested_block_sensitive_nested_attribute`
<a id="nestedatt--sensitive_object_attribute"></a>
### Nested Schema for `sensitive_object_attribute`

Optional Attributes:
Optional:

- `list_nested_block_attribute` (String) example list nested block attribute
- `list_nested_block_sensitive_attribute` (String, Sensitive) example sensitive list nested block attribute
- `object_attribute_attribute` (String)


<a id="nestedblock--set_nested_block"></a>
### Nested Schema for `set_nested_block`

Optional Attributes:
Optional:

- `set_nested_block_attribute` (String) example set nested block attribute


<a id="nestedblock--single_nested_block"></a>
### Nested Schema for `single_nested_block`

Optional Attributes:
Optional:

- `single_nested_block_attribute` (String) example single nested block attribute


<a id="nestedblock--single_nested_block_sensitive_nested_attribute"></a>
### Nested Schema for `single_nested_block_sensitive_nested_attribute`

Optional Attributes:
Optional:

- `single_nested_block_attribute` (String) example single nested block attribute
- `single_nested_block_sensitive_attribute` (String, Sensitive) example sensitive single nested block attribute
Expand Down
Loading

0 comments on commit 1cfcf0b

Please sign in to comment.