|
| 1 | +--- |
| 2 | +subcategory : "Domain names" |
| 3 | +--- |
| 4 | + |
| 5 | +# ovh_domain_ds_records |
| 6 | + |
| 7 | +Use this resource to manage a domain's DS records. |
| 8 | + |
| 9 | +## Example Usage |
| 10 | + |
| 11 | +```hcl |
| 12 | +resource "ovh_domain_ds_records" "ds_records" { |
| 13 | + domain = "mydomain.ovh" |
| 14 | + |
| 15 | + ds_records { |
| 16 | + algorithm = "RSASHA1_NSEC3_SHA1" |
| 17 | + flags = "KEY_SIGNING_KEY" |
| 18 | + public_key = "my_base64_encoded_public_key" |
| 19 | + tag = 12345 |
| 20 | + } |
| 21 | +} |
| 22 | +``` |
| 23 | + |
| 24 | +## Argument Reference |
| 25 | + |
| 26 | +The following arguments are supported: |
| 27 | + |
| 28 | +* `domain` - (Required) Domain name for which to manage DS records |
| 29 | +* `ds_records` - (Required) Details about a DS record |
| 30 | + * `algorithm` - (Required) The record algorithm (`RSASHA1`, `RSASHA1_NSEC3_SHA1`, `RSASHA256`, `RSASHA512`, `ECDSAP256SHA256`, `ECDSAP384SHA384`, `ED25519`) |
| 31 | + * `flags` - (Required) The record flag (`ZONE_SIGNING_KEY`, `KEY_SIGNING_KEY`) |
| 32 | + * `public_key` - (Required) The record base64 encoded public key |
| 33 | + * `tag` - (Required) The record tag |
| 34 | + |
| 35 | + |
| 36 | +## Attributes Reference |
| 37 | + |
| 38 | +* `domain` - Domain name and resource ID |
| 39 | +* `ds_records` - Details about a DS record |
| 40 | + * `algorithm` - The record algorithm (`RSASHA1`, `RSASHA1_NSEC3_SHA1`, `RSASHA256`, `RSASHA512`, `ECDSAP256SHA256`, `ECDSAP384SHA384`, `ED25519`) |
| 41 | + * `flags` - The record flag (`ZONE_SIGNING_KEY`, `KEY_SIGNING_KEY`) |
| 42 | + * `public_key` - The record base64 encoded public key |
| 43 | + * `tag` - The record tag |
| 44 | + |
| 45 | +## Import |
| 46 | + |
| 47 | +DS records can be imported using their `domain`. |
| 48 | + |
| 49 | +Using the following configuration: |
| 50 | + |
| 51 | +```hcl |
| 52 | +import { |
| 53 | + to = ovh_domain_ds_records.ds_records |
| 54 | + id = "<domain name>" |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | +You can then run: |
| 59 | + |
| 60 | +```bash |
| 61 | +$ terraform plan -generate-config-out=ds_records.tf |
| 62 | +$ terraform apply |
| 63 | +``` |
| 64 | + |
| 65 | +The file `ds_records.tf` will then contain the imported resource's configuration, that can be copied next to the `import` block above. |
| 66 | +See https://developer.hashicorp.com/terraform/language/import/generating-configuration for more details. |
0 commit comments