/
resource_domain_zone_dnssec_gen.go
49 lines (42 loc) · 1.54 KB
/
resource_domain_zone_dnssec_gen.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
// Code generated by terraform-plugin-framework-generator DO NOT EDIT.
package ovh
import (
"context"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
ovhtypes "github.com/ovh/terraform-provider-ovh/ovh/types"
)
func DomainZoneDnssecResourceSchema(ctx context.Context) schema.Schema {
return schema.Schema{
Attributes: map[string]schema.Attribute{
"status": schema.StringAttribute{
CustomType: ovhtypes.TfStringType{},
Computed: true,
Description: "DNSSEC Status",
MarkdownDescription: "DNSSEC Status",
},
"zone_name": schema.StringAttribute{
CustomType: ovhtypes.TfStringType{},
Required: true,
Description: "The internal name of your zone",
MarkdownDescription: "The internal name of your zone",
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
},
},
},
}
}
type DomainZoneDnssecModel struct {
Status ovhtypes.TfStringValue `tfsdk:"status" json:"status"`
ZoneName ovhtypes.TfStringValue `tfsdk:"zone_name" json:"zoneName"`
}
func (v *DomainZoneDnssecModel) MergeWith(other *DomainZoneDnssecModel) {
if (v.Status.IsUnknown() || v.Status.IsNull()) && !other.Status.IsUnknown() {
v.Status = other.Status
}
if (v.ZoneName.IsUnknown() || v.ZoneName.IsNull()) && !other.ZoneName.IsUnknown() {
v.ZoneName = other.ZoneName
}
}