Cost and Usage Report (CUR) setup for Stacklet customers
This repository provides automation for setting up a CUR in your organizational account in such a way that the Stacklet platform, running in a different account, can access and use the CUR data.
More background information, along with instructions for accomplishing the same thing via the AWS console, can be found in the Stacklet documentation.
The terraform in this repository is meant to be applied in each subscription, independent of any account in which the Stacklet platform is running, and must be applied by a user or service principal that has permissions to create Cost Management exports, storage accounts, and resource groups. Stacklet utilizes credentials provided in Stacklet to read from the created Storage Account.
It does the following:
- Creates a Resource Group to contain all created resources
- Creates a Storage Account to store cost management exports
- Creates a Cost Management export job to push data into the Storage Account
This setup ensures that the Cost Management export is in the format required by Stacklet.
No requirements.
Name | Version |
---|---|
azurerm | n/a |
random | n/a |
No modules.
Name | Type |
---|---|
azurerm_resource_group.current | resource |
azurerm_storage_account.cost | resource |
azurerm_storage_container.cost | resource |
azurerm_subscription_cost_management_export.cost | resource |
random_string.storage_account_suffix | resource |
azurerm_subscription.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
customer_prefix | Stacklet provided customer prefix | string |
n/a | yes |
resource_group_location | Resource group deployment location | string |
n/a | yes |
Name | Description |
---|---|
output | n/a |