61 lines
2 KiB
Markdown
61 lines
2 KiB
Markdown
---
|
|
page_title: "mozout_domain Resource - MozOut"
|
|
subcategory: "Domains"
|
|
description: |-
|
|
A domain of your MozOut account: registered if needed, then managed.
|
|
---
|
|
|
|
# mozout_domain (Resource)
|
|
|
|
A domain of your MozOut account. If the domain is not in the account, it is registered with credit. If it already is, it is only managed and nothing is bought.
|
|
|
|
The provider manages the nameservers, the transfer lock and the renewal setting. Renewals, transfers and the EPP code are not done by Terraform.
|
|
|
|
`terraform destroy` only removes the domain from the state: domains are not deleted through the API.
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
resource "mozout_domain" "site" {
|
|
domain = "example.com"
|
|
years = 1
|
|
locked = true
|
|
auto_renew = true
|
|
nameservers = ["ns1.example.com", "ns2.example.com"]
|
|
}
|
|
```
|
|
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `domain` (String) Domain name. Changing it means another domain.
|
|
|
|
### Optional
|
|
|
|
- `years` (Number) Years to register, 1 to 10. Default `1`. Only used when registering.
|
|
- `promo_code` (String) Promo code, only used when registering.
|
|
- `nameservers` (List of String) From 2 to 5. When not set, they are only read.
|
|
- `locked` (Boolean) Transfer lock. When not set, it is only read.
|
|
- `auto_renew` (Boolean) Whether renewal invoices are issued. When not set, it is only read.
|
|
- `wait_minutes` (Number) How long to wait for a new registration. Default `15`.
|
|
|
|
### Read-Only
|
|
|
|
- `id` (String) The domain name.
|
|
- `domain_id` (Number)
|
|
- `status`, `registered_at`, `expires_at`, `next_due_date`, `currency` (String)
|
|
- `renewal_amount` (Number)
|
|
- `premium`, `dns_management` (Boolean)
|
|
- `registered_by_terraform` (Boolean) True when Terraform registered it.
|
|
- `simulated` (Boolean) True when the registration was simulated with a `sandbox_` key.
|
|
|
|
## Notes
|
|
|
|
- Nameserver changes are limited to 20 per minute. On the domain of the account email the API refuses them (`account_email_domain`): make that change in My MozOut.
|
|
|
|
## Import
|
|
|
|
```shell
|
|
terraform import mozout_domain.site example.com
|
|
```
|