- Terraform needs to be locally installed.
- An Azure account is needed.
- Azure CLI.
-
Sign in to the correct subscription using the az cli
$ az login
Note: if you have multiple subscriptions, you will have to set the default one using
az account set --subscription YOURSUBSCRIPTION
-
Navigate to the
terraform
azure folder$ cd terraform/azure
-
Initialize terraform
$ terraform init
-
Create a
terraform.tfvars
file inside the terraform folder It needs to contain the following as a minimum:azure_location = "" # azure location where you want to provision the resources azure_subscription_id = "" # azure subscription id in which subcsription you want to provision the resources
Check out
variables.tf
for a complete list of variables -
Verify the configuration and execution plan by running
terraform plan
$ terraform plan
-
Apply the configuration
$ terraform apply
This terraform script supports the use of custom domains via Azure DNS.
-
Ensure your account can create DNS records in the target Azure DNS zone.
-
Add the following values to the
terraform.tfvars
file:azure_location = "" # azure location where you want to provision the resources custom_domain = "acebox.example.com" # Set to override default domain (ip_address.xip.io) dns_zone_name = "example.com" # Name of Azure DNS zone
It is possible to leverage the Ansible OpenTelemetry callback plugin to send Traces to the Dynatraces API.
The following variable need to be set to enable it:
otel_export_enable = true
Note: The traces will be sent to the
dt_tenant/api/v2/otlp
endpoint Note: The api token specified in thedt_api_token
variable needs to have the additionalopenTelemetryTrace.ingest
scope
Command | Result |
---|---|
terraform destroy |
deletes any resources created by Terraform |
terraform plan -destroy |
view a speculative destroy plan, to see what the effect of destroying would be |
terraform show |
Outputs the resources created by Terraform. Useful to verify IP addresses and the dashboard URL. |
terraform output -json |
Shows Terraform outputs in clear text json. This command might be useful to show the dashboard password. |