/
publicips_schema.go
57 lines (53 loc) · 1.74 KB
/
publicips_schema.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package publicip
import (
"golang.org/x/net/context"
schemaD "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
superschema "github.com/FrangipaneTeam/terraform-plugin-framework-superschema"
)
func publicIPsSchema(_ context.Context) superschema.Schema {
return superschema.Schema{
DataSource: superschema.SchemaDetails{
MarkdownDescription: "The public IP data source displays the list of public IP addresses.",
},
Attributes: superschema.Attributes{
"id": superschema.SuperStringAttribute{
DataSource: &schemaD.StringAttribute{
MarkdownDescription: "The ID of the Public IP.",
Computed: true,
},
},
"public_ips": superschema.SuperListNestedAttributeOf[publicIPNetworkConfigModel]{
DataSource: &schemaD.ListNestedAttribute{
MarkdownDescription: "A list of public IPs.",
Computed: true,
},
Attributes: superschema.Attributes{
"id": superschema.SuperStringAttribute{
DataSource: &schemaD.StringAttribute{
MarkdownDescription: "The ID of the Public IP.",
Computed: true,
},
},
"public_ip": superschema.SuperStringAttribute{
DataSource: &schemaD.StringAttribute{
MarkdownDescription: "The Public IP Address.",
Computed: true,
},
},
"edge_gateway_name": superschema.SuperStringAttribute{
DataSource: &schemaD.StringAttribute{
MarkdownDescription: "The name of the Edge Gateway.",
Computed: true,
},
},
"edge_gateway_id": superschema.SuperStringAttribute{
DataSource: &schemaD.StringAttribute{
MarkdownDescription: "The ID of the Edge Gateway.",
Computed: true,
},
},
},
},
},
}
}