Files
opentf/website/source/docs/providers/icinga2/r/host.html.markdown
Len Smith 015e96d0dd Initial check in for Icinga2 Provider/Resource (#8306)
* Initial checkin for PR request

* Added an argument to provider to allow control over whether or not TLS Certs will skip verification. Controllable via provider or env variable being set

* Initial check-in to use refactored module

* Checkin of very MVP for creating/deleting host test which works and validates basic host creation and deletion

* Check in with support for creating hosts with variables working

* Checking in work to date

* Remove code that causes travis CI to fail while I debug

* Adjust create to accept multivale

* Back on track. Working basic tests. go-icinga2-api needs more test too

* Squashing

* Back on track. Working basic tests. go-icinga2-api needs more test too

* Check in refactored hostgroup support

* Check in refactored check_command, hosts, and hsotgroup with a few test

* Checking in service code

* Add in dependency for icinga2 provider

* Add documentation. Refactor, fix and extend based on feedback from Hashicorp

* Added checking and validation around invalid URL and unavailable server
2016-12-12 15:28:26 +00:00

45 lines
1.1 KiB
Markdown

---
layout: "icinga2"
page_title: "Icinga2: host"
sidebar_current: "docs-icinga2-resource-host"
description: |-
Configures a host resource. This allows hosts to be configured, updated and deleted.
---
# icinga2\_host
Configures an Icinga2 host resource. This allows hosts to be configured, updated,
and deleted.
## Example Usage
```
# Configure a new host to be monitored by an Icinga2 Server
provider "icinga2" {
api_url=https://192.168.33.5:5665/v1
}
resource "icinga2_host" "host" {
hostname = "terraform-host-1"
address = "10.10.10.1"
check_command = "hostalive"
templates = [ "bp-host-web" ]
vars {
os = "linux"
osver = "1"
allowance = "none"
}
}
```
## Argument Reference
The following arguments are supported:
* `address` - (Required) The address of the host.
* `check_command` - (Required) The name of an existing Icinga2 CheckCommand object that is used to determine if the host is available or not.
* `hostname` - (Required) The hostname of the host.
* `templates` - (Optional) A list of Icinga2 templates to assign to the host.
* `vars` - (Optional) A mapping of variables to assign to the host.