Skip to content

Adding VPC Regional NAT Gateways - #2989

Open
chynasan wants to merge 4 commits into
ansible-collections:mainfrom
chynasan:regional_nat_gateway_support
Open

Adding VPC Regional NAT Gateways#2989
chynasan wants to merge 4 commits into
ansible-collections:mainfrom
chynasan:regional_nat_gateway_support

Conversation

@chynasan

@chynasan chynasan commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
SUMMARY

Add support for AWS VPC Regional NAT Gateways to the ec2_vpc_nat_gateway module.
Unlike traditional (zonal), NAT gateways that operate in a single AZ and require a subnet, regional NAT gateways are VPC-scoped, automatically span multiple availability zones, don't require a public subnet, and only support public connectivity. See: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateways-regional.html

This PR adds:

  • availability_mode parameter (zonal/regional, default zonal) to control gateway type
  • vpc_id parameter, required when availability_mode=regional (replaces subnet_id)
  • Validation that connectivity_type=private is rejected for regional gateways
  • VPC-based idempotency checks via if_exist_do_not_create for regional gateways
  • EIP release skipping for regional gateways (AWS manages EIP lifecycle in automatic mode)
  • Improved release_eip handling to release all EIP addresses (not just the first) when deleting multi-address gateways
  • Return field documentation for availability_mode, auto_scaling_ips, auto_provision_zones, route_table_id, and per-address availability_zone/availability_zone_id

Manual mode (AvailabilityZoneAddresses, per-AZ EIP configuration) is not presently included as it will introduce complexity which is outside of the scope of this work.

Addresses #2851

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_vpc_nat_gateway
ec2_vpc_nat_gateway_info

ADDITIONAL INFORMATION

boto3 create_nat_gateway: https://docs.aws.amazon.com/boto3/latest/reference/services/ec2/client/create_nat_gateway.html

Assisted-by: Claude Opus 4.6

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

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/28116845709

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_nat_gateway_info_module.html
  • M collections/amazon/aws/ec2_vpc_nat_gateway_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.

The diff output was truncated because it exceeded the maximum size.

diff --git a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_nat_gateway_info_module.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_nat_gateway_info_module.html
index 649cd42..938173c 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_nat_gateway_info_module.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_nat_gateway_info_module.html
@@ -394,6 +394,33 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-result/auto_provision_zones"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-auto-provision-zones"><strong>auto_provision_zones</strong></p>
+<a class="ansibleOptionLink" href="#return-result/auto_provision_zones" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Whether AWS automatically manages availability zone coverage.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when availability_mode is regional</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;enabled&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-result/auto_scaling_ips"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-auto-scaling-ips"><strong>auto_scaling_ips</strong></p>
+<a class="ansibleOptionLink" href="#return-result/auto_scaling_ips" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Whether AWS automatically allocates additional EIPs when more ports are needed.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when availability_mode is regional</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;enabled&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-result/availability_mode"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-availability-mode"><strong>availability_mode</strong></p>
+<a class="ansibleOptionLink" href="#return-result/availability_mode" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Whether the NAT gateway is zonal or regional.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</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;zonal&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-result/connectivity_type"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-connectivity-type"><strong>connectivity_type</strong></p>
 <a class="ansibleOptionLink" href="#return-result/connectivity_type" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -402,7 +429,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;public&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-result/create_time"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-create-time"><strong>create_time</strong></p>
 <a class="ansibleOptionLink" href="#return-result/create_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -411,7 +438,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;2021-03-11T22:43:25+00:00&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-result/delete_time"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-delete-time"><strong>delete_time</strong></p>
 <a class="ansibleOptionLink" href="#return-result/delete_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -420,7 +447,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;2021-03-11T22:43:25+00:00&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-result/nat_gateway_addresses"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses"><strong>nat_gateway_addresses</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
@@ -428,7 +455,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><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-result/nat_gateway_addresses/allocation_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-allocation-id"><strong>allocation_id</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/allocation_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -437,7 +464,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;eipalloc-0853e66a40803da76&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><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-result/nat_gateway_addresses/association_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-association-id"><strong>association_id</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/association_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -446,7 +473,25 @@ 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;eipassoc-0d6365c7eeb7d4932&quot;</span></code></p>
 </div></td>
 </tr>
+<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-result/nat_gateway_addresses/availability_zone"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-availability-zone"><strong>availability_zone</strong></p>
+<a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/availability_zone" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The availability zone of the address (regional NAT gateways only).</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when availability_mode is regional</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;us-east-1a&quot;</span></code></p>
+</div></td>
+</tr>
 <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-result/nat_gateway_addresses/availability_zone_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-availability-zone-id"><strong>availability_zone_id</strong></p>
+<a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/availability_zone_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The availability zone ID of the address (regional NAT gateways only).</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when availability_mode is regional</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;use1-az1&quot;</span></code></p>
+</div></td>
+</tr>
+<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-result/nat_gateway_addresses/is_primary"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-is-primary"><strong>is_primary</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/is_primary" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 </div></td>
@@ -455,7 +500,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">true</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><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-result/nat_gateway_addresses/network_interface_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-network-interface-id"><strong>network_interface_id</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/network_interface_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -464,7 +509,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;eni-0a37acdbe306c661c&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><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-result/nat_gateway_addresses/private_ip"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-private-ip"><strong>private_ip</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/private_ip" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -473,7 +518,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;10.0.238.227&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><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-result/nat_gateway_addresses/public_ip"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-public-ip"><strong>public_ip</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/public_ip" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -482,7 +527,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;203.0.113.9&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><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-result/nat_gateway_addresses/status"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-addresses-status"><strong>status</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_addresses/status" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -491,7 +536,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;succeeded&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-result/nat_gateway_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-nat-gateway-id"><strong>nat_gateway_id</strong></p>
 <a class="ansibleOptionLink" href="#return-result/nat_gateway_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -500,6 +545,15 @@ 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;nat-0c242a2397acf6173&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-result/route_table_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-route-table-id"><strong>route_table_id</strong></p>
+<a class="ansibleOptionLink" href="#return-result/route_table_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
+</div></td>
+<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The route table ID associated with a regional NAT gateway.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when availability_mode is regional</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;rtb-12345678&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-result/state"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-info-module-return-result-state"><strong>state</strong></p>
 <a class="ansibleOptionLink" href="#return-result/state" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
diff --git a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_nat_gateway_module.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_nat_gateway_module.html
index df0884a..a6ce573 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_vpc_nat_gateway_module.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_vpc_nat_gateway_module.html
@@ -163,6 +163,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2>
 <ul class="simple">
 <li><p>Ensure the state of AWS VPC NAT Gateways based on their id, allocation and subnet ids.</p></li>
+<li><p>Supports both zonal (subnet-scoped) and regional (VPC-scoped) NAT gateways.</p></li>
 </ul>
 </section>
 <section id="requirements">
@@ -205,6 +206,22 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </div></td>
 </tr>
 <tr class="row-even"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="parameter-availability_mode"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-availability-mode"><strong>availability_mode</strong></p>
+<a class="ansibleOptionLink" href="#parameter-availability_mode" title="Permalink to this option"></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 12.0.0</em></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>Whether to create a zonal or regional NAT gateway.</p>
+<p>Zonal NAT gateways (the default) operate in a single availability zone and require <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-subnet-id"><span class="std std-ref"><span class="pre">subnet_id</span></span></a></strong></code>.</p>
+<p>Regional NAT gateways are VPC-scoped, automatically span multiple availability zones, and require <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-vpc-id"><span class="std std-ref"><span class="pre">vpc_id</span></span></a></strong></code> instead of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-subnet-id"><span class="std std-ref"><span class="pre">subnet_id</span></span></a></strong></code>.</p>
+<p>Regional NAT gateways only support <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-connectivity-type"><span class="std std-ref"><span class="pre">connectivity_type=public</span></span></a></code>.</p>
+<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
+<ul class="simple">
+<li><p><code class="ansible-option-default-bold docutils literal notranslate"><strong><span class="pre">&quot;zonal&quot;</span></strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
+<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;regional&quot;</span></code></p></li>
+</ul>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-aws_ca_bundle"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-ca-bundle"><strong>aws_ca_bundle</strong></p>
 <a class="ansibleOptionLink" href="#parameter-aws_ca_bundle" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
 </div></td>
@@ -212,7 +229,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>The <code class="docutils literal notranslate"><span class="pre">AWS_CA_BUNDLE</span></code> environment variable may also be used.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-aws_config"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-config"><strong>aws_config</strong></p>
 <a class="ansibleOptionLink" href="#parameter-aws_config" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
@@ -220,14 +237,14 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>Parameters can be found in the AWS documentation <a class="reference external" href="https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config">https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config</a>.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-client_token"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-client-token"><strong>client_token</strong></p>
 <a class="ansibleOptionLink" href="#parameter-client_token" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
 <td><div class="ansible-option-cell"><p>Optional unique token to be used during create to ensure idempotency. When specifying this option, ensure you specify the eip_address parameter as well otherwise any subsequent runs will fail.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-connectivity_type"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-connectivity-type"><strong>connectivity_type</strong></p>
 <a class="ansibleOptionLink" href="#parameter-connectivity_type" title="Permalink to this option"></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 5.5.0</em></p>
@@ -240,7 +257,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-debug_botocore_endpoint_logs"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-debug-botocore-endpoint-logs"><strong>debug_botocore_endpoint_logs</strong></p>
 <a class="ansibleOptionLink" href="#parameter-debug_botocore_endpoint_logs" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 </div></td>
@@ -253,7 +270,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-default_create"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-default-create"><strong>default_create</strong></p>
 <a class="ansibleOptionLink" href="#parameter-default_create" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 <p><em class="ansible-option-versionadded">added in amazon.aws 6.2.0</em></p>
@@ -268,14 +285,14 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-eip_address"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-eip-address"><strong>eip_address</strong></p>
 <a class="ansibleOptionLink" href="#parameter-eip_address" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
 <td><div class="ansible-option-cell"><p>The elastic IP address of the EIP you want attached to this NAT Gateway. If this is not passed and the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-allocation-id"><span class="std std-ref"><span class="pre">allocation_id</span></span></a></strong></code> is not passed, an EIP is generated for this NAT Gateway.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-endpoint_url"></div>
 <div class="ansibleOptionAnchor" id="parameter-aws_endpoint_url"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-endpoint-url"><span id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-endpoint-url"></span><strong>endpoint_url</strong></p>
 <a class="ansibleOptionLink" href="#parameter-endpoint_url" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: aws_endpoint_url</span></p>
@@ -285,11 +302,11 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>The <code class="docutils literal notranslate"><span class="pre">AWS_URL</span></code> environment variable may also be used.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-if_exist_do_not_create"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-if-exist-do-not-create"><strong>if_exist_do_not_create</strong></p>
 <a class="ansibleOptionLink" href="#parameter-if_exist_do_not_create" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>If a NAT Gateway exists already in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-subnet-id"><span class="std std-ref"><span class="pre">subnet_id</span></span></a></strong></code>, then do not create a new one.</p>
+<td><div class="ansible-option-cell"><p>If a NAT Gateway exists already in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-subnet-id"><span class="std std-ref"><span class="pre">subnet_id</span></span></a></strong></code> (for zonal) or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-vpc-id"><span class="std std-ref"><span class="pre">vpc_id</span></span></a></strong></code> (for regional), then do not create a new one.</p>
 <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
 <ul class="simple">
 <li><p><code class="ansible-option-default-bold docutils literal notranslate"><strong><span class="pre">false</span></strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -297,14 +314,14 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-nat_gateway_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-nat-gateway-id"><strong>nat_gateway_id</strong></p>
 <a class="ansibleOptionLink" href="#parameter-nat_gateway_id" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
 <td><div class="ansible-option-cell"><p>The id AWS dynamically allocates to the NAT Gateway on creation. This is required when the absent option is present.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-profile"></div>
 <div class="ansibleOptionAnchor" id="parameter-aws_profile"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-profile"><span id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-profile"></span><strong>profile</strong></p>
 <a class="ansibleOptionLink" href="#parameter-profile" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: aws_profile</span></p>
@@ -316,7 +333,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>The <em>profile</em> option is mutually exclusive with the <em>aws_access_key</em>, <em>aws_secret_key</em> and <em>session_token</em> options.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-purge_tags"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-purge-tags"><strong>purge_tags</strong></p>
 <a class="ansibleOptionLink" href="#parameter-purge_tags" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 </div></td>
@@ -330,7 +347,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-region"></div>
 <div class="ansibleOptionAnchor" id="parameter-aws_region"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-region"><span id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-region"></span><strong>region</strong></p>
 <a class="ansibleOptionLink" href="#parameter-region" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: aws_region</span></p>
@@ -342,13 +359,14 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>See the Amazon AWS documentation for more information <a class="reference external" href="http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region">http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region</a>.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-release_eip"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-release-eip"><strong>release_eip</strong></p>
 <a class="ansibleOptionLink" href="#parameter-release_eip" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 </div></td>
 <td><div class="ansible-option-cell"><p>Deallocate the EIP from the VPC.</p>
 <p>Option is only valid with the absent state.</p>
 <p>You should use this with the wait option. Since you can not release an address while a delete operation is happening.</p>
+<p>Has no effect on regional NAT gateways in automatic mode, as AWS manages their EIP lifecycle.</p>
 <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
 <ul class="simple">
 <li><p><code class="ansible-option-default-bold docutils literal notranslate"><strong><span class="pre">false</span></strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -356,7 +374,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-secret_key"></div>
 <div class="ansibleOptionAnchor" id="parameter-aws_secret_access_key"></div>
 <div class="ansibleOptionAnchor" id="parameter-aws_secret_key"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-secret-key"><span id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-secret-key"></span><span id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-secret-access-key"></span><strong>secret_key</strong></p>
@@ -370,7 +388,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>The <em>aws_secret_access_key</em> alias was added in release 5.1.0 for consistency with the AWS botocore SDK.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-session_token"></div>
 <div class="ansibleOptionAnchor" id="parameter-aws_session_token"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-session-token"><span id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-aws-session-token"></span><strong>session_token</strong></p>
 <a class="ansibleOptionLink" href="#parameter-session_token" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: aws_session_token</span></p>
@@ -382,7 +400,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>The <em>session_token</em> and <em>profile</em> options are mutually exclusive.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-state"><strong>state</strong></p>
 <a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -394,14 +412,16 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-subnet_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-subnet-id"><strong>subnet_id</strong></p>
 <a class="ansibleOptionLink" href="#parameter-subnet_id" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
-<td><div class="ansible-option-cell"><p>The id of the subnet to create the NAT Gateway in. This is required with the present option.</p>
+<td><div class="ansible-option-cell"><p>The id of the subnet to create the NAT Gateway in.</p>
+<p>Required when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-availability-mode"><span class="std std-ref"><span class="pre">availability_mode=zonal</span></span></a></code> (the default).</p>
+<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-vpc-id"><span class="std std-ref"><span class="pre">vpc_id</span></span></a></strong></code>.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-tags"></div>
 <div class="ansibleOptionAnchor" id="parameter-resource_tags"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-tags"><span id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-resource-tags"></span><strong>tags</strong></p>
 <a class="ansibleOptionLink" href="#parameter-tags" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: resource_tags</span></p>
@@ -411,7 +431,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <p>If the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-tags"><span class="std std-ref"><span class="pre">tags</span></span></a></strong></code> parameter is not set then tags will not be modified.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-validate_certs"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-validate-certs"><strong>validate_certs</strong></p>
 <a class="ansibleOptionLink" href="#parameter-validate_certs" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 </div></td>
@@ -424,6 +444,16 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </ul>
 </div></td>
 </tr>
+<tr class="row-odd"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="parameter-vpc_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-vpc-id"><strong>vpc_id</strong></p>
+<a class="ansibleOptionLink" href="#parameter-vpc_id" title="Permalink to this option"></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 12.0.0</em></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>The ID of the VPC in which to create a regional NAT gateway.</p>
+<p>Required when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-availability-mode"><span class="std std-ref"><span class="pre">availability_mode=regional</span></span></a></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
+<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-subnet-id"><span class="std std-ref"><span class="pre">subnet_id</span></span></a></strong></code>.</p>
+</div></td>
+</tr>
 <tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-wait"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-parameter-wait"><strong>wait</strong></p>
 <a class="ansibleOptionLink" href="#parameter-wait" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
@@ -554,6 +584,33 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 <span class="w">      </span><span class="nt">Tag3</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">tag3</span>
 <span class="w">    </span><span class="nt">wait</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</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">update_tags_nat_gateway</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 a regional NAT gateway with auto-provisioned EIPs.</span>
+<span class="w">  </span><span class="nt">amazon.aws.ec2_vpc_nat_gateway</span><span class="p">:</span>
+<span class="w">    </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">present</span>
+<span class="w">    </span><span class="nt">availability_mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">regional</span>
+<span class="w">    </span><span class="nt">vpc_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">vpc-12345678</span>
+<span class="w">    </span><span class="nt">wait</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
+<span class="w">    </span><span class="nt">region</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ap-southeast-2</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">regional_nat_gateway</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 a regional NAT gateway with a specific EIP.</span>
+<span class="w">  </span><span class="nt">amazon.aws.ec2_vpc_nat_gateway</span><span class="p">:</span>
+<span class="w">    </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">present</span>
+<span class="w">    </span><span class="nt">availability_mode</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">regional</span>
+<span class="w">    </span><span class="nt">vpc_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">vpc-12345678</span>
+<span class="w">    </span><span class="nt">allocation_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">eipalloc-12345678</span>
+<span class="w">    </span><span class="nt">wait</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
+<span class="w">    </span><span class="nt">region</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ap-southeast-2</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">regional_nat_gateway</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">Delete a regional NAT gateway and release all EIPs.</span>
+<span class="w">  </span><span class="nt">amazon.aws.ec2_vpc_nat_gateway</span><span class="p">:</span>
+<span class="w">    </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">absent</span>
+<span class="w">    </span><span class="nt">nat_gateway_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nat-12345678</span>
+<span class="w">    </span><span class="nt">release_eip</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
+<span class="w">    </span><span class="nt">wait</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
+<span class="w">    </span><span class="nt">region</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ap-southeast-2</span>
 </pre></div>
 </div>
 </section>
@@ -568,6 +625,36 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-vpc-
 </thead>
 <tbody>
 <tr class="row-even"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-auto_provision_zones"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-auto-provision-zones"><strong>auto_provision_zones</strong></p>
+<a class="ansibleOptionLink" href="#return-auto_provision_zones" 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 12.0.0</em></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>Whether AWS automatically manages availability zone coverage.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when availability_mode is regional</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;enabled&quot;</span></code></p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-auto_scaling_ips"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-auto-scaling-ips"><strong>auto_scaling_ips</strong></p>
+<a class="ansibleOptionLink" href="#return-auto_scaling_ips" 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 12.0.0</em></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>Whether AWS automatically allocates additional EIPs when more ports are needed.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when availability_mode is regional</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;enabled&quot;</span></code></p>
+</div></td>
+</tr>
+<tr class="row-even"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-availability_mode"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-availability-mode"><strong>availability_mode</strong></p>
+<a class="ansibleOptionLink" href="#return-availability_mode" 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 12.0.0</em></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>Whether the NAT gateway is zonal or regional.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</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;zonal&quot;</span></code></p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-connectivity_type"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-connectivity-type"><strong>connectivity_type</strong></p>
 <a class="ansibleOptionLink" href="#return-connectivity_type" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -576,7 +663,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;public&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-create_time"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-create-time"><strong>create_time</strong></p>
 <a class="ansibleOptionLink" href="#return-create_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -585,7 +672,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;2016-03-05T05:19:20.282000+00:00'&quot;</span></code></p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="return-nat_gateway_addresses"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-nat-gateway-addresses"><strong>nat_gateway_addresses</strong></p>
 <a class="ansibleOptionLink" href="#return-nat_gateway_addresses" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">complex</span></p>
 </div></td>
@@ -594,7 +681,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;allocation_id&quot;:</span> <span class="pre">&quot;eipalloc-08ec128d03629671d&quot;,</span> <span class="pre">&quot;association_id&quot;:</span> <span class="pre">&quot;eipassoc-0d6365c7eeb7d4932&quot;,</span> <span class="pre">&quot;is_primary&quot;:</span> <span class="pre">true,</span> <span class="pre">&quot;network_interface_id&quot;:</span> <span class="pre">&quot;eni-095104e630881bad6&quot;,</span> <span class="pre">&quot;private_ip&quot;:</span> <span class="pre">&quot;10.1.0.250&quot;,</span> <span class="pre">&quot;public_ip&quot;:</span> <span class="pre">&quot;203.0.113.6&quot;,</span> <span class="pre">&quot;status&quot;:</span> <span class="pre">&quot;succeeded&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-nat_gateway_addresses/allocation_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-nat-gateway-addresses-allocation-id"><strong>allocation_id</strong></p>
 <a class="ansibleOptionLink" href="#return-nat_gateway_addresses/allocation_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -603,7 +690,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;eipalloc-0853e66a40803da76&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-nat_gateway_addresses/association_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-nat-gateway-addresses-association-id"><strong>association_id</strong></p>
 <a class="ansibleOptionLink" href="#return-nat_gateway_addresses/association_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -612,7 +699,27 @@ 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;eipassoc-0d6365c7eeb7d4932&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-nat_gateway_addresses/availability_zone"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-vpc-nat-gateway-module-return-nat-gateway-addresses-availability-zone"><strong>availability_zone</strong></p>
+<a class="ansibleOptionLink" href="#return-nat_gateway_addresses/availability_zone" title="Per

@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

Comment thread changelogs/fragments/ec2_vpc_nat_gateway-regional-mode.yml Outdated
…tegration tests to set botocore dependencies following the pattern established in PR 2960
@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

Build failed.
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/ansible/buildset/0e95df28450841df96855738fe15b4e8

✔️ ansible-galaxy-importer SUCCESS in 10m 47s
✔️ build-ansible-collection SUCCESS in 11m 31s
✔️ ansible-test-splitter SUCCESS in 4m 15s
integration-amazon.aws-1 FAILURE in 27m 35s
Skipped 43 jobs

@mjohns91 mjohns91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No immediate blockers identified. Do we want to add unit test coverage for the new code? As for the failing ec2_vpc_nat_gateway : Create new regional NAT gateway task, I think we need to add permissions to the aws-terminator networking policies.

@chynasan

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 2989,66d818767d71ed5546e90c326fd3a7410a4ba666

@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

Comment thread plugins/modules/ec2_vpc_nat_gateway.py Outdated
Co-authored-by: Bianca Henderson <beeankha@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

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