Skip to content

Commit 39db6d9

Browse files
committed
add data source for domain
1 parent 322454b commit 39db6d9

File tree

2 files changed

+184
-319
lines changed

2 files changed

+184
-319
lines changed
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
package domain
2+
3+
//
4+
//import (
5+
// "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6+
// "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/account"
7+
//)
8+
//
9+
//func ResourceDomainsRegistration() *schema.Resource {
10+
// return &schema.Resource{
11+
// CreateContext: resourceDomainsRegistrationCreate,
12+
// ReadContext: resourceDomainsRegistrationsRead,
13+
// UpdateContext: resourceDomainsRegistrationUpdate,
14+
// DeleteContext: resourceDomainsRegistrationDelete,
15+
// Timeouts: &schema.ResourceTimeout{
16+
// Create: schema.DefaultTimeout(defaultDomainRecordTimeout),
17+
// Read: schema.DefaultTimeout(defaultDomainRecordTimeout),
18+
// Update: schema.DefaultTimeout(defaultDomainRecordTimeout),
19+
// Delete: schema.DefaultTimeout(defaultDomainRecordTimeout),
20+
// Default: schema.DefaultTimeout(defaultDomainRecordTimeout),
21+
// },
22+
// Importer: &schema.ResourceImporter{
23+
// StateContext: schema.ImportStatePassthroughContext,
24+
// },
25+
// SchemaVersion: 0,
26+
// Schema: map[string]*schema.Schema{
27+
// "domain_names": {
28+
// Type: schema.TypeList,
29+
// Required: true,
30+
// Elem: &schema.Schema{Type: schema.TypeString},
31+
// Description: "Liste des noms de domaines à gérer.",
32+
// },
33+
// "duration_in_years": {
34+
// Type: schema.TypeInt,
35+
// Optional: true,
36+
// Default: 1,
37+
// },
38+
// "project_id": account.ProjectIDSchema(),
39+
// "owner_contact_id": {
40+
// Type: schema.TypeString,
41+
// Optional: true,
42+
// Computed: true,
43+
// ExactlyOneOf: []string{
44+
// "owner_contact_id",
45+
// "owner_contact",
46+
// },
47+
// Description: "ID du contact propriétaire. Soit `owner_contact_id`, soit `owner_contact` doit être fourni.",
48+
// },
49+
// "owner_contact": {
50+
// Type: schema.TypeList,
51+
// Optional: true,
52+
// Computed: true,
53+
// MaxItems: 1,
54+
// ExactlyOneOf: []string{
55+
// "owner_contact_id",
56+
// "owner_contact",
57+
// },
58+
// Elem: &schema.Resource{
59+
// Schema: contactSchema(),
60+
// },
61+
// Description: "Détails du contact propriétaire. Soit `owner_contact_id`, soit `owner_contact` doit être fourni.",
62+
// },
63+
// "administrative_contact_id": {
64+
// Type: schema.TypeString,
65+
// Optional: true,
66+
// },
67+
// "administrative_contact": {
68+
// Type: schema.TypeList,
69+
// Optional: true,
70+
// Computed: true,
71+
// MaxItems: 1,
72+
// Elem: &schema.Resource{
73+
// Schema: contactSchema(),
74+
// },
75+
// Description: "Détails du contact administratif.",
76+
// },
77+
// "technical_contact_id": {
78+
// Type: schema.TypeString,
79+
// Optional: true,
80+
// },
81+
// "technical_contact": {
82+
// Type: schema.TypeList,
83+
// Optional: true,
84+
// Computed: true,
85+
// MaxItems: 1,
86+
// Elem: &schema.Resource{
87+
// Schema: contactSchema(),
88+
// },
89+
// Description: "Détails du contact technique.",
90+
// },
91+
// "auto_renew": {
92+
// Type: schema.TypeBool,
93+
// Optional: true,
94+
// Default: false,
95+
// Description: "Active ou désactive le renouvellement automatique du domaine.",
96+
// },
97+
// "dnssec": {
98+
// Type: schema.TypeBool,
99+
// Optional: true,
100+
// Default: false,
101+
// Description: "Active ou désactive DNSSEC pour le domaine.",
102+
// },
103+
// "ds_record": {
104+
// Type: schema.TypeList,
105+
// Optional: true,
106+
// Computed: true,
107+
// MaxItems: 1,
108+
// Elem: &schema.Resource{
109+
// Schema: map[string]*schema.Schema{
110+
// "key_id": {
111+
// Type: schema.TypeInt,
112+
// Required: true,
113+
// Description: "L’identifiant de la clé DNSSEC.",
114+
// },
115+
// "algorithm": {
116+
// Type: schema.TypeString,
117+
// Required: true,
118+
// Description: "L’algorithme utilisé pour DNSSEC (ex. rsasha256, ecdsap256sha256).",
119+
// },
120+
// "digest": {
121+
// Type: schema.TypeList,
122+
// Optional: true,
123+
// MaxItems: 1,
124+
// Elem: &schema.Resource{
125+
// Schema: map[string]*schema.Schema{
126+
// "type": {
127+
// Type: schema.TypeString,
128+
// Required: true,
129+
// Description: "Le type de digest (ex. sha_1, sha_256).",
130+
// },
131+
// "digest": {
132+
// Type: schema.TypeString,
133+
// Required: true,
134+
// Description: "La valeur du digest.",
135+
// },
136+
// "public_key": {
137+
// Type: schema.TypeList,
138+
// Optional: true,
139+
// MaxItems: 1,
140+
// Elem: &schema.Resource{
141+
// Schema: map[string]*schema.Schema{
142+
// "key": {
143+
// Type: schema.TypeString,
144+
// Required: true,
145+
// Description: "La valeur de la clé publique.",
146+
// },
147+
// },
148+
// },
149+
// Description: "La clé publique associée au digest.",
150+
// },
151+
// },
152+
// },
153+
// Description: "Détails sur le digest.",
154+
// },
155+
// "public_key": {
156+
// Type: schema.TypeList,
157+
// Optional: true,
158+
// MaxItems: 1,
159+
// Elem: &schema.Resource{
160+
// Schema: map[string]*schema.Schema{
161+
// "key": {
162+
// Type: schema.TypeString,
163+
// Required: true,
164+
// Description: "La valeur de la clé publique.",
165+
// },
166+
// },
167+
// },
168+
// Description: "Clé publique associée au DS record DNSSEC.",
169+
// },
170+
// },
171+
// },
172+
// Description: "Configuration du DS record DNSSEC.",
173+
// },
174+
// "is_external": {
175+
// Type: schema.TypeBool,
176+
// Optional: true,
177+
// Computed: true,
178+
// Description: "Indique si Scaleway est le registrar du domaine.",
179+
// },
180+
// },
181+
// }
182+
//}
183+
//

0 commit comments

Comments
 (0)