Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 2.07 KB

File metadata and controls

40 lines (32 loc) · 2.07 KB

3. Create a table and inspect variables section

back

Storing settings for Azure Automation (AA) e.g. account information, locale settings,... AA credentials and AA variables can be used. In our myAzureCost sample we use:

  • AA Credentials to store the sendgrid's account settings:
  • AA Variables to hold settings needed for the AA Runbooks that do the usage & cost calculation
  • one Azure table to store processed data e.g. daily cost history.

1. Inspect the variables

[Azure Portal] -> Resource Groups -> "rg-AzureCost" -> 'aaazurecost...' (Your Automation Account) -> Variables
Variable Name Description
myAzureCostAzureSubscriptionId GUID of your subscription to calculate the usage for
myAzureCostCultureInfo e.g. de-DE for reports (CSVs) to come with numbers, date formatted for Germans
myAzureCostPriceSheetURI a URI pointing to a CSV with pricing information about azure resources - we'll take care of this soon
myAzureCostSAContainer where your daily reports are stored - pls don't change
myAzureCostSATable table name to hold your daily usage costs for 'history view'
myAzureCostSmtpRecipient email recipient of the report
myAzureCostStorageAccountName where your daily reports are stored

2. Create the azure table to hold your daily usage costs for 'history view'

There is a AA Runbook that will create an azure table for us - we only need to start it:

[Azure Portal] -> Resource Groups -> "rg-AzureCost" -> 'aaazurecost...' (Your Automation Account) -> "Process Automation" Runbooks -> RunBk_CreateTable -> Start

Trigger Runbook Create Table

This runbook will execute PowerShell code that creates an Azure table using the AA Runas Account. Once finished you should have a table in:

[Azure Portal] -> Resource Groups -> "rg-AzureCost" -> 'azconsumption...' (Your Storage Account) -> Tables

History costs table created

next