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

[PR #2291/14d447b6 backport][stable-8] ec2_vpc_route_table: Add support to configure Transit Gateway routes in route table #2295

Open
wants to merge 1 commit into
base: stable-8
Choose a base branch
from

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Sep 16, 2024

This is a backport of PR #2291 as merged into main (14d447b).

SUMMARY

Fixes #478
This PR updates the ec2_vpc_route_table "routes" parameter to support the transit gateway id.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

… in route table (#2291)

SUMMARY

Fixes #478
This PR updates the ec2_vpc_route_table "routes" parameter to support the transit gateway id.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
Reviewed-by: Bikouo Aubin
Reviewed-by: Mark Chappell
Reviewed-by: GomathiselviS
(cherry picked from commit 14d447b)
Copy link

Docs Build 📝

Thank you for contribution!✨

The docsite for this PR is available for download as an artifact from this run:
https://github.com/ansible-collections/amazon.aws/actions/runs/10887271272

You can compare to the docs for the main branch here:
https://ansible-collections.github.io/amazon.aws/branch/main

File changes:

  • M collections/amazon/aws/ec2_vpc_route_table_info_module.html
  • M collections/amazon/aws/ec2_vpc_route_table_module.html
Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

diff --git a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_route_table_info_module.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_route_table_info_module.html
index 69f122c..aafff6e 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_route_table_info_module.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_route_table_info_module.html
@@ -581,7 +581,17 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;active&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-route_tables/routes/transit_gateway_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-route-table-info-module-return-route-tables-routes-transit-gateway-id"><strong>transit_gateway_id</strong></p>
+<a class="ansibleOptionLink" href="#return-route_tables/routes/transit_gateway_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<p><em class="ansible-option-versionadded">added in amazon.aws 8.3.0</em></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>ID of the Transit gateway.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when the route is via a Transit gateway.</p>
+<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;tgw-123456789012&quot;</span></code></p>
+</div></td>
+</tr>
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-route_tables/tags"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-route-table-info-module-return-route-tables-tags"><strong>tags</strong></p>
 <a class="ansibleOptionLink" href="#return-route_tables/tags" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
@@ -590,7 +600,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{&quot;Name&quot;:</span> <span class="pre">&quot;Public</span> <span class="pre">route</span> <span class="pre">table&quot;,</span> <span class="pre">&quot;Public&quot;:</span> <span class="pre">&quot;true&quot;}</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-route_tables/vpc_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-route-table-info-module-return-route-tables-vpc-id"><strong>vpc_id</strong></p>
 <a class="ansibleOptionLink" href="#return-route_tables/vpc_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
diff --git a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_route_table_module.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_route_table_module.html
index 7e9a570..b15cddc 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_route_table_module.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_route_table_module.html
@@ -355,7 +355,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <a class="ansibleOptionLink" href="#parameter-routes" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
 </div></td>
 <td><div class="ansible-option-cell"><p>List of routes in the route table.</p>
-<p>Routes are specified as dicts containing the keys <code class="ansible-value docutils literal notranslate"><span class="pre">dest</span></code> and one of <code class="ansible-value docutils literal notranslate"><span class="pre">gateway_id</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">instance_id</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">network_interface_id</span></code>, or <code class="ansible-value docutils literal notranslate"><span class="pre">vpc_peering_connection_id</span></code>.</p>
+<p>Routes are specified as dicts containing the keys <code class="ansible-value docutils literal notranslate"><span class="pre">dest</span></code> and one of <code class="ansible-value docutils literal notranslate"><span class="pre">gateway_id</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">instance_id</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">network_interface_id</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">transit_gateway_id</span></code>, or <code class="ansible-value docutils literal notranslate"><span class="pre">vpc_peering_connection_id</span></code>.</p>
 <p>The value of <code class="ansible-value docutils literal notranslate"><span class="pre">dest</span></code> is used for the destination match. It may be a IPv4 CIDR block or a IPv6 CIDR block.</p>
 <p>If <code class="ansible-value docutils literal notranslate"><span class="pre">gateway_id</span></code> is specified, you can refer to the VPC’s IGW by using the value <code class="ansible-value docutils literal notranslate"><span class="pre">igw</span></code>.</p>
 <p>Routes are required for present states.</p>
@@ -481,6 +481,8 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <span class="w">        </span><span class="nt">gateway_id</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">igw.gateway_id</span> <span class="cp">}}</span><span class="s">&quot;</span>
 <span class="w">      </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">dest</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">::/0</span>
 <span class="w">        </span><span class="nt">gateway_id</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">igw.gateway_id</span> <span class="cp">}}</span><span class="s">&quot;</span>
+<span class="w">      </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">dest</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0.0.0.0/0</span>
+<span class="w">        </span><span class="nt">gateway_id</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">transit_gateway_id</span> <span class="cp">}}</span><span class="s">&quot;</span>
 <span class="w">  </span><span class="nt">register</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">public_route_table</span>
 
 <span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Create VPC gateway</span>
@@ -752,7 +754,17 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;active&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-route_table/routes/transit_gateway_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-route-table-module-return-route-table-routes-transit-gateway-id"><strong>transit_gateway_id</strong></p>
+<a class="ansibleOptionLink" href="#return-route_table/routes/transit_gateway_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+<p><em class="ansible-option-versionadded">added in amazon.aws 8.3.0</em></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>ID of the Transit gateway.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when the route is via a Transit gateway</p>
+<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">&quot;tgw-123456789012&quot;</span></code></p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-route_table/tags"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-route-table-module-return-route-table-tags"><strong>tags</strong></p>
 <a class="ansibleOptionLink" href="#return-route_table/tags" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
@@ -761,7 +773,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{&quot;Name&quot;:</span> <span class="pre">&quot;Public</span> <span class="pre">route</span> <span class="pre">table&quot;,</span> <span class="pre">&quot;Public&quot;:</span> <span class="pre">&quot;true&quot;}</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-route_table/vpc_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-route-table-module-return-route-table-vpc-id"><strong>vpc_id</strong></p>
 <a class="ansibleOptionLink" href="#return-route_table/vpc_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/145f1eb91e7a42ec97da10c7e1389cf4

✔️ ansible-galaxy-importer SUCCESS in 4m 38s
✔️ build-ansible-collection SUCCESS in 10m 43s
✔️ ansible-test-splitter SUCCESS in 4m 14s
✔️ integration-amazon.aws-1 SUCCESS in 21m 40s
Skipped 43 jobs

softwarefactory-project-zuul bot pushed a commit that referenced this pull request Sep 18, 2024
SUMMARY

Fix sanity errors occurring with the devel branch of ansible
ERROR: Found 2 pylint issue(s) which need to be resolved:
ERROR: plugins/modules/ec2_vpc_endpoint.py:441:24: used-before-assignment: Using variable 'result' before assignment
ERROR: plugins/modules/ec2_vpc_route_table.py:792:7: used-before-assignment: Using variable 'route_table' before assignment

See #2295

ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell
@alinabuzachis
Copy link
Contributor

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/2f5abc2e88aa461bb12ca63416373b37

✔️ ansible-galaxy-importer SUCCESS in 4m 36s
✔️ build-ansible-collection SUCCESS in 11m 02s
✔️ ansible-test-splitter SUCCESS in 4m 21s
✔️ integration-amazon.aws-1 SUCCESS in 22m 03s
Skipped 43 jobs

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.

2 participants