pulumiverse-scaleway 1.23.0a1736837529__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumiverse-scaleway might be problematic. Click here for more details.

Files changed (205) hide show
  1. pulumiverse_scaleway/__init__.py +1065 -0
  2. pulumiverse_scaleway/_inputs.py +8688 -0
  3. pulumiverse_scaleway/_utilities.py +327 -0
  4. pulumiverse_scaleway/account_project.py +316 -0
  5. pulumiverse_scaleway/account_ssh_key.py +454 -0
  6. pulumiverse_scaleway/apple_silicon_server.py +564 -0
  7. pulumiverse_scaleway/baremetal_server.py +1579 -0
  8. pulumiverse_scaleway/block_snapshot.py +401 -0
  9. pulumiverse_scaleway/block_volume.py +527 -0
  10. pulumiverse_scaleway/cockpit.py +314 -0
  11. pulumiverse_scaleway/cockpit_alert_manager.py +401 -0
  12. pulumiverse_scaleway/cockpit_grafana_user.py +362 -0
  13. pulumiverse_scaleway/cockpit_source.py +567 -0
  14. pulumiverse_scaleway/cockpit_token.py +479 -0
  15. pulumiverse_scaleway/config/__init__.py +8 -0
  16. pulumiverse_scaleway/config/__init__.pyi +56 -0
  17. pulumiverse_scaleway/config/vars.py +78 -0
  18. pulumiverse_scaleway/container.py +1373 -0
  19. pulumiverse_scaleway/container_cron.py +458 -0
  20. pulumiverse_scaleway/container_domain.py +406 -0
  21. pulumiverse_scaleway/container_namespace.py +636 -0
  22. pulumiverse_scaleway/container_token.py +452 -0
  23. pulumiverse_scaleway/container_trigger.py +480 -0
  24. pulumiverse_scaleway/database.py +407 -0
  25. pulumiverse_scaleway/database_acl.py +332 -0
  26. pulumiverse_scaleway/database_backup.py +574 -0
  27. pulumiverse_scaleway/database_instance.py +1641 -0
  28. pulumiverse_scaleway/database_privilege.py +422 -0
  29. pulumiverse_scaleway/database_read_replica.py +528 -0
  30. pulumiverse_scaleway/database_user.py +446 -0
  31. pulumiverse_scaleway/domain_record.py +1116 -0
  32. pulumiverse_scaleway/domain_zone.py +430 -0
  33. pulumiverse_scaleway/flexible_ip.py +702 -0
  34. pulumiverse_scaleway/flexible_ip_mac_address.py +510 -0
  35. pulumiverse_scaleway/function.py +1103 -0
  36. pulumiverse_scaleway/function_cron.py +462 -0
  37. pulumiverse_scaleway/function_domain.py +370 -0
  38. pulumiverse_scaleway/function_namespace.py +580 -0
  39. pulumiverse_scaleway/function_token.py +460 -0
  40. pulumiverse_scaleway/function_trigger.py +480 -0
  41. pulumiverse_scaleway/get_account_project.py +170 -0
  42. pulumiverse_scaleway/get_account_ssh_key.py +205 -0
  43. pulumiverse_scaleway/get_availability_zones.py +139 -0
  44. pulumiverse_scaleway/get_baremetal_offer.py +245 -0
  45. pulumiverse_scaleway/get_baremetal_option.py +168 -0
  46. pulumiverse_scaleway/get_baremetal_os.py +174 -0
  47. pulumiverse_scaleway/get_baremetal_server.py +422 -0
  48. pulumiverse_scaleway/get_billing_consumptions.py +134 -0
  49. pulumiverse_scaleway/get_billing_invoices.py +154 -0
  50. pulumiverse_scaleway/get_block_snapshot.py +174 -0
  51. pulumiverse_scaleway/get_block_volume.py +188 -0
  52. pulumiverse_scaleway/get_cockpit.py +204 -0
  53. pulumiverse_scaleway/get_cockpit_plan.py +125 -0
  54. pulumiverse_scaleway/get_cockpit_source.py +262 -0
  55. pulumiverse_scaleway/get_config.py +180 -0
  56. pulumiverse_scaleway/get_container.py +522 -0
  57. pulumiverse_scaleway/get_container_namespace.py +283 -0
  58. pulumiverse_scaleway/get_database.py +187 -0
  59. pulumiverse_scaleway/get_database_acl.py +143 -0
  60. pulumiverse_scaleway/get_database_backup.py +253 -0
  61. pulumiverse_scaleway/get_database_instance.py +404 -0
  62. pulumiverse_scaleway/get_database_privilege.py +181 -0
  63. pulumiverse_scaleway/get_domain_record.py +340 -0
  64. pulumiverse_scaleway/get_domain_zone.py +201 -0
  65. pulumiverse_scaleway/get_flexible_ip.py +247 -0
  66. pulumiverse_scaleway/get_flexible_ips.py +240 -0
  67. pulumiverse_scaleway/get_function.py +365 -0
  68. pulumiverse_scaleway/get_function_namespace.py +238 -0
  69. pulumiverse_scaleway/get_iam_api_key.py +210 -0
  70. pulumiverse_scaleway/get_iam_application.py +210 -0
  71. pulumiverse_scaleway/get_iam_group.py +236 -0
  72. pulumiverse_scaleway/get_iam_ssh_key.py +212 -0
  73. pulumiverse_scaleway/get_iam_user.py +177 -0
  74. pulumiverse_scaleway/get_instance_image.py +305 -0
  75. pulumiverse_scaleway/get_instance_ip.py +204 -0
  76. pulumiverse_scaleway/get_instance_placement_group.py +212 -0
  77. pulumiverse_scaleway/get_instance_private_nic.py +226 -0
  78. pulumiverse_scaleway/get_instance_security_group.py +268 -0
  79. pulumiverse_scaleway/get_instance_server.py +502 -0
  80. pulumiverse_scaleway/get_instance_servers.py +187 -0
  81. pulumiverse_scaleway/get_instance_snapshot.py +248 -0
  82. pulumiverse_scaleway/get_instance_volume.py +215 -0
  83. pulumiverse_scaleway/get_iot_device.py +257 -0
  84. pulumiverse_scaleway/get_iot_hub.py +322 -0
  85. pulumiverse_scaleway/get_ipam_ip.py +419 -0
  86. pulumiverse_scaleway/get_ipam_ips.py +358 -0
  87. pulumiverse_scaleway/get_k8s_version.py +196 -0
  88. pulumiverse_scaleway/get_kubernetes_cluster.py +417 -0
  89. pulumiverse_scaleway/get_kubernetes_node_pool.py +436 -0
  90. pulumiverse_scaleway/get_lb_acls.py +198 -0
  91. pulumiverse_scaleway/get_lb_backend.py +486 -0
  92. pulumiverse_scaleway/get_lb_backends.py +196 -0
  93. pulumiverse_scaleway/get_lb_frontend.py +274 -0
  94. pulumiverse_scaleway/get_lb_frontends.py +196 -0
  95. pulumiverse_scaleway/get_lb_ips.py +198 -0
  96. pulumiverse_scaleway/get_lb_route.py +217 -0
  97. pulumiverse_scaleway/get_lb_routes.py +179 -0
  98. pulumiverse_scaleway/get_lbs.py +187 -0
  99. pulumiverse_scaleway/get_loadbalancer.py +339 -0
  100. pulumiverse_scaleway/get_loadbalancer_certificate.py +230 -0
  101. pulumiverse_scaleway/get_loadbalancer_ip.py +228 -0
  102. pulumiverse_scaleway/get_marketplace_image.py +147 -0
  103. pulumiverse_scaleway/get_mnq_sns.py +150 -0
  104. pulumiverse_scaleway/get_mnq_sqs.py +150 -0
  105. pulumiverse_scaleway/get_mongo_db_instance.py +324 -0
  106. pulumiverse_scaleway/get_object_bucket.py +290 -0
  107. pulumiverse_scaleway/get_object_bucket_policy.py +163 -0
  108. pulumiverse_scaleway/get_redis_cluster.py +347 -0
  109. pulumiverse_scaleway/get_registry_image.py +239 -0
  110. pulumiverse_scaleway/get_registry_image_tag.py +229 -0
  111. pulumiverse_scaleway/get_registry_namespace.py +199 -0
  112. pulumiverse_scaleway/get_secret.py +338 -0
  113. pulumiverse_scaleway/get_secret_version.py +340 -0
  114. pulumiverse_scaleway/get_tem_domain.py +378 -0
  115. pulumiverse_scaleway/get_vpc.py +246 -0
  116. pulumiverse_scaleway/get_vpc_gateway_network.py +287 -0
  117. pulumiverse_scaleway/get_vpc_private_network.py +282 -0
  118. pulumiverse_scaleway/get_vpc_public_gateway.py +304 -0
  119. pulumiverse_scaleway/get_vpc_public_gateway_dhcp.py +305 -0
  120. pulumiverse_scaleway/get_vpc_public_gateway_dhcp_reservation.py +382 -0
  121. pulumiverse_scaleway/get_vpc_public_gateway_ip.py +199 -0
  122. pulumiverse_scaleway/get_vpc_public_pat_rule.py +313 -0
  123. pulumiverse_scaleway/get_vpc_routes.py +208 -0
  124. pulumiverse_scaleway/get_vpcs.py +174 -0
  125. pulumiverse_scaleway/get_web_host_offer.py +192 -0
  126. pulumiverse_scaleway/get_webhosting.py +332 -0
  127. pulumiverse_scaleway/iam_api_key.py +620 -0
  128. pulumiverse_scaleway/iam_application.py +417 -0
  129. pulumiverse_scaleway/iam_group.py +566 -0
  130. pulumiverse_scaleway/iam_group_membership.py +323 -0
  131. pulumiverse_scaleway/iam_policy.py +773 -0
  132. pulumiverse_scaleway/iam_ssh_key.py +455 -0
  133. pulumiverse_scaleway/iam_user.py +513 -0
  134. pulumiverse_scaleway/inference_deployment.py +822 -0
  135. pulumiverse_scaleway/instance_image.py +750 -0
  136. pulumiverse_scaleway/instance_ip.py +483 -0
  137. pulumiverse_scaleway/instance_ip_reverse_dns.py +308 -0
  138. pulumiverse_scaleway/instance_placement_group.py +479 -0
  139. pulumiverse_scaleway/instance_private_nic.py +555 -0
  140. pulumiverse_scaleway/instance_security_group.py +720 -0
  141. pulumiverse_scaleway/instance_security_group_rules.py +439 -0
  142. pulumiverse_scaleway/instance_server.py +2006 -0
  143. pulumiverse_scaleway/instance_snapshot.py +669 -0
  144. pulumiverse_scaleway/instance_user_data.py +435 -0
  145. pulumiverse_scaleway/instance_volume.py +535 -0
  146. pulumiverse_scaleway/iot_device.py +750 -0
  147. pulumiverse_scaleway/iot_hub.py +896 -0
  148. pulumiverse_scaleway/iot_network.py +472 -0
  149. pulumiverse_scaleway/iot_route.py +660 -0
  150. pulumiverse_scaleway/ipam_ip.py +757 -0
  151. pulumiverse_scaleway/ipam_ip_reverse_dns.py +318 -0
  152. pulumiverse_scaleway/job_definition.py +692 -0
  153. pulumiverse_scaleway/kubernetes_cluster.py +1538 -0
  154. pulumiverse_scaleway/kubernetes_node_pool.py +1255 -0
  155. pulumiverse_scaleway/loadbalancer.py +1061 -0
  156. pulumiverse_scaleway/loadbalancer_acl.py +520 -0
  157. pulumiverse_scaleway/loadbalancer_backend.py +1588 -0
  158. pulumiverse_scaleway/loadbalancer_certificate.py +460 -0
  159. pulumiverse_scaleway/loadbalancer_frontend.py +829 -0
  160. pulumiverse_scaleway/loadbalancer_ip.py +514 -0
  161. pulumiverse_scaleway/loadbalancer_route.py +523 -0
  162. pulumiverse_scaleway/mnq_nats_account.py +334 -0
  163. pulumiverse_scaleway/mnq_nats_credentials.py +330 -0
  164. pulumiverse_scaleway/mnq_sns.py +306 -0
  165. pulumiverse_scaleway/mnq_sns_credentials.py +413 -0
  166. pulumiverse_scaleway/mnq_sns_topic.py +659 -0
  167. pulumiverse_scaleway/mnq_sns_topic_subscription.py +699 -0
  168. pulumiverse_scaleway/mnq_sqs.py +304 -0
  169. pulumiverse_scaleway/mnq_sqs_credentials.py +413 -0
  170. pulumiverse_scaleway/mnq_sqs_queue.py +800 -0
  171. pulumiverse_scaleway/mongo_db_instance.py +907 -0
  172. pulumiverse_scaleway/mongo_db_snapshot.py +521 -0
  173. pulumiverse_scaleway/object_bucket.py +874 -0
  174. pulumiverse_scaleway/object_bucket_acl.py +596 -0
  175. pulumiverse_scaleway/object_bucket_lock_configuration.py +395 -0
  176. pulumiverse_scaleway/object_bucket_policy.py +673 -0
  177. pulumiverse_scaleway/object_bucket_website_configuration.py +534 -0
  178. pulumiverse_scaleway/object_item.py +776 -0
  179. pulumiverse_scaleway/outputs.py +11808 -0
  180. pulumiverse_scaleway/provider.py +327 -0
  181. pulumiverse_scaleway/pulumi-plugin.json +6 -0
  182. pulumiverse_scaleway/py.typed +0 -0
  183. pulumiverse_scaleway/redis_cluster.py +1201 -0
  184. pulumiverse_scaleway/registry_namespace.py +458 -0
  185. pulumiverse_scaleway/sdb_database.py +432 -0
  186. pulumiverse_scaleway/secret.py +663 -0
  187. pulumiverse_scaleway/secret_version.py +487 -0
  188. pulumiverse_scaleway/tem_domain.py +1030 -0
  189. pulumiverse_scaleway/tem_domain_validation.py +303 -0
  190. pulumiverse_scaleway/tem_webhook.py +640 -0
  191. pulumiverse_scaleway/vpc.py +536 -0
  192. pulumiverse_scaleway/vpc_gateway_network.py +866 -0
  193. pulumiverse_scaleway/vpc_private_network.py +734 -0
  194. pulumiverse_scaleway/vpc_public_gateway.py +789 -0
  195. pulumiverse_scaleway/vpc_public_gateway_dhcp.py +933 -0
  196. pulumiverse_scaleway/vpc_public_gateway_dhcp_reservation.py +514 -0
  197. pulumiverse_scaleway/vpc_public_gateway_ip.py +457 -0
  198. pulumiverse_scaleway/vpc_public_gateway_ip_reverse_dns.py +306 -0
  199. pulumiverse_scaleway/vpc_public_gateway_pat_rule.py +591 -0
  200. pulumiverse_scaleway/vpc_route.py +577 -0
  201. pulumiverse_scaleway/webhosting.py +805 -0
  202. pulumiverse_scaleway-1.23.0a1736837529.dist-info/METADATA +77 -0
  203. pulumiverse_scaleway-1.23.0a1736837529.dist-info/RECORD +205 -0
  204. pulumiverse_scaleway-1.23.0a1736837529.dist-info/WHEEL +5 -0
  205. pulumiverse_scaleway-1.23.0a1736837529.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1116 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = ['DomainRecordArgs', 'DomainRecord']
20
+
21
+ @pulumi.input_type
22
+ class DomainRecordArgs:
23
+ def __init__(__self__, *,
24
+ data: pulumi.Input[str],
25
+ dns_zone: pulumi.Input[str],
26
+ type: pulumi.Input[str],
27
+ geo_ip: Optional[pulumi.Input['DomainRecordGeoIpArgs']] = None,
28
+ http_service: Optional[pulumi.Input['DomainRecordHttpServiceArgs']] = None,
29
+ keep_empty_zone: Optional[pulumi.Input[bool]] = None,
30
+ name: Optional[pulumi.Input[str]] = None,
31
+ priority: Optional[pulumi.Input[int]] = None,
32
+ project_id: Optional[pulumi.Input[str]] = None,
33
+ ttl: Optional[pulumi.Input[int]] = None,
34
+ views: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]]] = None,
35
+ weighteds: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]]] = None):
36
+ """
37
+ The set of arguments for constructing a DomainRecord resource.
38
+ :param pulumi.Input[str] data: The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.).
39
+ :param pulumi.Input[str] dns_zone: The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
40
+ :param pulumi.Input[str] type: The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`).
41
+ :param pulumi.Input['DomainRecordGeoIpArgs'] geo_ip: Return record based on client localisation
42
+ :param pulumi.Input['DomainRecordHttpServiceArgs'] http_service: Return record based on client localisation
43
+ :param pulumi.Input[bool] keep_empty_zone: When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/).
44
+ :param pulumi.Input[str] name: The name of the record (can be an empty string for a root record).
45
+ :param pulumi.Input[int] priority: The priority of the record (mostly used with an `MX` record).
46
+ :param pulumi.Input[str] project_id: The project_id you want to attach the resource to
47
+ :param pulumi.Input[int] ttl: Time To Live of the record in seconds.
48
+ :param pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]] views: Return record based on client subnet
49
+ :param pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]] weighteds: Return record based on weight
50
+ """
51
+ pulumi.set(__self__, "data", data)
52
+ pulumi.set(__self__, "dns_zone", dns_zone)
53
+ pulumi.set(__self__, "type", type)
54
+ if geo_ip is not None:
55
+ pulumi.set(__self__, "geo_ip", geo_ip)
56
+ if http_service is not None:
57
+ pulumi.set(__self__, "http_service", http_service)
58
+ if keep_empty_zone is not None:
59
+ pulumi.set(__self__, "keep_empty_zone", keep_empty_zone)
60
+ if name is not None:
61
+ pulumi.set(__self__, "name", name)
62
+ if priority is not None:
63
+ pulumi.set(__self__, "priority", priority)
64
+ if project_id is not None:
65
+ pulumi.set(__self__, "project_id", project_id)
66
+ if ttl is not None:
67
+ pulumi.set(__self__, "ttl", ttl)
68
+ if views is not None:
69
+ pulumi.set(__self__, "views", views)
70
+ if weighteds is not None:
71
+ pulumi.set(__self__, "weighteds", weighteds)
72
+
73
+ @property
74
+ @pulumi.getter
75
+ def data(self) -> pulumi.Input[str]:
76
+ """
77
+ The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.).
78
+ """
79
+ return pulumi.get(self, "data")
80
+
81
+ @data.setter
82
+ def data(self, value: pulumi.Input[str]):
83
+ pulumi.set(self, "data", value)
84
+
85
+ @property
86
+ @pulumi.getter(name="dnsZone")
87
+ def dns_zone(self) -> pulumi.Input[str]:
88
+ """
89
+ The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
90
+ """
91
+ return pulumi.get(self, "dns_zone")
92
+
93
+ @dns_zone.setter
94
+ def dns_zone(self, value: pulumi.Input[str]):
95
+ pulumi.set(self, "dns_zone", value)
96
+
97
+ @property
98
+ @pulumi.getter
99
+ def type(self) -> pulumi.Input[str]:
100
+ """
101
+ The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`).
102
+ """
103
+ return pulumi.get(self, "type")
104
+
105
+ @type.setter
106
+ def type(self, value: pulumi.Input[str]):
107
+ pulumi.set(self, "type", value)
108
+
109
+ @property
110
+ @pulumi.getter(name="geoIp")
111
+ def geo_ip(self) -> Optional[pulumi.Input['DomainRecordGeoIpArgs']]:
112
+ """
113
+ Return record based on client localisation
114
+ """
115
+ return pulumi.get(self, "geo_ip")
116
+
117
+ @geo_ip.setter
118
+ def geo_ip(self, value: Optional[pulumi.Input['DomainRecordGeoIpArgs']]):
119
+ pulumi.set(self, "geo_ip", value)
120
+
121
+ @property
122
+ @pulumi.getter(name="httpService")
123
+ def http_service(self) -> Optional[pulumi.Input['DomainRecordHttpServiceArgs']]:
124
+ """
125
+ Return record based on client localisation
126
+ """
127
+ return pulumi.get(self, "http_service")
128
+
129
+ @http_service.setter
130
+ def http_service(self, value: Optional[pulumi.Input['DomainRecordHttpServiceArgs']]):
131
+ pulumi.set(self, "http_service", value)
132
+
133
+ @property
134
+ @pulumi.getter(name="keepEmptyZone")
135
+ def keep_empty_zone(self) -> Optional[pulumi.Input[bool]]:
136
+ """
137
+ When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/).
138
+ """
139
+ return pulumi.get(self, "keep_empty_zone")
140
+
141
+ @keep_empty_zone.setter
142
+ def keep_empty_zone(self, value: Optional[pulumi.Input[bool]]):
143
+ pulumi.set(self, "keep_empty_zone", value)
144
+
145
+ @property
146
+ @pulumi.getter
147
+ def name(self) -> Optional[pulumi.Input[str]]:
148
+ """
149
+ The name of the record (can be an empty string for a root record).
150
+ """
151
+ return pulumi.get(self, "name")
152
+
153
+ @name.setter
154
+ def name(self, value: Optional[pulumi.Input[str]]):
155
+ pulumi.set(self, "name", value)
156
+
157
+ @property
158
+ @pulumi.getter
159
+ def priority(self) -> Optional[pulumi.Input[int]]:
160
+ """
161
+ The priority of the record (mostly used with an `MX` record).
162
+ """
163
+ return pulumi.get(self, "priority")
164
+
165
+ @priority.setter
166
+ def priority(self, value: Optional[pulumi.Input[int]]):
167
+ pulumi.set(self, "priority", value)
168
+
169
+ @property
170
+ @pulumi.getter(name="projectId")
171
+ def project_id(self) -> Optional[pulumi.Input[str]]:
172
+ """
173
+ The project_id you want to attach the resource to
174
+ """
175
+ return pulumi.get(self, "project_id")
176
+
177
+ @project_id.setter
178
+ def project_id(self, value: Optional[pulumi.Input[str]]):
179
+ pulumi.set(self, "project_id", value)
180
+
181
+ @property
182
+ @pulumi.getter
183
+ def ttl(self) -> Optional[pulumi.Input[int]]:
184
+ """
185
+ Time To Live of the record in seconds.
186
+ """
187
+ return pulumi.get(self, "ttl")
188
+
189
+ @ttl.setter
190
+ def ttl(self, value: Optional[pulumi.Input[int]]):
191
+ pulumi.set(self, "ttl", value)
192
+
193
+ @property
194
+ @pulumi.getter
195
+ def views(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]]]:
196
+ """
197
+ Return record based on client subnet
198
+ """
199
+ return pulumi.get(self, "views")
200
+
201
+ @views.setter
202
+ def views(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]]]):
203
+ pulumi.set(self, "views", value)
204
+
205
+ @property
206
+ @pulumi.getter
207
+ def weighteds(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]]]:
208
+ """
209
+ Return record based on weight
210
+ """
211
+ return pulumi.get(self, "weighteds")
212
+
213
+ @weighteds.setter
214
+ def weighteds(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]]]):
215
+ pulumi.set(self, "weighteds", value)
216
+
217
+
218
+ @pulumi.input_type
219
+ class _DomainRecordState:
220
+ def __init__(__self__, *,
221
+ data: Optional[pulumi.Input[str]] = None,
222
+ dns_zone: Optional[pulumi.Input[str]] = None,
223
+ fqdn: Optional[pulumi.Input[str]] = None,
224
+ geo_ip: Optional[pulumi.Input['DomainRecordGeoIpArgs']] = None,
225
+ http_service: Optional[pulumi.Input['DomainRecordHttpServiceArgs']] = None,
226
+ keep_empty_zone: Optional[pulumi.Input[bool]] = None,
227
+ name: Optional[pulumi.Input[str]] = None,
228
+ priority: Optional[pulumi.Input[int]] = None,
229
+ project_id: Optional[pulumi.Input[str]] = None,
230
+ root_zone: Optional[pulumi.Input[bool]] = None,
231
+ ttl: Optional[pulumi.Input[int]] = None,
232
+ type: Optional[pulumi.Input[str]] = None,
233
+ views: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]]] = None,
234
+ weighteds: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]]] = None):
235
+ """
236
+ Input properties used for looking up and filtering DomainRecord resources.
237
+ :param pulumi.Input[str] data: The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.).
238
+ :param pulumi.Input[str] dns_zone: The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
239
+ :param pulumi.Input[str] fqdn: The FQDN of the record.
240
+ :param pulumi.Input['DomainRecordGeoIpArgs'] geo_ip: Return record based on client localisation
241
+ :param pulumi.Input['DomainRecordHttpServiceArgs'] http_service: Return record based on client localisation
242
+ :param pulumi.Input[bool] keep_empty_zone: When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/).
243
+ :param pulumi.Input[str] name: The name of the record (can be an empty string for a root record).
244
+ :param pulumi.Input[int] priority: The priority of the record (mostly used with an `MX` record).
245
+ :param pulumi.Input[str] project_id: The project_id you want to attach the resource to
246
+ :param pulumi.Input[bool] root_zone: Does the DNS zone is the root zone or not
247
+ :param pulumi.Input[int] ttl: Time To Live of the record in seconds.
248
+ :param pulumi.Input[str] type: The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`).
249
+ :param pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]] views: Return record based on client subnet
250
+ :param pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]] weighteds: Return record based on weight
251
+ """
252
+ if data is not None:
253
+ pulumi.set(__self__, "data", data)
254
+ if dns_zone is not None:
255
+ pulumi.set(__self__, "dns_zone", dns_zone)
256
+ if fqdn is not None:
257
+ pulumi.set(__self__, "fqdn", fqdn)
258
+ if geo_ip is not None:
259
+ pulumi.set(__self__, "geo_ip", geo_ip)
260
+ if http_service is not None:
261
+ pulumi.set(__self__, "http_service", http_service)
262
+ if keep_empty_zone is not None:
263
+ pulumi.set(__self__, "keep_empty_zone", keep_empty_zone)
264
+ if name is not None:
265
+ pulumi.set(__self__, "name", name)
266
+ if priority is not None:
267
+ pulumi.set(__self__, "priority", priority)
268
+ if project_id is not None:
269
+ pulumi.set(__self__, "project_id", project_id)
270
+ if root_zone is not None:
271
+ pulumi.set(__self__, "root_zone", root_zone)
272
+ if ttl is not None:
273
+ pulumi.set(__self__, "ttl", ttl)
274
+ if type is not None:
275
+ pulumi.set(__self__, "type", type)
276
+ if views is not None:
277
+ pulumi.set(__self__, "views", views)
278
+ if weighteds is not None:
279
+ pulumi.set(__self__, "weighteds", weighteds)
280
+
281
+ @property
282
+ @pulumi.getter
283
+ def data(self) -> Optional[pulumi.Input[str]]:
284
+ """
285
+ The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.).
286
+ """
287
+ return pulumi.get(self, "data")
288
+
289
+ @data.setter
290
+ def data(self, value: Optional[pulumi.Input[str]]):
291
+ pulumi.set(self, "data", value)
292
+
293
+ @property
294
+ @pulumi.getter(name="dnsZone")
295
+ def dns_zone(self) -> Optional[pulumi.Input[str]]:
296
+ """
297
+ The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
298
+ """
299
+ return pulumi.get(self, "dns_zone")
300
+
301
+ @dns_zone.setter
302
+ def dns_zone(self, value: Optional[pulumi.Input[str]]):
303
+ pulumi.set(self, "dns_zone", value)
304
+
305
+ @property
306
+ @pulumi.getter
307
+ def fqdn(self) -> Optional[pulumi.Input[str]]:
308
+ """
309
+ The FQDN of the record.
310
+ """
311
+ return pulumi.get(self, "fqdn")
312
+
313
+ @fqdn.setter
314
+ def fqdn(self, value: Optional[pulumi.Input[str]]):
315
+ pulumi.set(self, "fqdn", value)
316
+
317
+ @property
318
+ @pulumi.getter(name="geoIp")
319
+ def geo_ip(self) -> Optional[pulumi.Input['DomainRecordGeoIpArgs']]:
320
+ """
321
+ Return record based on client localisation
322
+ """
323
+ return pulumi.get(self, "geo_ip")
324
+
325
+ @geo_ip.setter
326
+ def geo_ip(self, value: Optional[pulumi.Input['DomainRecordGeoIpArgs']]):
327
+ pulumi.set(self, "geo_ip", value)
328
+
329
+ @property
330
+ @pulumi.getter(name="httpService")
331
+ def http_service(self) -> Optional[pulumi.Input['DomainRecordHttpServiceArgs']]:
332
+ """
333
+ Return record based on client localisation
334
+ """
335
+ return pulumi.get(self, "http_service")
336
+
337
+ @http_service.setter
338
+ def http_service(self, value: Optional[pulumi.Input['DomainRecordHttpServiceArgs']]):
339
+ pulumi.set(self, "http_service", value)
340
+
341
+ @property
342
+ @pulumi.getter(name="keepEmptyZone")
343
+ def keep_empty_zone(self) -> Optional[pulumi.Input[bool]]:
344
+ """
345
+ When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/).
346
+ """
347
+ return pulumi.get(self, "keep_empty_zone")
348
+
349
+ @keep_empty_zone.setter
350
+ def keep_empty_zone(self, value: Optional[pulumi.Input[bool]]):
351
+ pulumi.set(self, "keep_empty_zone", value)
352
+
353
+ @property
354
+ @pulumi.getter
355
+ def name(self) -> Optional[pulumi.Input[str]]:
356
+ """
357
+ The name of the record (can be an empty string for a root record).
358
+ """
359
+ return pulumi.get(self, "name")
360
+
361
+ @name.setter
362
+ def name(self, value: Optional[pulumi.Input[str]]):
363
+ pulumi.set(self, "name", value)
364
+
365
+ @property
366
+ @pulumi.getter
367
+ def priority(self) -> Optional[pulumi.Input[int]]:
368
+ """
369
+ The priority of the record (mostly used with an `MX` record).
370
+ """
371
+ return pulumi.get(self, "priority")
372
+
373
+ @priority.setter
374
+ def priority(self, value: Optional[pulumi.Input[int]]):
375
+ pulumi.set(self, "priority", value)
376
+
377
+ @property
378
+ @pulumi.getter(name="projectId")
379
+ def project_id(self) -> Optional[pulumi.Input[str]]:
380
+ """
381
+ The project_id you want to attach the resource to
382
+ """
383
+ return pulumi.get(self, "project_id")
384
+
385
+ @project_id.setter
386
+ def project_id(self, value: Optional[pulumi.Input[str]]):
387
+ pulumi.set(self, "project_id", value)
388
+
389
+ @property
390
+ @pulumi.getter(name="rootZone")
391
+ def root_zone(self) -> Optional[pulumi.Input[bool]]:
392
+ """
393
+ Does the DNS zone is the root zone or not
394
+ """
395
+ return pulumi.get(self, "root_zone")
396
+
397
+ @root_zone.setter
398
+ def root_zone(self, value: Optional[pulumi.Input[bool]]):
399
+ pulumi.set(self, "root_zone", value)
400
+
401
+ @property
402
+ @pulumi.getter
403
+ def ttl(self) -> Optional[pulumi.Input[int]]:
404
+ """
405
+ Time To Live of the record in seconds.
406
+ """
407
+ return pulumi.get(self, "ttl")
408
+
409
+ @ttl.setter
410
+ def ttl(self, value: Optional[pulumi.Input[int]]):
411
+ pulumi.set(self, "ttl", value)
412
+
413
+ @property
414
+ @pulumi.getter
415
+ def type(self) -> Optional[pulumi.Input[str]]:
416
+ """
417
+ The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`).
418
+ """
419
+ return pulumi.get(self, "type")
420
+
421
+ @type.setter
422
+ def type(self, value: Optional[pulumi.Input[str]]):
423
+ pulumi.set(self, "type", value)
424
+
425
+ @property
426
+ @pulumi.getter
427
+ def views(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]]]:
428
+ """
429
+ Return record based on client subnet
430
+ """
431
+ return pulumi.get(self, "views")
432
+
433
+ @views.setter
434
+ def views(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordViewArgs']]]]):
435
+ pulumi.set(self, "views", value)
436
+
437
+ @property
438
+ @pulumi.getter
439
+ def weighteds(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]]]:
440
+ """
441
+ Return record based on weight
442
+ """
443
+ return pulumi.get(self, "weighteds")
444
+
445
+ @weighteds.setter
446
+ def weighteds(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DomainRecordWeightedArgs']]]]):
447
+ pulumi.set(self, "weighteds", value)
448
+
449
+
450
+ class DomainRecord(pulumi.CustomResource):
451
+ @overload
452
+ def __init__(__self__,
453
+ resource_name: str,
454
+ opts: Optional[pulumi.ResourceOptions] = None,
455
+ data: Optional[pulumi.Input[str]] = None,
456
+ dns_zone: Optional[pulumi.Input[str]] = None,
457
+ geo_ip: Optional[pulumi.Input[Union['DomainRecordGeoIpArgs', 'DomainRecordGeoIpArgsDict']]] = None,
458
+ http_service: Optional[pulumi.Input[Union['DomainRecordHttpServiceArgs', 'DomainRecordHttpServiceArgsDict']]] = None,
459
+ keep_empty_zone: Optional[pulumi.Input[bool]] = None,
460
+ name: Optional[pulumi.Input[str]] = None,
461
+ priority: Optional[pulumi.Input[int]] = None,
462
+ project_id: Optional[pulumi.Input[str]] = None,
463
+ ttl: Optional[pulumi.Input[int]] = None,
464
+ type: Optional[pulumi.Input[str]] = None,
465
+ views: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordViewArgs', 'DomainRecordViewArgsDict']]]]] = None,
466
+ weighteds: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordWeightedArgs', 'DomainRecordWeightedArgsDict']]]]] = None,
467
+ __props__=None):
468
+ """
469
+ The `DomainRecord` resource allows you to create and manage DNS records for Scaleway domains.
470
+
471
+ Refer to the Domains and DNS [product documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and [API documentation](https://www.scaleway.com/en/developers/api/domains-and-dns/) for more information.
472
+
473
+ ## Example Usage
474
+
475
+ ### Create basic DNS records
476
+
477
+ The folllowing commands allow you to:
478
+
479
+ - create an A record for the `www.domain.tld` domain, pointing to `1.2.3.4` and another one pointing to `1.2.3.5`
480
+
481
+ - create an MX record with the `mx.online.net.` mail server and a priority of 10, and another one with the `mx-cache.online.net.` mail server and a priority of 20
482
+
483
+ ```python
484
+ import pulumi
485
+ import pulumiverse_scaleway as scaleway
486
+
487
+ www = scaleway.DomainRecord("www",
488
+ dns_zone="domain.tld",
489
+ name="www",
490
+ type="A",
491
+ data="1.2.3.4",
492
+ ttl=3600)
493
+ www2 = scaleway.DomainRecord("www2",
494
+ dns_zone="domain.tld",
495
+ name="www",
496
+ type="A",
497
+ data="1.2.3.5",
498
+ ttl=3600)
499
+ mx = scaleway.DomainRecord("mx",
500
+ dns_zone="domain.tld",
501
+ name="",
502
+ type="MX",
503
+ data="mx.online.net.",
504
+ ttl=3600,
505
+ priority=10)
506
+ mx2 = scaleway.DomainRecord("mx2",
507
+ dns_zone="domain.tld",
508
+ name="",
509
+ type="MX",
510
+ data="mx-cache.online.net.",
511
+ ttl=3600,
512
+ priority=20)
513
+ ```
514
+
515
+ ### Create dynamic records
516
+
517
+ The folllowing commands allow you to:
518
+
519
+ - create a Geo IP record for `images.domain.tld` that points to different IPs based on the user's location: `1.2.3.5` for users in France (EU), and `4.3.2.1` for users in North America (NA)
520
+
521
+ - create an HTTP service record for `app.domain.tld` that checks the health of specified IPs and responds based on their status.
522
+
523
+ - create view-based records for `db.domain.tld` that resolve differently based on the client's subnet.
524
+
525
+ - create a weighted record for `web.domain.tld` that directs traffic to different IPs based on their weights.
526
+
527
+ ```python
528
+ import pulumi
529
+ import pulumiverse_scaleway as scaleway
530
+
531
+ geo_ip = scaleway.DomainRecord("geo_ip",
532
+ dns_zone="domain.tld",
533
+ name="images",
534
+ type="A",
535
+ data="1.2.3.4",
536
+ ttl=3600,
537
+ geo_ip={
538
+ "matches": [
539
+ {
540
+ "continents": ["EU"],
541
+ "countries": ["FR"],
542
+ "data": "1.2.3.5",
543
+ },
544
+ {
545
+ "continents": ["NA"],
546
+ "data": "4.3.2.1",
547
+ },
548
+ ],
549
+ })
550
+ http_service = scaleway.DomainRecord("http_service",
551
+ dns_zone="domain.tld",
552
+ name="app",
553
+ type="A",
554
+ data="1.2.3.4",
555
+ ttl=3600,
556
+ http_service={
557
+ "ips": [
558
+ "1.2.3.5",
559
+ "1.2.3.6",
560
+ ],
561
+ "must_contain": "up",
562
+ "url": "http://mywebsite.com/health",
563
+ "user_agent": "scw_service_up",
564
+ "strategy": "hashed",
565
+ })
566
+ view = scaleway.DomainRecord("view",
567
+ dns_zone="domain.tld",
568
+ name="db",
569
+ type="A",
570
+ data="1.2.3.4",
571
+ ttl=3600,
572
+ views=[
573
+ {
574
+ "subnet": "100.0.0.0/16",
575
+ "data": "1.2.3.5",
576
+ },
577
+ {
578
+ "subnet": "100.1.0.0/16",
579
+ "data": "1.2.3.6",
580
+ },
581
+ ])
582
+ weighted = scaleway.DomainRecord("weighted",
583
+ dns_zone="domain.tld",
584
+ name="web",
585
+ type="A",
586
+ data="1.2.3.4",
587
+ ttl=3600,
588
+ weighteds=[
589
+ {
590
+ "ip": "1.2.3.5",
591
+ "weight": 1,
592
+ },
593
+ {
594
+ "ip": "1.2.3.6",
595
+ "weight": 2,
596
+ },
597
+ ])
598
+ ```
599
+
600
+ ### Create an Instance and add records with the new Instance IP
601
+
602
+ The following commands allow you to:
603
+
604
+ - create a Scaleway Instance
605
+ - assign The Instance's IP address to various DNS records for a specified DNS zone
606
+
607
+ ```python
608
+ import pulumi
609
+ import pulumiverse_scaleway as scaleway
610
+
611
+ config = pulumi.Config()
612
+ # Your project ID.
613
+ project_id = config.require("projectId")
614
+ # The DNS Zone used for testing records.
615
+ dns_zone = config.require("dnsZone")
616
+ public_ip = scaleway.InstanceIp("public_ip", project_id=project_id)
617
+ web = scaleway.InstanceServer("web",
618
+ project_id=project_id,
619
+ type="DEV1-S",
620
+ image="ubuntu_jammy",
621
+ tags=[
622
+ "front",
623
+ "web",
624
+ ],
625
+ ip_id=public_ip.id,
626
+ root_volume={
627
+ "size_in_gb": 20,
628
+ })
629
+ web_a = scaleway.DomainRecord("web_A",
630
+ dns_zone=dns_zone,
631
+ name="web",
632
+ type="A",
633
+ data=web.public_ip,
634
+ ttl=3600)
635
+ web_cname = scaleway.DomainRecord("web_cname",
636
+ dns_zone=dns_zone,
637
+ name="www",
638
+ type="CNAME",
639
+ data=f"web.{dns_zone}.",
640
+ ttl=3600)
641
+ web_alias = scaleway.DomainRecord("web_alias",
642
+ dns_zone=dns_zone,
643
+ name="",
644
+ type="ALIAS",
645
+ data=f"web.{dns_zone}.",
646
+ ttl=3600)
647
+ ```
648
+
649
+ ## Multiple records
650
+
651
+ Some record types can have multiple data with the same name (e.g., `A`, `AAAA`, `MX`, `NS`, etc.). You can duplicate a `DomainRecord` resource with the same `name`, and the records will be added.
652
+
653
+ Note however, that some records (e.g., CNAME, multiple dynamic records of different types) must be unique.
654
+
655
+ ## Import
656
+
657
+ This section explains how to import a record using the `{dns_zone}/{id}` format.
658
+
659
+ bash
660
+
661
+ ```sh
662
+ $ pulumi import scaleway:index/domainRecord:DomainRecord www subdomain.domain.tld/11111111-1111-1111-1111-111111111111
663
+ ```
664
+
665
+ :param str resource_name: The name of the resource.
666
+ :param pulumi.ResourceOptions opts: Options for the resource.
667
+ :param pulumi.Input[str] data: The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.).
668
+ :param pulumi.Input[str] dns_zone: The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
669
+ :param pulumi.Input[Union['DomainRecordGeoIpArgs', 'DomainRecordGeoIpArgsDict']] geo_ip: Return record based on client localisation
670
+ :param pulumi.Input[Union['DomainRecordHttpServiceArgs', 'DomainRecordHttpServiceArgsDict']] http_service: Return record based on client localisation
671
+ :param pulumi.Input[bool] keep_empty_zone: When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/).
672
+ :param pulumi.Input[str] name: The name of the record (can be an empty string for a root record).
673
+ :param pulumi.Input[int] priority: The priority of the record (mostly used with an `MX` record).
674
+ :param pulumi.Input[str] project_id: The project_id you want to attach the resource to
675
+ :param pulumi.Input[int] ttl: Time To Live of the record in seconds.
676
+ :param pulumi.Input[str] type: The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`).
677
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordViewArgs', 'DomainRecordViewArgsDict']]]] views: Return record based on client subnet
678
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordWeightedArgs', 'DomainRecordWeightedArgsDict']]]] weighteds: Return record based on weight
679
+ """
680
+ ...
681
+ @overload
682
+ def __init__(__self__,
683
+ resource_name: str,
684
+ args: DomainRecordArgs,
685
+ opts: Optional[pulumi.ResourceOptions] = None):
686
+ """
687
+ The `DomainRecord` resource allows you to create and manage DNS records for Scaleway domains.
688
+
689
+ Refer to the Domains and DNS [product documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and [API documentation](https://www.scaleway.com/en/developers/api/domains-and-dns/) for more information.
690
+
691
+ ## Example Usage
692
+
693
+ ### Create basic DNS records
694
+
695
+ The folllowing commands allow you to:
696
+
697
+ - create an A record for the `www.domain.tld` domain, pointing to `1.2.3.4` and another one pointing to `1.2.3.5`
698
+
699
+ - create an MX record with the `mx.online.net.` mail server and a priority of 10, and another one with the `mx-cache.online.net.` mail server and a priority of 20
700
+
701
+ ```python
702
+ import pulumi
703
+ import pulumiverse_scaleway as scaleway
704
+
705
+ www = scaleway.DomainRecord("www",
706
+ dns_zone="domain.tld",
707
+ name="www",
708
+ type="A",
709
+ data="1.2.3.4",
710
+ ttl=3600)
711
+ www2 = scaleway.DomainRecord("www2",
712
+ dns_zone="domain.tld",
713
+ name="www",
714
+ type="A",
715
+ data="1.2.3.5",
716
+ ttl=3600)
717
+ mx = scaleway.DomainRecord("mx",
718
+ dns_zone="domain.tld",
719
+ name="",
720
+ type="MX",
721
+ data="mx.online.net.",
722
+ ttl=3600,
723
+ priority=10)
724
+ mx2 = scaleway.DomainRecord("mx2",
725
+ dns_zone="domain.tld",
726
+ name="",
727
+ type="MX",
728
+ data="mx-cache.online.net.",
729
+ ttl=3600,
730
+ priority=20)
731
+ ```
732
+
733
+ ### Create dynamic records
734
+
735
+ The folllowing commands allow you to:
736
+
737
+ - create a Geo IP record for `images.domain.tld` that points to different IPs based on the user's location: `1.2.3.5` for users in France (EU), and `4.3.2.1` for users in North America (NA)
738
+
739
+ - create an HTTP service record for `app.domain.tld` that checks the health of specified IPs and responds based on their status.
740
+
741
+ - create view-based records for `db.domain.tld` that resolve differently based on the client's subnet.
742
+
743
+ - create a weighted record for `web.domain.tld` that directs traffic to different IPs based on their weights.
744
+
745
+ ```python
746
+ import pulumi
747
+ import pulumiverse_scaleway as scaleway
748
+
749
+ geo_ip = scaleway.DomainRecord("geo_ip",
750
+ dns_zone="domain.tld",
751
+ name="images",
752
+ type="A",
753
+ data="1.2.3.4",
754
+ ttl=3600,
755
+ geo_ip={
756
+ "matches": [
757
+ {
758
+ "continents": ["EU"],
759
+ "countries": ["FR"],
760
+ "data": "1.2.3.5",
761
+ },
762
+ {
763
+ "continents": ["NA"],
764
+ "data": "4.3.2.1",
765
+ },
766
+ ],
767
+ })
768
+ http_service = scaleway.DomainRecord("http_service",
769
+ dns_zone="domain.tld",
770
+ name="app",
771
+ type="A",
772
+ data="1.2.3.4",
773
+ ttl=3600,
774
+ http_service={
775
+ "ips": [
776
+ "1.2.3.5",
777
+ "1.2.3.6",
778
+ ],
779
+ "must_contain": "up",
780
+ "url": "http://mywebsite.com/health",
781
+ "user_agent": "scw_service_up",
782
+ "strategy": "hashed",
783
+ })
784
+ view = scaleway.DomainRecord("view",
785
+ dns_zone="domain.tld",
786
+ name="db",
787
+ type="A",
788
+ data="1.2.3.4",
789
+ ttl=3600,
790
+ views=[
791
+ {
792
+ "subnet": "100.0.0.0/16",
793
+ "data": "1.2.3.5",
794
+ },
795
+ {
796
+ "subnet": "100.1.0.0/16",
797
+ "data": "1.2.3.6",
798
+ },
799
+ ])
800
+ weighted = scaleway.DomainRecord("weighted",
801
+ dns_zone="domain.tld",
802
+ name="web",
803
+ type="A",
804
+ data="1.2.3.4",
805
+ ttl=3600,
806
+ weighteds=[
807
+ {
808
+ "ip": "1.2.3.5",
809
+ "weight": 1,
810
+ },
811
+ {
812
+ "ip": "1.2.3.6",
813
+ "weight": 2,
814
+ },
815
+ ])
816
+ ```
817
+
818
+ ### Create an Instance and add records with the new Instance IP
819
+
820
+ The following commands allow you to:
821
+
822
+ - create a Scaleway Instance
823
+ - assign The Instance's IP address to various DNS records for a specified DNS zone
824
+
825
+ ```python
826
+ import pulumi
827
+ import pulumiverse_scaleway as scaleway
828
+
829
+ config = pulumi.Config()
830
+ # Your project ID.
831
+ project_id = config.require("projectId")
832
+ # The DNS Zone used for testing records.
833
+ dns_zone = config.require("dnsZone")
834
+ public_ip = scaleway.InstanceIp("public_ip", project_id=project_id)
835
+ web = scaleway.InstanceServer("web",
836
+ project_id=project_id,
837
+ type="DEV1-S",
838
+ image="ubuntu_jammy",
839
+ tags=[
840
+ "front",
841
+ "web",
842
+ ],
843
+ ip_id=public_ip.id,
844
+ root_volume={
845
+ "size_in_gb": 20,
846
+ })
847
+ web_a = scaleway.DomainRecord("web_A",
848
+ dns_zone=dns_zone,
849
+ name="web",
850
+ type="A",
851
+ data=web.public_ip,
852
+ ttl=3600)
853
+ web_cname = scaleway.DomainRecord("web_cname",
854
+ dns_zone=dns_zone,
855
+ name="www",
856
+ type="CNAME",
857
+ data=f"web.{dns_zone}.",
858
+ ttl=3600)
859
+ web_alias = scaleway.DomainRecord("web_alias",
860
+ dns_zone=dns_zone,
861
+ name="",
862
+ type="ALIAS",
863
+ data=f"web.{dns_zone}.",
864
+ ttl=3600)
865
+ ```
866
+
867
+ ## Multiple records
868
+
869
+ Some record types can have multiple data with the same name (e.g., `A`, `AAAA`, `MX`, `NS`, etc.). You can duplicate a `DomainRecord` resource with the same `name`, and the records will be added.
870
+
871
+ Note however, that some records (e.g., CNAME, multiple dynamic records of different types) must be unique.
872
+
873
+ ## Import
874
+
875
+ This section explains how to import a record using the `{dns_zone}/{id}` format.
876
+
877
+ bash
878
+
879
+ ```sh
880
+ $ pulumi import scaleway:index/domainRecord:DomainRecord www subdomain.domain.tld/11111111-1111-1111-1111-111111111111
881
+ ```
882
+
883
+ :param str resource_name: The name of the resource.
884
+ :param DomainRecordArgs args: The arguments to use to populate this resource's properties.
885
+ :param pulumi.ResourceOptions opts: Options for the resource.
886
+ """
887
+ ...
888
+ def __init__(__self__, resource_name: str, *args, **kwargs):
889
+ resource_args, opts = _utilities.get_resource_args_opts(DomainRecordArgs, pulumi.ResourceOptions, *args, **kwargs)
890
+ if resource_args is not None:
891
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
892
+ else:
893
+ __self__._internal_init(resource_name, *args, **kwargs)
894
+
895
+ def _internal_init(__self__,
896
+ resource_name: str,
897
+ opts: Optional[pulumi.ResourceOptions] = None,
898
+ data: Optional[pulumi.Input[str]] = None,
899
+ dns_zone: Optional[pulumi.Input[str]] = None,
900
+ geo_ip: Optional[pulumi.Input[Union['DomainRecordGeoIpArgs', 'DomainRecordGeoIpArgsDict']]] = None,
901
+ http_service: Optional[pulumi.Input[Union['DomainRecordHttpServiceArgs', 'DomainRecordHttpServiceArgsDict']]] = None,
902
+ keep_empty_zone: Optional[pulumi.Input[bool]] = None,
903
+ name: Optional[pulumi.Input[str]] = None,
904
+ priority: Optional[pulumi.Input[int]] = None,
905
+ project_id: Optional[pulumi.Input[str]] = None,
906
+ ttl: Optional[pulumi.Input[int]] = None,
907
+ type: Optional[pulumi.Input[str]] = None,
908
+ views: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordViewArgs', 'DomainRecordViewArgsDict']]]]] = None,
909
+ weighteds: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordWeightedArgs', 'DomainRecordWeightedArgsDict']]]]] = None,
910
+ __props__=None):
911
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
912
+ if not isinstance(opts, pulumi.ResourceOptions):
913
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
914
+ if opts.id is None:
915
+ if __props__ is not None:
916
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
917
+ __props__ = DomainRecordArgs.__new__(DomainRecordArgs)
918
+
919
+ if data is None and not opts.urn:
920
+ raise TypeError("Missing required property 'data'")
921
+ __props__.__dict__["data"] = data
922
+ if dns_zone is None and not opts.urn:
923
+ raise TypeError("Missing required property 'dns_zone'")
924
+ __props__.__dict__["dns_zone"] = dns_zone
925
+ __props__.__dict__["geo_ip"] = geo_ip
926
+ __props__.__dict__["http_service"] = http_service
927
+ __props__.__dict__["keep_empty_zone"] = keep_empty_zone
928
+ __props__.__dict__["name"] = name
929
+ __props__.__dict__["priority"] = priority
930
+ __props__.__dict__["project_id"] = project_id
931
+ __props__.__dict__["ttl"] = ttl
932
+ if type is None and not opts.urn:
933
+ raise TypeError("Missing required property 'type'")
934
+ __props__.__dict__["type"] = type
935
+ __props__.__dict__["views"] = views
936
+ __props__.__dict__["weighteds"] = weighteds
937
+ __props__.__dict__["fqdn"] = None
938
+ __props__.__dict__["root_zone"] = None
939
+ super(DomainRecord, __self__).__init__(
940
+ 'scaleway:index/domainRecord:DomainRecord',
941
+ resource_name,
942
+ __props__,
943
+ opts)
944
+
945
+ @staticmethod
946
+ def get(resource_name: str,
947
+ id: pulumi.Input[str],
948
+ opts: Optional[pulumi.ResourceOptions] = None,
949
+ data: Optional[pulumi.Input[str]] = None,
950
+ dns_zone: Optional[pulumi.Input[str]] = None,
951
+ fqdn: Optional[pulumi.Input[str]] = None,
952
+ geo_ip: Optional[pulumi.Input[Union['DomainRecordGeoIpArgs', 'DomainRecordGeoIpArgsDict']]] = None,
953
+ http_service: Optional[pulumi.Input[Union['DomainRecordHttpServiceArgs', 'DomainRecordHttpServiceArgsDict']]] = None,
954
+ keep_empty_zone: Optional[pulumi.Input[bool]] = None,
955
+ name: Optional[pulumi.Input[str]] = None,
956
+ priority: Optional[pulumi.Input[int]] = None,
957
+ project_id: Optional[pulumi.Input[str]] = None,
958
+ root_zone: Optional[pulumi.Input[bool]] = None,
959
+ ttl: Optional[pulumi.Input[int]] = None,
960
+ type: Optional[pulumi.Input[str]] = None,
961
+ views: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordViewArgs', 'DomainRecordViewArgsDict']]]]] = None,
962
+ weighteds: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordWeightedArgs', 'DomainRecordWeightedArgsDict']]]]] = None) -> 'DomainRecord':
963
+ """
964
+ Get an existing DomainRecord resource's state with the given name, id, and optional extra
965
+ properties used to qualify the lookup.
966
+
967
+ :param str resource_name: The unique name of the resulting resource.
968
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
969
+ :param pulumi.ResourceOptions opts: Options for the resource.
970
+ :param pulumi.Input[str] data: The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.).
971
+ :param pulumi.Input[str] dns_zone: The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
972
+ :param pulumi.Input[str] fqdn: The FQDN of the record.
973
+ :param pulumi.Input[Union['DomainRecordGeoIpArgs', 'DomainRecordGeoIpArgsDict']] geo_ip: Return record based on client localisation
974
+ :param pulumi.Input[Union['DomainRecordHttpServiceArgs', 'DomainRecordHttpServiceArgsDict']] http_service: Return record based on client localisation
975
+ :param pulumi.Input[bool] keep_empty_zone: When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/).
976
+ :param pulumi.Input[str] name: The name of the record (can be an empty string for a root record).
977
+ :param pulumi.Input[int] priority: The priority of the record (mostly used with an `MX` record).
978
+ :param pulumi.Input[str] project_id: The project_id you want to attach the resource to
979
+ :param pulumi.Input[bool] root_zone: Does the DNS zone is the root zone or not
980
+ :param pulumi.Input[int] ttl: Time To Live of the record in seconds.
981
+ :param pulumi.Input[str] type: The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`).
982
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordViewArgs', 'DomainRecordViewArgsDict']]]] views: Return record based on client subnet
983
+ :param pulumi.Input[Sequence[pulumi.Input[Union['DomainRecordWeightedArgs', 'DomainRecordWeightedArgsDict']]]] weighteds: Return record based on weight
984
+ """
985
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
986
+
987
+ __props__ = _DomainRecordState.__new__(_DomainRecordState)
988
+
989
+ __props__.__dict__["data"] = data
990
+ __props__.__dict__["dns_zone"] = dns_zone
991
+ __props__.__dict__["fqdn"] = fqdn
992
+ __props__.__dict__["geo_ip"] = geo_ip
993
+ __props__.__dict__["http_service"] = http_service
994
+ __props__.__dict__["keep_empty_zone"] = keep_empty_zone
995
+ __props__.__dict__["name"] = name
996
+ __props__.__dict__["priority"] = priority
997
+ __props__.__dict__["project_id"] = project_id
998
+ __props__.__dict__["root_zone"] = root_zone
999
+ __props__.__dict__["ttl"] = ttl
1000
+ __props__.__dict__["type"] = type
1001
+ __props__.__dict__["views"] = views
1002
+ __props__.__dict__["weighteds"] = weighteds
1003
+ return DomainRecord(resource_name, opts=opts, __props__=__props__)
1004
+
1005
+ @property
1006
+ @pulumi.getter
1007
+ def data(self) -> pulumi.Output[str]:
1008
+ """
1009
+ The content of the record (an IPv4 for an `A` record, a string for a `TXT` record, etc.).
1010
+ """
1011
+ return pulumi.get(self, "data")
1012
+
1013
+ @property
1014
+ @pulumi.getter(name="dnsZone")
1015
+ def dns_zone(self) -> pulumi.Output[str]:
1016
+ """
1017
+ The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
1018
+ """
1019
+ return pulumi.get(self, "dns_zone")
1020
+
1021
+ @property
1022
+ @pulumi.getter
1023
+ def fqdn(self) -> pulumi.Output[str]:
1024
+ """
1025
+ The FQDN of the record.
1026
+ """
1027
+ return pulumi.get(self, "fqdn")
1028
+
1029
+ @property
1030
+ @pulumi.getter(name="geoIp")
1031
+ def geo_ip(self) -> pulumi.Output[Optional['outputs.DomainRecordGeoIp']]:
1032
+ """
1033
+ Return record based on client localisation
1034
+ """
1035
+ return pulumi.get(self, "geo_ip")
1036
+
1037
+ @property
1038
+ @pulumi.getter(name="httpService")
1039
+ def http_service(self) -> pulumi.Output[Optional['outputs.DomainRecordHttpService']]:
1040
+ """
1041
+ Return record based on client localisation
1042
+ """
1043
+ return pulumi.get(self, "http_service")
1044
+
1045
+ @property
1046
+ @pulumi.getter(name="keepEmptyZone")
1047
+ def keep_empty_zone(self) -> pulumi.Output[Optional[bool]]:
1048
+ """
1049
+ When destroying a resource, if only NS records remain and this is set to `false`, the zone will be deleted. Note that each zone not deleted will [be billed](https://www.scaleway.com/en/dns/).
1050
+ """
1051
+ return pulumi.get(self, "keep_empty_zone")
1052
+
1053
+ @property
1054
+ @pulumi.getter
1055
+ def name(self) -> pulumi.Output[str]:
1056
+ """
1057
+ The name of the record (can be an empty string for a root record).
1058
+ """
1059
+ return pulumi.get(self, "name")
1060
+
1061
+ @property
1062
+ @pulumi.getter
1063
+ def priority(self) -> pulumi.Output[int]:
1064
+ """
1065
+ The priority of the record (mostly used with an `MX` record).
1066
+ """
1067
+ return pulumi.get(self, "priority")
1068
+
1069
+ @property
1070
+ @pulumi.getter(name="projectId")
1071
+ def project_id(self) -> pulumi.Output[str]:
1072
+ """
1073
+ The project_id you want to attach the resource to
1074
+ """
1075
+ return pulumi.get(self, "project_id")
1076
+
1077
+ @property
1078
+ @pulumi.getter(name="rootZone")
1079
+ def root_zone(self) -> pulumi.Output[bool]:
1080
+ """
1081
+ Does the DNS zone is the root zone or not
1082
+ """
1083
+ return pulumi.get(self, "root_zone")
1084
+
1085
+ @property
1086
+ @pulumi.getter
1087
+ def ttl(self) -> pulumi.Output[Optional[int]]:
1088
+ """
1089
+ Time To Live of the record in seconds.
1090
+ """
1091
+ return pulumi.get(self, "ttl")
1092
+
1093
+ @property
1094
+ @pulumi.getter
1095
+ def type(self) -> pulumi.Output[str]:
1096
+ """
1097
+ The type of the record (`A`, `AAAA`, `MX`, `CNAME`, `DNAME`, `ALIAS`, `NS`, `PTR`, `SRV`, `TXT`, `TLSA`, or `CAA`).
1098
+ """
1099
+ return pulumi.get(self, "type")
1100
+
1101
+ @property
1102
+ @pulumi.getter
1103
+ def views(self) -> pulumi.Output[Optional[Sequence['outputs.DomainRecordView']]]:
1104
+ """
1105
+ Return record based on client subnet
1106
+ """
1107
+ return pulumi.get(self, "views")
1108
+
1109
+ @property
1110
+ @pulumi.getter
1111
+ def weighteds(self) -> pulumi.Output[Optional[Sequence['outputs.DomainRecordWeighted']]]:
1112
+ """
1113
+ Return record based on weight
1114
+ """
1115
+ return pulumi.get(self, "weighteds")
1116
+