Initializing the Terraform Provider
To use the Traffic Manager Terraform provider, initialize it within your Terraform template. The provider requires four arguments:
Field Name | Type | Description |
|---|---|---|
base_url | string | The base URL of the Traffic Manager REST API. Use either a direct Traffic Manager URL, or through a Services Director (Services Director) proxy. |
username | string | The admin username of either the Traffic Manager or the Services Director proxy you are connecting to. |
password | string | The admin password of either the Traffic Manager or the Services Director proxy you are connecting to. |
verify_ssl_cert | boolean | If set to true, the provider checks that the Traffic Manager/Services Director provides a trusted SSL certificate when connecting to the REST API. If set to false, untrusted (for example, self-signed) certificates are accepted. Default: true. |
The following code provides examples of how to initialize the provider:
# Direct to the Traffic Manager
provider "vtm" {
base_url = "https://192.0.2.10:9070/api"
username = "admin"
password = "mYvtm53cret!"
verify_ssl_cert = true
}
# Through a Services Director proxy
provider "vtm" {
base_url = "https://192.0.2.100:8100/api/tmcm/<VERSION>/instance/<INSTANCE_ID>"
username = "admin"
password = "mYsd53cret!"
verify_ssl_cert = true
}
