Skip to content

Commit 9b77f47

Browse files
authored
chore: add support for testing generating documentation (#3270)
* chore: add support for testing generating documentation from terraform-plugin-docs * fix uncorrect schemas
1 parent b2598ee commit 9b77f47

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ jobs:
6565
go-version: ${{ env.GO_VERSION }}
6666
- uses: hashicorp/setup-terraform@v3
6767
- run: go tool tfplugindocs validate
68+
- run: go tool tfplugindocs generate

internal/services/mongodb/instance.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,19 @@ func ResourceInstance() *schema.Resource {
189189
Schema: map[string]*schema.Schema{
190190
"id": {
191191
Type: schema.TypeString,
192+
Optional: true,
192193
Computed: true,
193194
Description: "ID of the public network",
194195
},
195196
"port": {
196197
Type: schema.TypeInt,
198+
Optional: true,
197199
Computed: true,
198200
Description: "TCP port of the endpoint",
199201
},
200202
"dns_record": {
201203
Type: schema.TypeString,
204+
Optional: true,
202205
Computed: true,
203206
Description: "The DNS record of your endpoint",
204207
},

internal/services/rdb/read_replica.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,31 @@ func ResourceReadReplica() *schema.Resource {
6161
"endpoint_id": {
6262
Type: schema.TypeString,
6363
Description: "UUID of the endpoint (UUID format).",
64+
Optional: true,
6465
Computed: true,
6566
},
6667
"ip": {
6768
Type: schema.TypeString,
6869
Description: "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set.",
70+
Optional: true,
6971
Computed: true,
7072
},
7173
"port": {
7274
Type: schema.TypeInt,
7375
Description: "TCP port of the endpoint.",
76+
Optional: true,
7477
Computed: true,
7578
},
7679
"name": {
7780
Type: schema.TypeString,
7881
Description: "Name of the endpoint.",
82+
Optional: true,
7983
Computed: true,
8084
},
8185
"hostname": {
8286
Type: schema.TypeString,
8387
Description: "Hostname of the endpoint. Only one of ip and hostname may be set.",
88+
Optional: true,
8489
Computed: true,
8590
},
8691
},

internal/services/redis/cluster.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,12 @@ func ResourceCluster() *schema.Resource {
192192
Schema: map[string]*schema.Schema{
193193
"id": {
194194
Type: schema.TypeString,
195+
Optional: true,
195196
Computed: true,
196197
},
197198
"port": {
198199
Type: schema.TypeInt,
200+
Optional: true,
199201
Computed: true,
200202
Description: "TCP port of the endpoint",
201203
},
@@ -204,6 +206,7 @@ func ResourceCluster() *schema.Resource {
204206
Elem: &schema.Schema{
205207
Type: schema.TypeString,
206208
},
209+
Optional: true,
207210
Computed: true,
208211
},
209212
},

0 commit comments

Comments
 (0)