-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.go
47 lines (42 loc) · 1.77 KB
/
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
package env_status
import (
"context"
"github.com/MakeNowJust/heredoc/v2"
"github.com/altinity/terraform-provider-altinitycloud/internal/provider/common"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
)
func (r *AzureEnvStatusDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: heredoc.Doc("Altinity.Cloud Azure environment status data source. It will long pool the status until `matching_spec` is `true`."),
Attributes: map[string]schema.Attribute{
"id": common.IDAttribute,
"name": common.NameAttribute,
"pending_delete": common.PendingDeleteAttribute,
"applied_spec_revision": common.AppliedSpecRevisionAttribute,
"wait_for_applied_spec_revision": common.WaitForAppliedSpecRevisionAttribute,
"load_balancers": schema.SingleNestedAttribute{
Required: false,
Optional: false,
Computed: true,
MarkdownDescription: common.STATUS_LOAD_BALANCERS_DESCRIPTION,
Attributes: map[string]schema.Attribute{
"internal": schema.SingleNestedAttribute{
Required: false,
Optional: false,
Computed: true,
MarkdownDescription: common.LOAD_BALANCER_INTERNAL_DESCRIPTION,
Attributes: map[string]schema.Attribute{
"private_link_service_alias": schema.StringAttribute{
Required: false,
Optional: false,
Computed: true,
MarkdownDescription: common.AZURE_PRIVATE_LINK_SERVICE_ALIAS_DESCRIPTION,
},
},
},
},
},
},
}
}