The purpose of this repo is to provide an automated solution for setting up the Datadog agent in various Azure resources.
- Create a
<DIR_NAME>/terraform.tfvarswithin the same level as the<DIR_NAME>/main.tf
(Note: replace <DIR_NAME> with k8 for example).
This repo assumes you have already created an Azure service principal. More information on how to create a Azure service principal can be found here.
- Provide the following keys & corresponding values:
subscription_id= <AZURE_SUBSCRIPTION_ID>client_id= <AZURE_SERVICE_PRINCIPAL_APP_ID>client_secret= <AZURE_SERVICE_PRINCIPAL_PASSWORD>tenant_id= <AZURE_SERVICE_PRINCIPAL_TENANT_ID>datadog_api_key= <DD_API_KEY>location= <AVAILABILITY_ZONE>
(Note: there are additional values that can be passed in, which depend on the Azure resources being created).
- Naivigate to
linux_vmdirectory. - Create a SSH key pair for access to the Linux VM.
- Run the following in on your local shell
ssh-keygen -m PEM -t rsa -b 4096& update the value within theterraform.tfvarsto point the created pub file.
- Run the following in on your local shell
- Apply the Terraform scripts:
terraform initterraform planterraform applyterraform apply -destroycan be used to remove the instance.
- Navigate to
windows_vmdirectory. - In the
install-datadog.ps1file replace_API_KEY_HEREwith your organization's Datadog API key. - Apply the Terraform scripts:
terraform initterraform planterraform applyterraform apply -destroycan be used to remove the instance.