This repository has been archived by the owner on Jul 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make vpc_cidr and vpc_tenancy optional.
modified: botoform/builders.py modified: docs/source/index.rst modified: docs/source/schema/index.rst new file: docs/source/schema/jinja2/index.rst new file: docs/source/schema/vpc.rst modified: readme.rst modified: tests/fixtures/webapp.yaml
- Loading branch information
russellballestrini
committed
Jan 5, 2017
1 parent
007aef9
commit 7845456
Showing
7 changed files
with
83 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _jinja2: | ||
|
||
Jinja2 | ||
########### | ||
|
||
Jinja2 is a templating language. | ||
|
||
.. note:: Jinja2 is optional and considered "advanced". | ||
|
||
Jinja2 variable substitutions | ||
================================ | ||
|
||
One popular use of Jinja2 is for variable substitutions and expansions. | ||
|
||
In this example we use a substitution to define the ``vpc_cidr``. | ||
|
||
.. code-block:: yaml | ||
vpc_cidr: {{ vpc_cidr }} | ||
When the time comes to create a new VPC, we pass an extra variable using ``-e``. | ||
|
||
For example, to set the ``vpc_cidr`` to ``192.168.1.0/24``: | ||
|
||
.. code-block:: bash | ||
bf create dogtest01 -e 'vpc_cidr=192.168.1.0/24' webapp.yaml | ||
Jinja2 default filter | ||
================================ | ||
|
||
In this example we will use a Jinja2 filter called ``default``. | ||
|
||
Like our example from before, but this time setting a default. | ||
|
||
.. code-block:: yaml | ||
vpc_cidr: {{ vpc_cidr | default(10.10.0.0/24) }} | ||
Now the user may omit the extra variables and we will use the default. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.. _vpc: | ||
|
||
vpc | ||
####### | ||
|
||
Optional ``vpc`` schema settings: | ||
|
||
.. code-block:: yaml | ||
vpc_cidr: the-cidr-block-to-allocate-to-your-vpc | ||
vpc_tenancy: whether-or-not-your-vpc-should-use-default-or-dedicated | ||
For example: | ||
|
||
.. code-block:: yaml | ||
vpc_cidr: 10.10.10.0/24 | ||
vpc_tenancy: default | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters