2.8 KiB
2.8 KiB
| page_title | subcategory | description |
|---|---|---|
| interwebao_vps Resource - Interweb Angola | VPS | 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
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,bienniallyortriennially. Required withproduct_id. Cannot change after the purchase.config_options(Map of Number) Choices of the purchase,{ "option id" = choice id }, from theinterwebao_catalog_productdata source. Options left out get the first choice.promo_code(String) Promo code for the purchase.power_state(String)runningorstopped. When not set, it is only read.timezone(String) Time zone, such asUTC.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. Default30.
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 asandbox_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
terraform import interwebao_vps.existing 12345
Keep server_id = 12345 in the configuration.