github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/icinga2/index.html.markdown (about) 1 --- 2 layout: "icinga2" 3 page_title: "Provider: Icinga2" 4 sidebar_current: "docs-icinga2-index" 5 description: |- 6 The Icinga2 provider is used to configure hosts to be monitored by Icinga2 servers. The provider needs to be configured with the API URL of the Icinga2 server and credentials for an API user with the appropriate permissions. 7 --- 8 9 10 # Icinga2 Provider 11 12 The Icinga2 provider is used to configure hosts to be monitored by 13 [Icinga2](https://www.icinga.com/products/icinga-2/) servers. The provider 14 needs to be configured with the API URL of the Icinga2 server and credentials 15 for an API user with the appropriate permissions. 16 17 ## Example Usage 18 19 ```hcl 20 # Configure the Icinga2 provider 21 provider "icinga2" { 22 api_url = "https://192.168.33.5:5665/v1" 23 api_user = "root" 24 api_password = "icinga" 25 insecure_skip_tls_verify = true 26 } 27 28 # Configure a host 29 resouce "icinga2_host" "web-server" { 30 # ... 31 } 32 ``` 33 34 ## Authentication 35 36 ### Static credentials ### 37 38 Static credentials can be provided by adding an `api_user` and `api_password` in-line in the 39 icinga2 provider block: 40 41 Usage: 42 43 ```hcl 44 provider "icinga2" { 45 api_url = "https://192.168.33.5:5665/v1" 46 api_user = "root" 47 api_password = "icinga" 48 } 49 ``` 50 51 52 ###Environment variables 53 54 You can provide your credentials via `ICINGA2_API_USER` and `ICINGA2_API_PASSWORD`, 55 environment variables, storing your Icinga2 API user and password, respectively. 56 `ICINGA2_API_URL` and `ICINGA2_INSECURE_SKIP_TLS_VERIFY` are also used, if applicable: 57 58 ```hcl 59 provider "icinga" {} 60 ``` 61 62 Usage: 63 64 ```hcl 65 $ export ICINGA2_API_URL=https://192.168.33.5:5665/v1 66 $ export ICINGA2_API_USER=root 67 $ export ICINGA2_API_PASSWORD=icinga 68 $ export ICINGA2_INSECURE_SKIP_TLS_VERIFY=true 69 $ terraform plan 70 ``` 71 72 ## Argument Reference 73 74 * ``api_url`` - (Required) The root API URL of an Icinga2 server. May alternatively be 75 set via the ``ICINGA2_API_URL`` environment variable. 76 77 * ``api_user`` - (Required) The API username to use to 78 authenticate to the Icinga2 server. May alternatively 79 be set via the ``ICINGA2_API_USER`` environment variable. 80 81 * ``api_password`` - (Required) The password to use to 82 authenticate to the Icinga2 server. May alternatively 83 be set via the ``ICINGA2_API_PASSWORD`` environment variable. 84 85 * ``insecure_skip_tls_verify`` - (optional) Defaults to false. If set to true, 86 verification of the Icinga2 server's SSL certificate is disabled. This is a security 87 risk and should be avoided. May alternatively be set via the 88 ``ICINGA2_INSECURE_SKIP_TLS_VERIFY`` environment variable.