-
Install Azure's CLI
-
Ensure Azure CLI is properly installed by logging into Azure
az login
You should receive a token from your browser that looks like:
[ { "cloudName": "AzureCloud", "homeTenantId": "########-####-####-####-############", "id": "########-####-####-####-############", "isDefault": true, "managedByTenants": [], "name": "Acme Inc", "state": "Enabled", "tenantId": "########-####-####-####-############", "user": { "name": "joe@somecompany.com", "type": "user" } } ]
-
Install Azure's Functions Core Tools
-
Clone Observe's Terraform Collection Module (terraform-azure-collection) repo locally
git clone git@github.com:observeinc/terraform-azure-collection.git
-
Assign Application Variables
Inside the root of the terraform-azure-collection create a file named
azure.auto.tfvars
. The contents of that file will be:
observe_customer = "<OBSERVE_CUSTOMER_ID>"
observe_token = "<DATASTREAM_INGEST_TOKEN>"
observe_domain = "<OBSERVE_DOMAIN(i.e. observe-staging.com)>"
timer_resources_func_schedule = "<TIMER_TRIGGER_FUNCTION_SCHEDULE>"
timer_vm_metrics_func_schedule = "<TIMER_TRIGGER_FUNCTION_SCHEDULE>"
location = "<AZURE_REGIONAL_NAME>"
Note: Default values are assigned for
timer_resources_func_schedule
andtimer_vm_metrics_func_schedule
, both based on NCRONTAB
location
's value is Azure's Regional Name and is "eastus" by default
-
Deploy the Application
Inside the root directory of the terraform-azure-collection module run the following commands:
terraform init
terraform apply -auto-approve
Collection should begin shortly
To receive logs and metrics for resources please add the appropriate diagnostic settings to each. See "Azure Resource Configuration" section in Observe's Azure Integration page for more info.
- Remove the terraform-azure-collection module by running the following in the root directory:
terraform destroy
Note: You may encounter the following bug in the Azure provider during your destroy:
Error: Deleting service principal with object ID "########-####-####-####-############", got status 403
ServicePrincipalsClient.BaseClient.Delete(): unexpected status 403 with OData error:
Authorization_RequestDenied: Insufficient privileges to complete the operation.
If this happens execute simply remove the azuread_service_principal.observe_service_principal from terraform state and continue the destroy
terraform state rm azuread_service_principal.observe_service_principal
terraform destroy