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

docs: update example apps to use policy templates and parameters #554

Merged
merged 6 commits into from
Sep 4, 2018
Merged

docs: update example apps to use policy templates and parameters #554

merged 6 commits into from
Sep 4, 2018

Conversation

brettstack
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jlhood
Copy link
Contributor

jlhood commented Aug 28, 2018

Could you add a testing section to your PR description? Just wondering if you actually tried to deploy these updates.

Copy link
Contributor

@keetonian keetonian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using policy statements makes everything look much better, this is great! Next update that is needed is to add !Ref commands to properly reference template parameters.

Copy link
Contributor

@keetonian keetonian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you verify that the apps still work after updating the node.js version? Or will that be a separate task?

@brettstack
Copy link
Contributor Author

@jlhood @keetonian I'm going to test several of these, but will rely on end-to-end testing when it comes time to redeploy these to the app repo.

Copy link
Contributor

@jlhood jlhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I really appreciate the readability improvements of the policy templates! Some blockers though:

  1. Need to remove all Name Metadata fields (remove entire Metadata section if Name is the only field in it)
  2. Looks like there's a script that shouldn't be part of this PR.

@@ -1,6 +1,11 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: 'Blueprint for CloudFront ab testing, implemented in NodeJS.'
Metadata:
Name: cloudfrontabtest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this metadata. It'll actually cause publish to fail because the published name (cloudfront-ab-test) does not match this field. Should just remove the metadata completely.

const bluePrintAppDirectories = readdirSync(bluePrintsDirectory)
const ignore = ['.DS_Store', 'mass-pub']
const appIgnore = ['node_modules']
bluePrintAppDirectories.forEach(blueprintAppDirectoryName => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script doesn't seem like it belongs in this PR. Remove?

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

Successfully merging this pull request may close these issues.

None yet

4 participants