--- title: "Configure advanced Terraform scenarios" slug: "configure-advanced-terraform-scenarios" updated: 2026-11-05T09:45:55Z published: 2026-11-05T09:45:55Z canonical: "docs.zesty.co/configure-advanced-terraform-scenarios" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zesty.co/llms.txt > Use this file to discover all available pages before exploring further. # Configure advanced Terraform scenarios Configure deployments that combine multiple Zesty products or AWS accounts. ### Onboard Commitment Manager in a Management account and Compute Optimization in a Linked account This is a common multi-account configuration. Use one module block and one AWS provider alias for each AWS account: ```plaintext provider "aws" {  alias  = "management"  region = "us-east-1" } provider "aws" {  alias  = "linked"  region = "us-west-2" } provider "zesty" {} module "management_account" {  source  = "zesty-co/zesty-account/aws"  version = "~> 0.1.1"  providers = {    aws = aws.management  }  account_type = "management"  cm           = {} } module "linked_account" {  source  = "zesty-co/zesty-account/aws"  version = "~> 0.1.1"  providers = {    aws = aws.linked  }  account_type = "linked"  kompass      = {} } ``` Install Compute Optimization in linked-account EKS clusters using: `module.linked_account.kompass_values_yaml` See the [complete management-and-linked example](https://github.com/zesty-co/terraform-aws-zesty-account/tree/main/examples/cm-management-kompass-linked-cluster). ### Enable Commitment Manager and Compute Optimization in the same management account Use one module block when both products use the same AWS account: ```plaintext module "zesty_account" {  source  = "zesty-co/zesty-account/aws"  version = "~> 0.1.1"  account_type = "management"  cm      = {}  kompass = {} } ``` The module creates: - One IAM role - One merged IAM policy - One CUR - One set of Athena and Glue resources - One Zesty account registration