-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add docs for cross account role
Add page with instructions on how to setup a cross account role to support rightsizing.
- Loading branch information
1 parent
f9b5769
commit be253b5
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
slug: cross_account_role | ||
title: Cross account role | ||
--- | ||
|
||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
||
Infracost supports gathering right sizing recommendations for resources in your AWS account by assuming a cross account role. This is allows us to access your AWS resources and provide you with recommendations in your code based on Trusted Advisor and Compute Optimizer data. | ||
|
||
:::info | ||
This feature is currently early stage, please email [[email protected]](mailto:[email protected]) for more information. | ||
::: | ||
|
||
For more information about cross account roles, please see the [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html) | ||
|
||
## Setup of the cross account role | ||
|
||
We have provided a Terraform module to help you set up the cross account role. You can find the module [here](https://github.com/infracost/cross-account-link) | ||
|
||
### Prerequisites | ||
|
||
- You have an AWS account | ||
- You need your Infracost Cloud organization ID - find this in the settings of the [Infracost Dashboard](https://dashboard.infracost.io) | ||
|
||
### Steps | ||
|
||
1. Use the module to create the cross account role in your AWS account | ||
|
||
```hcl | ||
provider "aws" { | ||
region = "us-west-2" | ||
} | ||
module "infracost" { | ||
source = "github.com/infracost/cross-account-link?ref=0.1.0" | ||
infracost_external_id = "INFRACOST_ORGANIZATION_ID" | ||
providers = { | ||
aws = aws | ||
} | ||
} | ||
output "infracost_cross_account_role_arn" { | ||
value = module.infracost.role_arn | ||
} | ||
``` | ||
|
||
2. Run `terraform init` and `terraform apply` to create the cross account role | ||
3. Share the `infracost_cross_account_role_arn` output with the Infracost team by email email [[email protected]](mailto:[email protected]) |