# Promote CfnTemplate changes through pipeline stages to update CfnDashboards (CDK)

**URL:** <https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858>\
**Category:** Q&A\
**Tags:** feature-request, filters, error, sharing, quick-sight\
**Created:** [July 21, 2022, 4:02pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858 "2022-07-21T16:02:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gunar](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@Gunar](https://community.amazonquick.com/u/Gunar)\
**Post date:** [July 21, 2022, 4:02pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/1 "2022-07-21T16:02:24Z")

</div>

Hi all,  
Quick Sight does not support creating an CfnAnalysis purely with CDK. So I’ve taken the approach to create an Analysis and Template manually in the alpha stage of my pipeline which then gets used as sourceEntity for the beta stage and prod stage to automatically create a Dashboard on each stage.

However, if I update the template in the alpha stage and trigger the pipeline to use the new template, it does not detect that it needs to update the resources on the beta and prod stage.  
On the other hand, if I append the version number to the dashboards name and id, it correctly recreates the dashboard. However, it requires re-sharing the dashboard to everyone and changing the URL they use to access it which is undesirable.

How can I trigger the Dashboard to reload the template using CDK?  
When are we getting proper CDK support to create analyses and dashboards without manual steps, i.e. defining the visuals with a json format?

---

<div class="post-metadata">

**Author:** ![Naveen\_gadamsetty](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@Naveen\_gadamsetty](https://community.amazonquick.com/u/Naveen_gadamsetty)\
**Post date:** [August 2, 2022, 4:28pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/2 "2022-08-02T16:28:26Z")

</div>

Hi Gunar, Wondering if you were able to solve the problem.

---

<div class="post-metadata">

**Author:** ![Gunar](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@Gunar](https://community.amazonquick.com/u/Gunar)\
**Post date:** [August 2, 2022, 4:48pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/3 "2022-08-02T16:48:21Z")

</div>

I’ve managed to workaround it by adding the version number to the template and analysis ids on every stage to force the update and keeping the dashboard id the same. Still requires manual steps and has multiple problems until proper support for CDK is added:

> <https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/274>
>
> \## 1. Title 
> AWS::QuickSight::\*
> 
> \## 2. Scope of request 
> There'se no QuickSi…ght resources available, although the scope of the API has recently been extended.
> 
> \## 3. Expected behavior
> Create DataSets, Analysis, Dashboards and Reportings via CloudFormation.
> 
> \## 5. Helpful Links to speed up research and evaluation
> https://docs.aws.amazon.com/quicksight/latest/APIReference/API\_Operations.html
> 
> \## 6. Category (required)
> 7. Analytics (Athena, EMR, Glue,...)

---

<div class="post-metadata">

**Author:** ![Naveen\_gadamsetty](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@Naveen\_gadamsetty](https://community.amazonquick.com/u/Naveen_gadamsetty)\
**Post date:** [September 28, 2022, 2:32pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/4 "2022-09-28T14:32:13Z")

</div>

Thanks Gunar for sharing the hack.

---

<div class="post-metadata">

**Author:** ![Srikanth\_Baheti](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/srikanth_baheti/32/3324_2.png) [@Srikanth\_Baheti](https://community.amazonquick.com/u/Srikanth_Baheti)\
**Post date:** [October 5, 2022, 7:42pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/5 "2022-10-05T19:42:01Z")

</div>

> [@Gunar](#):
>
> I’ve managed to workaround it by adding the version number to the template and analysis ids on every stage to force the update and keeping the dashboard id the same. Still requires manual steps and has multiple problems until proper support for CDK is added:

Hi All,

The recommended approach is to have proper versioning configured on the template and then subsequently using the appropriate version for either creation or update of a dashboard. Once the dashboard is updated, you do not need to re-share the dashboard. All you can do is go ahead and update the published version of the dashboard using API update-dashboard-published-version details can be found [here](https://docs.aws.amazon.com/cli/latest/reference/quicksight/update-dashboard-published-version.html). For more information and clarity on the deployment process, please look at our devops site: [Dev Ops Quick Sight](https://devops.learnquicksight.online/porting-content.html)

We have shared the usecases for the analysis and dashboard creation to our Product teams. Thank you for the feedback.

---

<div class="post-metadata">

**Author:** ![Gunar](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@Gunar](https://community.amazonquick.com/u/Gunar)\
**Post date:** [October 6, 2022, 8:57am UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/6 "2022-10-06T08:57:35Z")

</div>

This is not helpful as the topic is specifically about CDK. Unfortunately there is still no proper support to define the templates with CDK, so my workaround is the best one if we don’t want to have to write scripts to update the dashboards on every pipeline stage

---

<div class="post-metadata">

**Author:** ![Ashok](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/ashok/32/3419_2.png) [@Ashok](https://community.amazonquick.com/u/Ashok)\
**Post date:** [October 11, 2022, 9:28pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/7 "2022-10-11T21:28:51Z")

</div>

@Gunar

Are you good with workaround you have ?  
If not, I can message you privately to discuss possible solutions

---

<div class="post-metadata">

**Author:** ![spaluri](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/spaluri/32/4286_2.png) [@spaluri](https://community.amazonquick.com/u/spaluri)\
**Post date:** [November 15, 2022, 8:23pm UTC](https://community.amazonquick.com/t/promote-cfntemplate-changes-through-pipeline-stages-to-update-cfndashboards-cdk/4858/8 "2022-11-15T20:23:12Z")

</div>


