Skip to content

Commit b718651

Browse files
committed
Merge branch 'main' of github.com:aws-samples/aws-cudos-framework-deployment
2 parents a34e52e + 1092431 commit b718651

File tree

4 files changed

+79
-6
lines changed

4 files changed

+79
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Cloud Intelligence Dashboards Framework provides AWS customers with [more then 2
2626
* Advanced Dashboards - Require CID Data Collection and CUR
2727
* Additional Dashboards - Require various custom datasources or created for very specific use cases.
2828

29-
We recommend starting with deployment of [Foundational Dashboards](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/dashboard-foundational.html). Then deploy [Data Collection](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/data-collection.html) and [Advanced Dashboards](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/dashboards.html#advanced-dashboards). Check for [Additional](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/dashboards.html#additional-dashboards) Dashboards.
29+
We recommend starting with deployment of [Foundational Dashboards](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/dashboard-foundational.html). Then deploy [Data Collection](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/data-collection.html) and [Advanced Dashboards](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/dashboards.html#advanced-dashboards). Check for [Additional](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/dashboards.html#additional) Dashboards.
3030

3131

3232
[![Documentation >](assets/images/documentation.svg)](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/deployment-in-global-regions.html)
@@ -156,4 +156,4 @@ See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more inform
156156
This library is licensed under the MIT-0 License. See the [LICENSE](LICENSE) file.
157157

158158
## Notices
159-
Dashboards and their content: (a) are for informational purposes only, (b) represents current AWS product offerings and practices, which are subject to change without notice, and (c) does not create any commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS content, products or services are provided “as is” without warranties, representations, or conditions of any kind, whether express or implied. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.
159+
Dashboards and their content: (a) are for informational purposes only, (b) represents current AWS product offerings and practices, which are subject to change without notice, and (c) does not create any commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS content, products or services are provided “as is” without warranties, representations, or conditions of any kind, whether express or implied. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

dashboards/cudos/CUDOS-v5-definition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61269,7 +61269,7 @@ Sheets:
6126961269
\ in same AZ</u>\n </a>\n </inline>\n <inline font-size=\"\
6127061270
19.2px\">.</inline>\n </li>\n <li>\n <inline font-size=\"19.2px\"\
6127161271
>Save up to 30% with\_</inline>\n <inline background-color=\"PrimaryBackground\"\
61272-
\ color=\"#61d1d6\" font-size=\"19.2px\">\n <a href=\"https://aws.amazon.com/about-aws/whats-new/2021/02/introducing-amazon-cloudfront-security-savings-bundle/\"\
61272+
\ color=\"#61d1d6\" font-size=\"19.2px\">\n <a href=\"https://aws.amazon.com/cloudfront/faqs/#topic-21\"\
6127361273
\ target=\"_blank\">\n <u>Amazon CloudFront Security Savings\
6127461274
\ Bundle</u>\n </a>\n </inline>\n <inline font-size=\"\
6127561275
19.2px\">.</inline>\n </li>\n </ul>\n <br/>\n <br/>\n <inline font-size=\"\

terraform/cicd-deployment/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,76 @@ This is the recommended approach for testing and development environments when y
315315
316316
</details>
317317
318+
<details>
319+
<summary><b>How do I deploy resources manually to specific accounts?</b></summary>
320+
321+
For users who need granular control over deployment or want to deploy resources manually to specific accounts, you can split the Terraform module into individual components:
322+
323+
### Manual Deployment Steps:
324+
325+
1. **Split the main.tf file** into separate files for each stack:
326+
```
327+
data-exports-destination.tf # For Data Collection account
328+
data-exports-source.tf # For Payer account
329+
dashboards.tf # For Data Collection account
330+
```
331+
332+
2. **Create separate variable files** for each component:
333+
```
334+
variables-destination.tf
335+
variables-source.tf
336+
variables-dashboards.tf
337+
```
338+
339+
3. **Split outputs.tf** into component-specific output files:
340+
```
341+
outputs-destination.tf
342+
outputs-source.tf
343+
outputs-dashboards.tf
344+
```
345+
346+
4. **Configure separate provider configurations** for each account:
347+
```hcl
348+
# For Payer account deployment
349+
provider "aws" {
350+
region = "us-east-1"
351+
# Payer account credentials
352+
}
353+
354+
# For Data Collection account deployment
355+
provider "aws" {
356+
region = "us-east-1"
357+
# Data Collection account credentials
358+
}
359+
```
360+
361+
5. **Deploy in sequence**:
362+
```bash
363+
# Step 1: Deploy Data Exports Destination (Data Collection account)
364+
terraform init
365+
terraform apply -target=aws_cloudformation_stack.cid_dataexports_destination
366+
367+
# Step 2: Deploy Data Exports Source (Payer account)
368+
# Switch to Payer account credentials
369+
terraform apply -target=aws_cloudformation_stack.cid_dataexports_source
370+
371+
# Step 3: Deploy Dashboards (Data Collection account)
372+
# Switch back to Data Collection account credentials
373+
terraform apply -target=aws_cloudformation_stack.cloud_intelligence_dashboards
374+
```
375+
376+
### Important Considerations:
377+
378+
- **Dependencies**: Ensure proper dependency order (Destination → Source → Dashboards)
379+
- **Cross-account references**: You'll need to manually manage cross-account resource references
380+
- **State management**: Consider using separate state files for each account
381+
- **Credentials**: Manually switch AWS credentials/profiles between deployments
382+
- **Complexity**: This approach requires advanced Terraform knowledge and careful coordination
383+
384+
**Note**: Manual deployment is significantly more complex than the automated cross-account approach provided by this module. We recommend using the standard module unless you have specific requirements that necessitate manual control.
385+
386+
</details>
387+
318388
## Additional Resources
319389
320390
* [AWS Cloud Intelligence Dashboards Documentation](https://docs.aws.amazon.com/guidance/latest/cloud-intelligence-dashboards/)

terraform/cicd-deployment/providers.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ provider "aws" {
1010
alias = "destination_account"
1111
region = var.global_values.aws_region
1212

13-
assume_role {
14-
role_arn = local.destination_role_arn
13+
dynamic "assume_role" {
14+
for_each = local.destination_role_arn != null ? [1] : []
15+
content {
16+
role_arn = local.destination_role_arn
17+
}
1518
}
1619

1720
default_tags {
@@ -23,7 +26,7 @@ terraform {
2326
required_providers {
2427
aws = {
2528
source = "hashicorp/aws"
26-
version = "~> 4.0"
29+
version = "~> 5.0"
2730
}
2831
}
2932
required_version = ">= 1.0.0"

0 commit comments

Comments
 (0)