Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudwatch: support dashboard variables #26200

Closed
2 tasks
humanzz opened this issue Jul 3, 2023 · 3 comments · Fixed by #26285
Closed
2 tasks

cloudwatch: support dashboard variables #26200

humanzz opened this issue Jul 3, 2023 · 3 comments · Fixed by #26285
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@humanzz
Copy link
Contributor

humanzz commented Jul 3, 2023

Describe the feature

CloudWatch recently released the new dashboard variables feature which allows parameterizing dashboards with variables to reduce repetition/duplication of dashboards

Use Case

This feature would enable retiring near identical/duplicate dashboards which only differ in some parameters and enable consolidating them into one single parameterized dashboard

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.84.0

Environment details (OS name and version, etc.)

macOS

@humanzz humanzz added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 3, 2023
@github-actions github-actions bot added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Jul 3, 2023
@pahud
Copy link
Contributor

pahud commented Jul 3, 2023

It is unclear to me how it would be created or referenced in cloudformation. Any insight would be welcome and appreciated.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jul 3, 2023
@Stacy-D
Copy link
Contributor

Stacy-D commented Jul 3, 2023

@pahud, The dashboard variables when created are part of the json which corresponds to the dashboard body. To get the dashboard variables deployed via cloudformation or via CDK, the dashboard body should follow the following format:

{
widgets: [....]
variables: [....] <- new addition to the dashboard json which allow to define the variables. Each variable here is the variable json
}

The proposal for this new feature will be as follows: add new addVariable(variable: IVariable) method to the cloudwatch.Dashboard which would accept the variables of different types following the common IVariable interface. For the types of the IVariable the following will be available: property and pattern based variables.

I intent to make a PR to address this feature request and it will be more clear from it on how these variable work.

@mergify mergify bot closed this as completed in #26285 Jul 11, 2023
mergify bot pushed a commit that referenced this issue Jul 11, 2023
This change add the support for dashboard variables in CDK https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_dashboard_variables.html. It allows to reduce the number of repeated  CloudWatch dashboards by unifying them into one managed with variables.


Closes #26200

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

bmoffatt pushed a commit to bmoffatt/aws-cdk that referenced this issue Jul 29, 2023
This change add the support for dashboard variables in CDK https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_dashboard_variables.html. It allows to reduce the number of repeated  CloudWatch dashboards by unifying them into one managed with variables.


Closes aws#26200

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants