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

cdk.Include : Not updating the external template changes. #1189

Closed
Black742 opened this issue Nov 16, 2018 · 5 comments
Closed

cdk.Include : Not updating the external template changes. #1189

Black742 opened this issue Nov 16, 2018 · 5 comments

Comments

@Black742
Copy link

Black742 commented Nov 16, 2018

cdk.Include constructor doesn't incorporating the changes in the external template to the CDK app.

Steps to replicate:

  1. Create a test.yaml file with some sample resource.
     const SPEC_FILE_LOCATION = "test.yaml";
    let template: any =yaml.safeLoad(fs.readFileSync(path.join(__dirname, SPEC_FILE_LOCATION), 'utf8'));
    
    new cdk.Include(this, 'IncludeConfigTemplate', { template });
    
    
  2. Deploy the app.
  3. Update the text.yaml file with the below output code.
Outputs:
  TestOutput:
    Description: 'test'
    Value: 'test'
    Export:
      Name: 'testcdkupdate'
  1. Build and run the deploy command. The stacks not getting updated and outputs the below msg.
    Stack was already up-to-date, it has ARN arn:aws:cloudformation:ap-southeast-2:***********:stack/HelloCdkStack/3ff234e0-e930-11e8-b0c7-027753bcaabc

Note: While running cdk diff, the changes are showing the as difference.

$ cdk diff
[+] Added TestOutput: {"Description":"test","Value":"test","Export":{"Name":"testcdkupdate"}}

Version used is 0.14.0

@Black742
Copy link
Author

Black742 commented Nov 16, 2018

Additional to the description, have tried to use the cdk.output constructor to update the template. However, the template is not getting updated.

new cdk.Output(this, "test", {
      description: 'test',
      value: "test"
  });

Have a stack already and trying to make update on the stack. However the stack is not getting updated. Could you please help me on this?

@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 16, 2018

It's a known issue that just adding a cdk.Output will not cause a deployment to execute. This is CloudFormation behavior that we haven't adapted for yet. There should be a couple of open issues on this already, for example #778 #186

@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 16, 2018

If you add a resource to your stack (a typical example is a WaitConditionHandle) your stack will deploy.

@rix0rrr rix0rrr added closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Nov 19, 2018
@Black742
Copy link
Author

Thanks for the response. Have added additional resource and the stack getting updated.

@NGL321 NGL321 removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Sep 4, 2019
@NGL321
Copy link
Contributor

NGL321 commented Sep 4, 2019

Is stale and resolved. Closing now

😸

@NGL321 NGL321 closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants