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

Change layout of Additional AWS Resources #994

Closed
efekarakus opened this issue Jun 4, 2020 · 2 comments · Fixed by #1020
Closed

Change layout of Additional AWS Resources #994

efekarakus opened this issue Jun 4, 2020 · 2 comments · Fixed by #1020
Labels
area/addon Issues about addons. type/breaking-change Issues that introduce a backwards incompatible change type/enhancement Issues that are improvements for existing features.

Comments

@efekarakus
Copy link
Contributor

As outlined in issue #915, addons templates currently don’t support Conditions.

For completeness, users can’t write Description, Metadata, Mappings, Conditions, and Transform sections into their addons template.
The only supported sections are Parameters, Resources, and Outputs.

Proposal

We propose changing the addons/ directory structure to be one CFN template per addon.
For example, if a user wants to add a DDB table and an S3 bucket addon, the file structure will be:

my-svc/
  manifest.yaml
  addons/
    mytable-ddb.yaml
    mybucket-s3.yaml

Where mytable-ddb.yaml and mybucket-s3.yaml can be full CloudFormation templates.
Behind the scenes, we will merge these two templates into one.

This should allow customers to add all the missing sections, and make it easier to write a new addon on their own.

@efekarakus efekarakus added type/enhancement Issues that are improvements for existing features. area/addon Issues about addons. type/breaking-change Issues that introduce a backwards incompatible change labels Jun 4, 2020
@FarmaanElahi
Copy link

@efekarakus Is there any specific reason we are spitting this into multiple file ?

@efekarakus
Copy link
Contributor Author

@FarmaanElahi They can all be in a single file :) Sorry, that wasn't clear enough from the description.

We're working on adding a new command storage init (#990 (comment)) that will generate CF templates under "addons/" for you. These addon commands will create a separate file each time it's run, so that we don't mess with your existing templates. Afterwards, you can move the contents to a single file if you'd like or split them up it won't matter.

@efekarakus efekarakus added this to Backlog in Sprint 🏃‍♀️ Jun 5, 2020
mergify bot pushed a commit that referenced this issue Jun 8, 2020
Merges the ["Metadata"](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html) section of two cfn templates under "addons/".

Related to #994 

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
mergify bot pushed a commit that referenced this issue Jun 9, 2020
We already merge the "Metadata" section, this PR adds the functionality to merge the "Parameters" section of two templates.

Related to #994 

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
mergify bot pushed a commit that referenced this issue Jun 10, 2020
Enables merging the Mappings section of cfn templates under the "addons/" directory.

Related #994

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
mergify bot pushed a commit that referenced this issue Jun 11, 2020
Merges the `Conditions` section of two templates.

Follows the same logic as `Parameters` and `Metadata`.
Related to #994 

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
@mergify mergify bot closed this as completed in #1020 Jun 12, 2020
Sprint 🏃‍♀️ automation moved this from Backlog to Pending release Jun 12, 2020
mergify bot pushed a commit that referenced this issue Jun 12, 2020
Templates under the "addons/" directory can now be complete CFN templates that gets merged into a nested stack.

Resolves #994, #915 

BREAKING CHANGE

_By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addon Issues about addons. type/breaking-change Issues that introduce a backwards incompatible change type/enhancement Issues that are improvements for existing features.
Projects
Sprint 🏃‍♀️
  
Pending release
Development

Successfully merging a pull request may close this issue.

2 participants