Skip to content

Commit

Permalink
fix: fixing support for subsets (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Apr 7, 2022
1 parent 515340f commit 3a13f8d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
13 changes: 6 additions & 7 deletions docs/source/puppet/splitting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,18 @@ Running the pipeline for a subset of operations

.. note::

This was added in version 0.101.0
This was added in version 0.101.0 and the syntax changed in 0.165.0 but backwards compatability is maintained

You can use the following attribute:

.. code:: yaml
subset:
name: "remove-default-vpc-function"
section: "launches"
include_dependencies: true
include_reverse_dependencies: true
item: "remove-default-vpc-function"
section: "launches"
include_dependencies: true
include_reverse_dependencies: true
name and section correspond to which operation you want to run in your pipeline. Here we are saying run the launch
item and section correspond to which operation you want to run in your pipeline. Here we are saying run the launch
named remove-default-vpc-function.

include_dependencies is optional and defaults to false. When set to false it does nothing. When set to true if will
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[tool.poetry]
name = "aws-service-catalog-puppet"
version = "0.164.0"
version = "0.165.0"
description = "Making it easier to deploy ServiceCatalog products"
classifiers = ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Natural Language :: English"]
homepage = "https://service-catalog-tools-workshop.com/"
Expand Down
8 changes: 8 additions & 0 deletions servicecatalog_puppet/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,14 @@ def expand(f, single_account, parameter_override_file, parameter_override_forced
params = dict(single_account=single_account)
if parameter_override_forced or misc_commands.is_a_parameter_override_execution():
overrides = dict(**yaml.safe_load(parameter_override_file.read()))
if overrides.get("subset"):
subset = overrides.get("subset")
overrides = dict(
section=subset.get("section"),
item=subset.get("name"),
include_dependencies=subset.get("include_dependencies"),
include_reverse_dependencies=subset.get("include_reverse_dependencies"),
)
params.update(
dict(single_account=overrides.get("single_account"), subset=overrides,)
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

setup_kwargs = {
'name': 'aws-service-catalog-puppet',
'version': '0.164.0',
'version': '0.165.0',
'description': 'Making it easier to deploy ServiceCatalog products',
'long_description': '# aws-service-catalog-puppet\n\n![logo](./docs/logo.png) \n\n## Badges\n\n[![codecov](https://codecov.io/gh/awslabs/aws-service-catalog-puppet/branch/master/graph/badge.svg?token=e8M7mdsmy0)](https://codecov.io/gh/awslabs/aws-service-catalog-puppet)\n\n\n## What is it?\nThis is a python3 framework that makes it easier to share multi region AWS Service Catalog portfolios and makes it \npossible to provision products into accounts declaratively using a metadata based rules engine.\n\nWith this framework you define your accounts in a YAML file. You give each account a set of tags, a default region and \na set of enabled regions.\n\nOnce you have done this you can define portfolios should be shared with each set of accounts using the tags and you \ncan specify which regions the shares occur in.\n\nIn addition to this, you can also define products that should be provisioned into accounts using the same tag based \napproach. The framework will assume role into the target account and provision the product on your behalf.\n\n\n## Getting started\n\nYou can read the [installation how to](https://service-catalog-tools-workshop.com/30-how-tos/10-installation/30-service-catalog-puppet.html)\nor you can read through the [every day use](https://service-catalog-tools-workshop.com/30-how-tos/50-every-day-use.html)\nguides.\n\nYou can read the [documentation](https://aws-service-catalog-puppet.readthedocs.io/en/latest/) to understand the inner \nworkings. \n\n\n## Going further\n\nThe framework is one of a pair. The other is [aws-service-catalog-factory](https://github.com/awslabs/aws-service-catalog-factory).\nWith Service Catalog Factory you can create pipelines that deploy multi region portfolios very easily. \n\n## License\n\nThis library is licensed under the Apache 2.0 License. \n \n',
'author': 'Eamonn Faherty',
Expand Down

0 comments on commit 3a13f8d

Please sign in to comment.