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

Add YAML environment file support #740

Merged
merged 16 commits into from
Feb 17, 2020
Merged

Conversation

mromaszewicz
Copy link
Contributor

Environment files ending in .yaml or .yml will be rendered using
a different strategy. The env file is treated as a dict, with
the value for each key being a parsed YAML object. After parsing
the config, we look for things that look like variable references,
and replace the references with objects.

marcinromaszewicz and others added 15 commits July 24, 2019 11:51
Environment files ending in .yaml or .yml will be rendered using
a different strategy. The env file is treated as a dict, with
the value for each key being a parsed YAML object. After parsing
the config, we look for things that look like variable references,
and replace the references with objects.
Now with the correct version of flake8
Moto is requiring policy documents to be at least version
2012-10-17, so add that property.
Python 2.7 strings and Python 3 strings work differently, and
regular expression matching is different too. Rewrite in a way
which works with both language versions.
Moto is requiring policy documents to be at least version
2012-10-17, so add that property.
When checking for yaml suffixes on environment files, ignore
case.
Environment files ending in .yaml or .yml will be rendered using
a different strategy. The env file is treated as a dict, with
the value for each key being a parsed YAML object. After parsing
the config, we look for things that look like variable references,
and replace the references with objects.
Now with the correct version of flake8
Python 2.7 strings and Python 3 strings work differently, and
regular expression matching is different too. Rewrite in a way
which works with both language versions.
When checking for yaml suffixes on environment files, ignore
case.
@sd0408
Copy link

sd0408 commented Aug 14, 2019

When this is merged will we be able to define list object and lists of objects in these yaml files for parsing later on?

We've defined a stack which expects a list of ingress CIDR's allowed access to
each port. Our environment files would look like this::

# in the file: stage.env
Copy link

Choose a reason for hiding this comment

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

shouldn't this doc state stage.yml and not stage.env?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup, will update shortly!

Copy link

@sd0408 sd0408 left a comment

Choose a reason for hiding this comment

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

Just a small documentation issue.

Yaml config example should use .yml file suffix, not .env
@deepmap-marcinr
Copy link
Contributor

So, guys, what's the verdict on this PR?

@mromaszewicz
Copy link
Contributor Author

Any thoughts on merging this?

Copy link
Member

@phobologic phobologic left a comment

Choose a reason for hiding this comment

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

This is great, thanks @mromaszewicz - and sorry for the delay.

@phobologic phobologic merged commit 471cc28 into cloudtools:master Feb 17, 2020
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.

4 participants