Vigiar
1
0
Derivar
Você já tinha feito uma derivação do repositório terraform-provider-interwebao, anteriormente
0
terraform-provider-interwebao/docs/resources/vps.md
2026-11-28 15:28:02 +02:00

73 linhas
2,8 KiB
Markdown

---
page_title: "interwebao_vps Resource - Interweb Angola"
subcategory: "VPS"
description: |-
A Interweb Angola VPS: buy a new one or manage one you already have.
---
# interwebao_vps (Resource)
A Interweb Angola VPS. Set `product_id` and `billing_cycle` to buy a new server with credit, or `server_id` to manage a server you already have (nothing is bought).
The provider can start and stop the server and change its time zone and reverse DNS. Reinstalling, restoring backups and changing the root password are not done by Terraform: use the API or Meu Interweb.
`terraform destroy` only removes the server from the state. The API cannot cancel services: cancel it in Meu Interweb.
## Example Usage
```terraform
data "interwebao_catalog_products" "vps" {
kind = "vps"
}
resource "interwebao_vps" "web" {
product_id = data.interwebao_catalog_products.vps.products[0].id
billing_cycle = "monthly"
power_state = "running"
timezone = "Africa/Luanda"
}
resource "interwebao_vps" "existing" {
server_id = 12345
power_state = "running"
reverse_dns = {
"203.0.113.10" = "mail.example.co.ao"
}
}
```
## Schema
### Optional
- `server_id` (Number) Id of a server you already have. Changing it points the resource to another server.
- `product_id` (Number) Catalog product to buy. Cannot change after the purchase.
- `billing_cycle` (String) `monthly`, `quarterly`, `semi_annually`, `annually`, `biennially` or `triennially`. Required with `product_id`. Cannot change after the purchase.
- `config_options` (Map of Number) Choices of the purchase, `{ "option id" = choice id }`, from the `interwebao_catalog_product` data source. Options left out get the first choice.
- `promo_code` (String) Promo code for the purchase.
- `power_state` (String) `running` or `stopped`. When not set, it is only read.
- `timezone` (String) Time zone, such as `UTC`.
- `reverse_dns` (Map of String) Name of each IP, `{ "ip" = "hostname" }`. Only the IPs listed are managed; an empty name goes back to the default.
- `wait_minutes` (Number) How long to wait for a new server and for power actions. Default `30`.
### Read-Only
- `id` (String) Server id.
- `name`, `status`, `product`, `ip`, `operating_system`, `location`, `next_due_date` (String)
- `additional_ips` (List of String)
- `vcpu`, `ram_gb`, `disk_gb` (Number)
- `order_id`, `invoice_id` (Number) Only when Terraform bought the server.
- `simulated` (Boolean) True when the purchase was simulated with a `sandbox_` key.
## Notes
- Power actions go into a queue: starting takes about 2 minutes and stopping about 6. Each server does one action at a time, with 15 seconds between actions.
- The power state comes from a copy up to a minute old.
## Import
```shell
terraform import interwebao_vps.existing 12345
```
Keep `server_id = 12345` in the configuration.