Skip to content

stacklet/terraform-azure-stacklet-cost-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-azure-stacklet-cost-setup

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.

Azure

Overview

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.

Requirements

No requirements.

Providers

Name Version
azurerm n/a
random n/a

Modules

No modules.

Resources

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

Inputs

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

Outputs

Name Description
output n/a

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages