Skip to content

Commit 61c3760

Browse files
authored
Merge branch 'master' into feat-monthly-apple-silicon
2 parents 0c216a5 + 523f0c4 commit 61c3760

28 files changed

+21807
-3507
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ $ export TF_APPEND_USER_AGENT="CI/CD System XYZ Job #1234"
270270

271271
In case you want to [debug a deployment](https://www.terraform.io/internals/debugging), you can use the following command to increase the level of verbosity.
272272

273-
`SCW_DEBUG=1 TF_LOG=WARN TF_LOG_PROVIDER=DEBUG terraform apply`
273+
`SCW_DEBUG=1 TF_LOG=DEBUG TF_LOG_PROVIDER=DEBUG terraform apply`
274274

275275
- `SCW_DEBUG`: set the debug level of the scaleway SDK.
276276
- `TF_LOG`: set the level of the Terraform logging.
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
subcategory: "Domains and DNS"
3+
page_title: "Scaleway: scaleway_domain_registration"
4+
---
5+
6+
# Resource: scaleway_domain_registration
7+
8+
The `scaleway_domain_registration` resource allows you to purchase and manage domain registrations with Scaleway. Using this resource you can register one or more domains for a specified duration, configure auto-renewal and DNSSEC options, and set contact information. You can supply an owner contact either by providing an existing contact ID or by specifying the complete contact details. The resource automatically returns additional contact information (administrative and technical) as provided by the Scaleway API.
9+
10+
Refer to the [Domains and DNS documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and the [API documentation](https://developers.scaleway.com/) for more details.
11+
12+
## Example Usage
13+
14+
### Purchase a Single Domain
15+
16+
The following example purchases a domain with a one-year registration period and specifies the owner contact details. Administrative and technical contacts are returned by the API.
17+
18+
```terraform
19+
resource "scaleway_domain_registration" "test" {
20+
domain_names = ["example.com"]
21+
duration_in_years = 1
22+
23+
owner_contact {
24+
legal_form = "individual"
25+
firstname = "John"
26+
lastname = "DOE"
27+
28+
phone_number = "+1.23456789"
29+
address_line_1 = "123 Main Street"
30+
city = "Paris"
31+
zip = "75001"
32+
country = "FR"
33+
vat_identification_code = "FR12345678901"
34+
company_identification_code = "123456789"
35+
}
36+
}
37+
```
38+
39+
### Update Domain Settings
40+
41+
You can update the resource to enable auto-renewal and DNSSEC:
42+
43+
```terraform
44+
resource "scaleway_domain_registration" "test" {
45+
domain_names = ["example.com"]
46+
duration_in_years = 1
47+
48+
owner_contact {
49+
legal_form = "individual"
50+
firstname = "John"
51+
lastname = "DOE"
52+
53+
phone_number = "+1.23456789"
54+
address_line_1 = "123 Main Street"
55+
city = "Paris"
56+
zip = "75001"
57+
country = "FR"
58+
vat_identification_code = "FR12345678901"
59+
company_identification_code = "123456789"
60+
}
61+
62+
auto_renew = true
63+
dnssec = true
64+
}
65+
```
66+
67+
### Purchase Multiple Domains
68+
69+
The following example registers several domains in one go:
70+
71+
```terraform
72+
resource "scaleway_domain_registration" "multi" {
73+
domain_names = ["domain1.com", "domain2.com", "domain3.com"]
74+
duration_in_years = 1
75+
76+
owner_contact {
77+
legal_form = "individual"
78+
firstname = "John"
79+
lastname = "DOE"
80+
81+
phone_number = "+1.23456789"
82+
address_line_1 = "123 Main Street"
83+
city = "Paris"
84+
zip = "75001"
85+
country = "FR"
86+
vat_identification_code = "FR12345678901"
87+
company_identification_code = "123456789"
88+
}
89+
}
90+
```
91+
92+
## Argument Reference
93+
94+
The following arguments are supported:
95+
96+
- `domain_names` (Required, List of String): A list of domain names to be registered.
97+
- `duration_in_years` (Optional, Integer, Default: 1): The registration period in years.
98+
- `project_id` (Optional, String): The Scaleway project ID.
99+
- `owner_contact_id` (Optional, String): The ID of an existing owner contact.
100+
- `owner_contact` (Optional, List): Details of the owner contact.
101+
- `administrative_contact` (Computed, List): Administrative contact information.
102+
- `technical_contact` (Computed, List): Technical contact information.
103+
- `auto_renew` (Optional, Boolean, Default: false): Enables or disables auto-renewal.
104+
- `dnssec` (Optional, Boolean, Default: false): Enables or disables DNSSEC.
105+
106+
## Attributes Reference
107+
108+
In addition to all arguments above, the following attributes are exported:
109+
110+
- `id`: The ID of the domain registration.
111+
- `updated_at`: Timestamp of the last update.
112+
- `expired_at`: Expiration date/time of the domain registration.
113+
- `epp_code`: EPP code(s) associated with the domain.
114+
- `registrar`: Name of the registrar.
115+
- `status`: Status of the domain registration.
116+
- `dns_zones`: List of DNS zones associated with the domain.
117+
- `ds_record`: DNSSEC DS record configuration.
118+
- `task_id`: ID of the task that created the domain.
119+
120+
121+
122+
## Contact Blocks
123+
124+
Each contact block supports the following attributes:
125+
126+
- `legal_form` (Required, String): Legal form of the contact.
127+
- `firstname` (Required, String): First name.
128+
- `lastname` (Required, String): Last name.
129+
- `company_name` (Optional, String): Company name.
130+
- `email` (Required, String): Primary email.
131+
- `phone_number` (Required, String): Primary phone number.
132+
- `address_line_1` (Required, String): Primary address.
133+
- `zip` (Required, String): Postal code.
134+
- `city` (Required, String): City.
135+
- `country` (Required, String): Country code (ISO format).
136+
- `vat_identification_code` (Required, String): VAT identification code.
137+
- `company_identification_code` (Required, String): Company identification code.
138+
139+
## Import
140+
141+
To import an existing domain registration, use:
142+
143+
```bash
144+
terraform import scaleway_domain_registration.test <project_id>/<task_id>
145+
```
146+
147+
148+

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ require (
2828
github.com/robfig/cron/v3 v3.0.1
2929
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250306092204-9c7eed199df5
3030
github.com/stretchr/testify v1.10.0
31-
golang.org/x/crypto v0.33.0
31+
golang.org/x/crypto v0.35.0
3232
gopkg.in/dnaeon/go-vcr.v3 v3.2.0
3333
)
3434

@@ -132,7 +132,7 @@ require (
132132
go.opentelemetry.io/otel/trace v1.31.0 // indirect
133133
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
134134
golang.org/x/mod v0.23.0 // indirect
135-
golang.org/x/net v0.35.0 // indirect
135+
golang.org/x/net v0.36.0 // indirect
136136
golang.org/x/sync v0.11.0 // indirect
137137
golang.org/x/sys v0.30.0 // indirect
138138
golang.org/x/text v0.22.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
366366
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
367367
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
368368
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
369-
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
370-
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
369+
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
370+
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
371371
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
372372
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
373373
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
@@ -385,8 +385,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
385385
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
386386
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
387387
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
388-
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
389-
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
388+
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
389+
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
390390
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
391391
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
392392
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

internal/provider/provider.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ func Provider(config *Config) plugin.ProviderFunc {
140140
"scaleway_container_token": container.ResourceToken(),
141141
"scaleway_container_trigger": container.ResourceTrigger(),
142142
"scaleway_domain_record": domain.ResourceRecord(),
143+
"scaleway_domain_registration": domain.ResourceRegistration(),
143144
"scaleway_domain_zone": domain.ResourceZone(),
144145
"scaleway_edge_services_backend_stage": edgeservices.ResourceBackendStage(),
145146
"scaleway_edge_services_cache_stage": edgeservices.ResourceCacheStage(),

0 commit comments

Comments
 (0)