Connecting Teevity to your Azure environment 

Last updated - 2024/08/05


Teevity connects to your Azure environment using the Azure Consumption API


Connection with the Teevity CLI

You can use the Teevity CLI (cf https://api.teevity.com to find the installation instructions).

teevity cloudservices declare-azure-ea --help


# Declare an Azure BillingAccount on a Teevity Account
# The Azure Consumption Async API specific parameters are specified via the '--teevity-custom-technicaldetails' option

#   - azureAsyncConsumptionTenantId

#   - azureAsyncConsumptionClientId      (aka applicationId/clientId in Microsoft parlance)

#   - azureAsyncConsumptionClientSecret  (aka clientSecret/secretKey in Microsoft parlance)
#   - subscriptionIdsOptionalFilter      (OPTIONAL list of subscription UUIDs, separated by ",")
teevity --key "$TEEVITY_APIKEY" cloudservices declare-account-azureea \

  --azureea-api-key-expiration-date "1674907200000" \

  --azureea-api-key-expiration-notification-recipient "cloudops.teevity.azure@acme.com" \

  --azureea-enrollment-id "82xxxx42" \

  --azureea-enrollment-name "Acme Azure Cloud" \

  --azureea-api-key "NoAzureApiKeyForAzureEA" \

  --teevity-custom-technicaldetails "{"azureAPIToUse":"azureConsumptionAsync", "azureAsyncConsumptionTenantId":"f35a6974xxxxxxxxxxxd7dc53a5", "azureAsyncConsumptionClientId":"21cec14a-xxxxxxxxxx30aecc50","azureAsyncConsumptionClientSecret":"x5LxxxxxxxxxxxxxxdR", "subscriptionIdsOptionalFilter":"62bd8ed9-dc33-4f56-8158-093c99fc8641,2b9ba95d-d7ec-4070-a4e1-93a4a31fd936,de50a670-dd24-4abd-afa8-e0bb87e589a3,c8a1a4a8-7648-450e-8a3a-dec932a5f082"}" \

  --forceOverrideExisting \
  --polling-do-not-immediately-poll-costs-for-created-or-updated-platforms


Remark:

Credentials and permissions required for the Billing Data connection

You need to create an "Azure Application" (that you will most likely called something like "saas.finops.teevity.azureapp"

Permissions required for the Billing Data and Metrics connection

The "Azure Application" created previously should be provided with the following Roles (ie group of permissions):


Here is how it looks in the Azure UI console