Skip to content

Commit

Permalink
TF and general documentation enhancements (#908)
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Nixon <[email protected]>
  • Loading branch information
sean-nixon and Sean Nixon authored Jul 27, 2024
1 parent ad510b3 commit 5a46c9e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 46 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ We recommend cid-cmd tool via [AWS CloudShell](https://console.aws.amazon.com/cl
---
| Dashboard documentation | Demo URL | Prerequisites URL |
| --- | --- | --- |
| [CUDOS Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#cudos-dashboard) | [demo](https://cid.workshops.aws.dev/demo?dashboard=cudos) | [link](https://aws.amazon.com/aws-cost-management/aws-cost-and-usage-reporting) |
| [Cost Intelligence Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#cost-intelligence-dashboard-(cid)) | [demo](https://cid.workshops.aws.dev/demo?dashboard=cost_intelligence_dashboard) | [link](https://aws.amazon.com/aws-cost-management/aws-cost-and-usage-reporting) |
| [CUDOS Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#cudos-dashboard) | [demo](https://cid.workshops.aws.dev/demo?dashboard=cudos) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
| [Cost Intelligence Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#cost-intelligence-dashboard-(cid)) | [demo](https://cid.workshops.aws.dev/demo?dashboard=cost_intelligence_dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
| [Trusted Advisor Organisation (TAO) Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/trusted-advisor) | [demo](https://cid.workshops.aws.dev/demo?dashboard=tao-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/trusted-advisor/prerequisites) |
| [Trends Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/additional/trends) | [demo](https://cid.workshops.aws.dev/demo?dashboard=trends-dashboard) | [link](https://aws.amazon.com/aws-cost-management/aws-cost-and-usage-reporting) |
| [KPI Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#kpi-dashboard) | [demo](https://cid.workshops.aws.dev/demo?dashboard=kpi) | [link](https://aws.amazon.com/aws-cost-management/aws-cost-and-usage-reporting) |
| [Trends Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/additional/trends) | [demo](https://cid.workshops.aws.dev/demo?dashboard=trends-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
| [KPI Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi#kpi-dashboard) | [demo](https://cid.workshops.aws.dev/demo?dashboard=kpi) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |
| [Compute Optimizer Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/compute-optimizer) | [demo](https://cid.workshops.aws.dev/demo?dashboard=compute-optimizer-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/compute-optimizer/prerequisites) |
| [Cost Anomaly Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/cost-anomaly) | [demo](https://cid.workshops.aws.dev/demo?dashboard=aws-cost-anomalies) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/advanced/cost-anomaly/prerequisites) |
| [Data Transfer Cost Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/additional/data-transfer) | [demo](https://cid.workshops.aws.dev/demo?dashboard=datatransfer-cost-analysis-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi) |
| [Data Transfer Cost Dashboard](https://catalog.workshops.aws/awscid/en-US/dashboards/additional/data-transfer) | [demo](https://cid.workshops.aws.dev/demo?dashboard=datatransfer-cost-analysis-dashboard) | [link](https://catalog.workshops.aws/awscid/en-US/dashboards/foundational/cudos-cid-kpi/deploy) (Steps 1 and 2) |

See more dashboards on the [workshop page](https://catalog.workshops.aws/awscid/en-US/dashboards).

Expand Down Expand Up @@ -143,12 +143,12 @@ This command generates a SQL file that you can execute. Please mind [Athena Serv
CID is also provided in a form of CloudFormation templates. See detailed instructions in the [Well Architected Labs](https://wellarchitectedlabs.com/cost/200_labs/200_cloud_intelligence/cost-usage-report-dashboards/dashboards/deploy_dashboards/) site.
## Terraform
CID offers a set of Terraform modules to deploy CUR replication and CID dashboards. These modules act as a wrapper around CloudFormation.
CID offers a set of Terraform modules to deploy CUR replication and CID dashboards. Refer to these [deployment instructions](terraform-modules/README.md) for details of
how to deploy CID dashboards with these modules.
1. Create a bucket for consolidating CUR [terraform-modules/cur-setup-destination/](terraform-modules/cur-setup-destination/)
2. Create a CUR in Payer Account(s) [terraform-modules/cur-setup-source/](terraform-modules/cur-setup-source/)
3. Create Dashboards [terraform-modules/cid-dashboards/](terraform-modules/cid-dashboards/)
3. Create Dashboards (wrapper around CloudFormation) [terraform-modules/cid-dashboards/](terraform-modules/cid-dashboards/)
## Rights Management
The ownership of CID is usually with the FinOps team, who do not have administrative access. However, they require specific privileges to install and operate CID dashboards. To assist the Admin team in granting the necessary privileges to the CID owners, a CFN template is provided. This template, located at [CFN template](cfn-templates/cid-admin-policies.yaml), takes an IAM role name as a parameter and adds the required policies to the role.
Expand Down
2 changes: 1 addition & 1 deletion terraform-modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module "cur_payer" {

After enabling CUR with Terraform as describe above, a few steps are necessary
to prepare for dashboard deployment:
1. Complete prerequisites in [Before You Start](../README.md#before-you-start) including Quicksight setup
1. Complete prerequisites for each dashboard you are deploying and the Quicksight setup as described in [Before You Start](../README.md#before-you-start). There is no need to complete the Athena workgroup setup unless you are using a custom workgroup. A workgroup and query destination setup will be created for you automatically.
2. Create an S3 bucket to upload the CloudFormation template

### Step 3: Dashboard Setup
Expand Down
4 changes: 4 additions & 0 deletions terraform-modules/cur-setup-destination/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ accounts, the module can create a new Cost and Usage Report local to the aggrega

## Example Usage

> [!Note]
> For complete usage documentation of using this module together with the cur-setup-source
module, refer to the main Terraform [Deployment Instructions](../README.md#deployment-instructions).

```hcl
provider "aws" {
region = "us-west-2"
Expand Down
46 changes: 9 additions & 37 deletions terraform-modules/cur-setup-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,29 @@ one instance of this module for each payer account.

## Example Usage

```hcl
provider "aws" {
profile = "src"
region = "us-west-2"
alias = "src"
}
provider "aws" {
profile = "src"
region = "us-east-1"
alias = "src_useast1"
}
> [!Note]
> For complete usage documentation of using this module together with the cur-setup-destination
module, refer to the main Terraform [Deployment Instructions](../README.md#deployment-instructions).

```hcl
provider "aws" {
profile = "dst"
region = "us-west-2"
alias = "dst"
region = "us-west-2"
}
provider "aws" {
profile = "dst"
region = "us-east-1"
alias = "dst_useast1"
}
# Configure exactly one destination account
module "cur_destination" {
source = "github.com/aws-samples/aws-cudos-framework-deployment//terraform-modules/cur-setup-destination"
source_account_ids = ["1234567890"]
create_cur = false # Set to true to create an additional CUR in the aggregation account
# Provider alias for us-east-1 must be passed explicitly (required for CUR setup)
# Optionally, you may pass the default aws provider explicitly as well
providers = {
aws = aws.dst
aws.useast1 = aws.dst_useast1
}
region = "us-east-1"
alias = "useast1"
}
# Configure one or more source (payer) accounts
module "cur_source" {
source = "github.com/aws-samples/aws-cudos-framework-deployment//terraform-modules/cur-setup-source"
destination_bucket_arn = module.cur_destination.cur_bucket_arn
destination_bucket_arn = "UPDATEME"
# Provider alias for us-east-1 must be passed explicitly (required for CUR setup)
# Optionally, you may pass the default aws provider explicitly as well
providers = {
aws = aws.src
aws.useast1 = aws.src_useast1
aws.useast1 = aws.useast1
}
}
```
Expand Down

0 comments on commit 5a46c9e

Please sign in to comment.