├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── bug_report.yml │ ├── config.yml │ ├── feature_request.md │ ├── feature_request.yml │ └── question.md ├── PULL_REQUEST_TEMPLATE.md ├── banner.png ├── mergify.yml ├── renovate.json ├── settings.yml └── workflows │ ├── branch.yml │ ├── chatops.yml │ ├── release.yml │ └── scheduled.yml ├── .gitignore ├── LICENSE ├── README.md ├── README.yaml ├── atmos.yaml ├── context.tf ├── examples └── complete │ ├── context.tf │ ├── fixtures.us-east-2.tfvars │ ├── main.tf │ ├── outputs.tf │ ├── variables.tf │ └── versions.tf ├── main.tf ├── outputs.tf ├── test ├── .gitignore ├── Makefile ├── Makefile.alpine └── src │ ├── .gitignore │ ├── Makefile │ ├── examples_complete_test.go │ ├── go.mod │ └── go.sum ├── variables.tf └── versions.tf /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Use this file to define individuals or teams that are responsible for code in a repository. 2 | # Read more: 3 | # 4 | # Order is important: the last matching pattern has the highest precedence 5 | 6 | # These owners will be the default owners for everything 7 | * @cloudposse/engineering @cloudposse/contributors 8 | 9 | # Cloud Posse must review any changes to Makefiles 10 | **/Makefile @cloudposse/engineering 11 | **/Makefile.* @cloudposse/engineering 12 | 13 | # Cloud Posse must review any changes to GitHub actions 14 | .github/* @cloudposse/engineering 15 | 16 | # Cloud Posse must review any changes to standard context definition, 17 | # but some changes can be rubber-stamped. 18 | **/*.tf @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers 19 | README.yaml @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers 20 | README.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers 21 | docs/*.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers 22 | 23 | # Cloud Posse Admins must review all changes to CODEOWNERS or the mergify configuration 24 | .github/mergify.yml @cloudposse/admins 25 | .github/CODEOWNERS @cloudposse/admins 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'bug' 6 | assignees: '' 7 | 8 | --- 9 | 10 | Found a bug? Maybe our [Slack Community](https://slack.cloudposse.com) can help. 11 | 12 | [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) 13 | 14 | ## Describe the Bug 15 | A clear and concise description of what the bug is. 16 | 17 | ## Expected Behavior 18 | A clear and concise description of what you expected to happen. 19 | 20 | ## Steps to Reproduce 21 | Steps to reproduce the behavior: 22 | 1. Go to '...' 23 | 2. Run '....' 24 | 3. Enter '....' 25 | 4. See error 26 | 27 | ## Screenshots 28 | If applicable, add screenshots or logs to help explain your problem. 29 | 30 | ## Environment (please complete the following information): 31 | 32 | Anything that will help us triage the bug will help. Here are some ideas: 33 | - OS: [e.g. Linux, OSX, WSL, etc] 34 | - Version [e.g. 10.15] 35 | 36 | ## Additional Context 37 | Add any other context about the problem here. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | description: Create a report to help us improve 4 | labels: ["bug"] 5 | assignees: [""] 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Found a bug? 11 | 12 | Please checkout our [Slack Community](https://slack.cloudposse.com) 13 | or visit our [Slack Archive](https://archive.sweetops.com/). 14 | 15 | [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) 16 | 17 | - type: textarea 18 | id: concise-description 19 | attributes: 20 | label: Describe the Bug 21 | description: A clear and concise description of what the bug is. 22 | placeholder: What is the bug about? 23 | validations: 24 | required: true 25 | 26 | - type: textarea 27 | id: expected 28 | attributes: 29 | label: Expected Behavior 30 | description: A clear and concise description of what you expected. 31 | placeholder: What happened? 32 | validations: 33 | required: true 34 | 35 | - type: textarea 36 | id: reproduction-steps 37 | attributes: 38 | label: Steps to Reproduce 39 | description: Steps to reproduce the behavior. 40 | placeholder: How do we reproduce it? 41 | validations: 42 | required: true 43 | 44 | - type: textarea 45 | id: screenshots 46 | attributes: 47 | label: Screenshots 48 | description: If applicable, add screenshots or logs to help explain. 49 | validations: 50 | required: false 51 | 52 | - type: textarea 53 | id: environment 54 | attributes: 55 | label: Environment 56 | description: Anything that will help us triage the bug. 57 | placeholder: | 58 | - OS: [e.g. Linux, OSX, WSL, etc] 59 | - Version [e.g. 10.15] 60 | - Module version 61 | - Terraform version 62 | validations: 63 | required: false 64 | 65 | - type: textarea 66 | id: additional 67 | attributes: 68 | label: Additional Context 69 | description: | 70 | Add any other context about the problem here. 71 | validations: 72 | required: false 73 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | 3 | contact_links: 4 | 5 | - name: Community Slack Team 6 | url: https://cloudposse.com/slack/ 7 | about: |- 8 | Please ask and answer questions here. 9 | 10 | - name: Office Hours 11 | url: https://cloudposse.com/office-hours/ 12 | about: |- 13 | Join us every Wednesday for FREE Office Hours (lunch & learn). 14 | 15 | - name: DevOps Accelerator Program 16 | url: https://cloudposse.com/accelerate/ 17 | about: |- 18 | Own your infrastructure in record time. We build it. You drive it. 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 'feature request' 6 | assignees: '' 7 | 8 | --- 9 | 10 | Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) or visit our [Slack Archive](https://archive.sweetops.com/). 11 | 12 | [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) 13 | 14 | ## Describe the Feature 15 | 16 | A clear and concise description of what the bug is. 17 | 18 | ## Expected Behavior 19 | 20 | A clear and concise description of what you expected to happen. 21 | 22 | ## Use Case 23 | 24 | Is your feature request related to a problem/challenge you are trying to solve? Please provide some additional context of why this feature or capability will be valuable. 25 | 26 | ## Describe Ideal Solution 27 | 28 | A clear and concise description of what you want to happen. If you don't know, that's okay. 29 | 30 | ## Alternatives Considered 31 | 32 | Explain what alternative solutions or features you've considered. 33 | 34 | ## Additional Context 35 | 36 | Add any other context or screenshots about the feature request here. 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | description: Suggest an idea for this project 4 | labels: ["feature request"] 5 | assignees: [""] 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Have a question? 11 | 12 | Please checkout our [Slack Community](https://slack.cloudposse.com) 13 | or visit our [Slack Archive](https://archive.sweetops.com/). 14 | 15 | [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) 16 | 17 | - type: textarea 18 | id: concise-description 19 | attributes: 20 | label: Describe the Feature 21 | description: A clear and concise description of what the feature is. 22 | placeholder: What is the feature about? 23 | validations: 24 | required: true 25 | 26 | - type: textarea 27 | id: expected 28 | attributes: 29 | label: Expected Behavior 30 | description: A clear and concise description of what you expected. 31 | placeholder: What happened? 32 | validations: 33 | required: true 34 | 35 | - type: textarea 36 | id: use-case 37 | attributes: 38 | label: Use Case 39 | description: | 40 | Is your feature request related to a problem/challenge you are trying 41 | to solve? 42 | 43 | Please provide some additional context of why this feature or 44 | capability will be valuable. 45 | validations: 46 | required: true 47 | 48 | - type: textarea 49 | id: ideal-solution 50 | attributes: 51 | label: Describe Ideal Solution 52 | description: A clear and concise description of what you want to happen. 53 | validations: 54 | required: true 55 | 56 | - type: textarea 57 | id: alternatives-considered 58 | attributes: 59 | label: Alternatives Considered 60 | description: Explain alternative solutions or features considered. 61 | validations: 62 | required: false 63 | 64 | - type: textarea 65 | id: additional 66 | attributes: 67 | label: Additional Context 68 | description: | 69 | Add any other context about the problem here. 70 | validations: 71 | required: false 72 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudposse/terraform-aws-vpn-connection/4cf574a9795d05b419503d6bf9dfdd63d54b36f0/.github/ISSUE_TEMPLATE/question.md -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## what 2 | 3 | 7 | 8 | ## why 9 | 10 | 15 | 16 | ## references 17 | 18 | 22 | -------------------------------------------------------------------------------- /.github/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudposse/terraform-aws-vpn-connection/4cf574a9795d05b419503d6bf9dfdd63d54b36f0/.github/banner.png -------------------------------------------------------------------------------- /.github/mergify.yml: -------------------------------------------------------------------------------- 1 | extends: .github 2 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base", 4 | ":preserveSemverRanges", 5 | ":rebaseStalePrs" 6 | ], 7 | "baseBranches": ["main"], 8 | "labels": ["auto-update"], 9 | "dependencyDashboardAutoclose": true, 10 | "enabledManagers": ["terraform"], 11 | "terraform": { 12 | "ignorePaths": ["**/context.tf"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.github/settings.yml: -------------------------------------------------------------------------------- 1 | # Upstream changes from _extends are only recognized when modifications are made to this file in the default branch. 2 | _extends: .github 3 | repository: 4 | name: terraform-aws-vpn-connection 5 | description: Terraform module to provision a site-to-site VPN connection between a VPC and an on-premises network 6 | homepage: https://cloudposse.com/accelerate 7 | topics: "" 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/workflows/branch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Branch 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | - release/** 8 | types: [opened, synchronize, reopened, labeled, unlabeled] 9 | push: 10 | branches: 11 | - main 12 | - release/v* 13 | paths-ignore: 14 | - '.github/**' 15 | - 'docs/**' 16 | - 'examples/**' 17 | - 'test/**' 18 | - 'README.md' 19 | 20 | permissions: {} 21 | 22 | jobs: 23 | terraform-module: 24 | uses: cloudposse/.github/.github/workflows/shared-terraform-module.yml@main 25 | secrets: inherit 26 | -------------------------------------------------------------------------------- /.github/workflows/chatops.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: chatops 3 | on: 4 | issue_comment: 5 | types: [created] 6 | 7 | permissions: 8 | pull-requests: write 9 | id-token: write 10 | contents: write 11 | statuses: write 12 | 13 | jobs: 14 | test: 15 | uses: cloudposse/.github/.github/workflows/shared-terraform-chatops.yml@main 16 | if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/terratest') }} 17 | secrets: inherit 18 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: release 3 | on: 4 | release: 5 | types: 6 | - published 7 | 8 | permissions: 9 | id-token: write 10 | contents: write 11 | pull-requests: write 12 | 13 | jobs: 14 | terraform-module: 15 | uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main 16 | secrets: inherit 17 | -------------------------------------------------------------------------------- /.github/workflows/scheduled.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: scheduled 3 | on: 4 | workflow_dispatch: { } # Allows manually trigger this workflow 5 | schedule: 6 | - cron: "0 3 * * *" 7 | 8 | permissions: 9 | pull-requests: write 10 | id-token: write 11 | contents: write 12 | 13 | jobs: 14 | scheduled: 15 | uses: cloudposse/.github/.github/workflows/shared-terraform-scheduled.yml@main 16 | secrets: inherit 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Local .terraform directories 2 | **/.terraform/* 3 | 4 | # .tfstate files 5 | *.tfstate 6 | *.tfstate.* 7 | 8 | # IDE files 9 | .idea 10 | *.iml 11 | 12 | # Build harness files 13 | .build-harness 14 | build-harness 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2019-2024 Cloud Posse, LLC 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Project Banner
5 | 6 | 7 |

Latest ReleaseLast UpdatedSlack CommunityGet Support 8 | 9 |

10 | 11 | 12 | 32 | 33 | Terraform module to provision a [site-to-site](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) [VPN connection](https://docs.aws.amazon.com/vpc/latest/userguide/vpn-connections.html) 34 | between a VPC and an on-premises network. 35 | 36 | The module can do the following: 37 | 38 | - Create a Virtual Private Gateway (VPG) and attach it to the VPC 39 | - Create a Customer Gateway (CGW) pointing to the provided Internet-routable IP address of the external interface on the on-premises network 40 | - Create a Site-to-Site Virtual Private Network (VPN) connection 41 | - Request automatic route propagation between the VPG and the provided route tables in the VPC 42 | - If the VPN connection is configured to use static routes, provision a static route between the VPN connection and the CGW 43 | 44 | Exactly what it does depends on the input parameters. The module is designed to be flexible and can be used in a variety of scenarios. 45 | 46 | - If you supply `customer_gateway_ip_address` and set `transit_gateway_enabled` to `true`, 47 | the module will create a CGW, then create a VPN connection, and then assign the connection to 48 | the Transit Gateway identified by `existing_transit_gateway_id` and the created CGW 49 | - If you supply `customer_gateway_ip_address` and set `transit_gateway_enabled` to `false`, 50 | the module will create a VPG and CGW, then create a VPN connection, and then assign it to the VPG and CGW 51 | - If you do not supply `customer_gateway_ip_address` (set it to `null`) then the module will only create a VPG 52 | 53 | The module also provides some options for adding routes to the VPC or TGW route tables. You need to use 54 | the options that correspond to the kind of attachment point (VPC or TGW) you are using. 55 | 56 | 57 | > [!TIP] 58 | > #### 👽 Use Atmos with Terraform 59 | > Cloud Posse uses [`atmos`](https://atmos.tools) to easily orchestrate multiple environments using Terraform.
60 | > Works with [Github Actions](https://atmos.tools/integrations/github-actions/), [Atlantis](https://atmos.tools/integrations/atlantis), or [Spacelift](https://atmos.tools/integrations/spacelift). 61 | > 62 | >
63 | > Watch demo of using Atmos with Terraform 64 | >
65 | > Example of running atmos to manage infrastructure from our Quick Start tutorial. 66 | > 67 | 68 | 69 | 70 | 71 | 72 | ## Usage 73 | 74 | ```hcl 75 | module "vpn_connection" { 76 | source = "cloudposse/vpn-connection/aws" 77 | # Cloud Posse recommends pinning every module to a specific version 78 | # version = "x.x.x" 79 | namespace = "eg" 80 | stage = "dev" 81 | name = "test" 82 | vpc_id = "vpc-xxxxxxxx" 83 | vpn_gateway_amazon_side_asn = 64512 84 | customer_gateway_bgp_asn = 65000 85 | customer_gateway_ip_address = "172.0.0.1" 86 | route_table_ids = ["rtb-xxxxxxxx", "rtb-yyyyyyyy", "rtb-zzzzzzzz"] 87 | vpn_connection_static_routes_only = "true" 88 | vpn_connection_static_routes_destinations = ["10.80.1.0/24"] 89 | } 90 | ``` 91 | 92 | > [!IMPORTANT] 93 | > In Cloud Posse's examples, we avoid pinning modules to specific versions to prevent discrepancies between the documentation 94 | > and the latest released versions. However, for your own projects, we strongly advise pinning each module to the exact version 95 | > you're using. This practice ensures the stability of your infrastructure. Additionally, we recommend implementing a systematic 96 | > approach for updating versions to avoid unexpected changes. 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | ## Requirements 107 | 108 | | Name | Version | 109 | |------|---------| 110 | | [terraform](#requirement\_terraform) | >= 1.3.0 | 111 | | [aws](#requirement\_aws) | >= 5.53.0 | 112 | 113 | ## Providers 114 | 115 | | Name | Version | 116 | |------|---------| 117 | | [aws](#provider\_aws) | >= 5.53.0 | 118 | 119 | ## Modules 120 | 121 | | Name | Source | Version | 122 | |------|--------|---------| 123 | | [logs](#module\_logs) | cloudposse/cloudwatch-logs/aws | 0.6.9 | 124 | | [this](#module\_this) | cloudposse/label/null | 0.25.0 | 125 | 126 | ## Resources 127 | 128 | | Name | Type | 129 | |------|------| 130 | | [aws_customer_gateway.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/customer_gateway) | resource | 131 | | [aws_ec2_tag.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_tag) | resource | 132 | | [aws_ec2_transit_gateway_route.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route) | resource | 133 | | [aws_ec2_transit_gateway_route_table_association.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route_table_association) | resource | 134 | | [aws_ec2_transit_gateway_route_table_propagation.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route_table_propagation) | resource | 135 | | [aws_vpn_connection.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpn_connection) | resource | 136 | | [aws_vpn_connection_route.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpn_connection_route) | resource | 137 | | [aws_vpn_gateway.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpn_gateway) | resource | 138 | | [aws_vpn_gateway_route_propagation.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpn_gateway_route_propagation) | resource | 139 | 140 | ## Inputs 141 | 142 | | Name | Description | Type | Default | Required | 143 | |------|-------------|------|---------|:--------:| 144 | | [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no | 145 | | [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the `delimiter`
and treated as a single ID element. | `list(string)` | `[]` | no | 146 | | [context](#input\_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. | `any` |
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
| no | 147 | | [customer\_gateway\_bgp\_asn](#input\_customer\_gateway\_bgp\_asn) | The Customer Gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN) | `number` | `65000` | no | 148 | | [customer\_gateway\_device\_name](#input\_customer\_gateway\_device\_name) | The Device Name of the Customer Gateway. Set to `null` to leave unnamed.
WARNING: Changing this value will cause the Customer Gateway to be replaced. | `string` | `""` | no | 149 | | [customer\_gateway\_ip\_address](#input\_customer\_gateway\_ip\_address) | The Internet-routable IP address of the Customer Gateway's external interface.
WARNING: If set to `null`, the module will not create a Customer Gateway *or a VPN connection*
and will only create a VPN Gateway. | `string` | `null` | no | 150 | | [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no | 151 | | [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no | 152 | | [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no | 153 | | [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no | 154 | | [existing\_transit\_gateway\_id](#input\_existing\_transit\_gateway\_id) | Existing Transit Gateway ID. Required if `transit_gateway_enabled` is `true`, ignored otherwise.
To set up a transit gateway, one can use the`cloudposse/transit-gateway/aws` module and pass
the output `transit_gateway_id` to this variable. | `string` | `""` | no | 155 | | [existing\_vpn\_gateway\_id](#input\_existing\_vpn\_gateway\_id) | Existing VPN Gateway ID. If provided the module will use the vpn gateway
provided here. | `string` | `null` | no | 156 | | [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no | 157 | | [label\_key\_case](#input\_label\_key\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no | 158 | | [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no | 159 | | [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no | 160 | | [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` |
[
"default"
]
| no | 161 | | [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no | 162 | | [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no | 163 | | [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no | 164 | | [route\_table\_ids](#input\_route\_table\_ids) | The IDs of the route tables for which routes from the Virtual Private Gateway will be propagated | `list(string)` | `[]` | no | 165 | | [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no | 166 | | [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no | 167 | | [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no | 168 | | [transit\_gateway\_enabled](#input\_transit\_gateway\_enabled) | If `true`, the module will not create a Virtual Private Gateway but instead will attach
the VPN connection to the Transit Gateway specified by `existing_transit_gateway_id` | `bool` | `false` | no | 169 | | [transit\_gateway\_route\_table\_id](#input\_transit\_gateway\_route\_table\_id) | The ID of the route table for the transit gateway that you want to associate + propagate the VPN connection's TGW attachment | `string` | `null` | no | 170 | | [transit\_gateway\_routes](#input\_transit\_gateway\_routes) | A map of transit gateway routes to create on the given TGW route table (via `transit_gateway_route_table_id`) for the created VPN Attachment. Use the key in the map to describe the route |
map(object({
blackhole = optional(bool, false)
destination_cidr_block = string
}))
| `{}` | no | 171 | | [vpc\_id](#input\_vpc\_id) | The ID of the VPC to which the Virtual Private Gateway will be attached.
Not needed if attaching the VPN connection to a Transit Gateway. | `string` | `null` | no | 172 | | [vpn\_acceleration\_enabled](#input\_vpn\_acceleration\_enabled) | Set to true to enable VPN acceleration for the VPN connection. Can only be set at creation time, cannot be changed later.
Accelerated VPN connections come with several restrictions: consult the AWS documentation for details. | `bool` | `false` | no | 173 | | [vpn\_connection\_local\_ipv4\_network\_cidr](#input\_vpn\_connection\_local\_ipv4\_network\_cidr) | The IPv4 CIDR on the Customer Gateway (on-premises) side of the VPN connection | `string` | `"0.0.0.0/0"` | no | 174 | | [vpn\_connection\_log\_retention\_in\_days](#input\_vpn\_connection\_log\_retention\_in\_days) | Specifies the number of days you want to retain log events | `number` | `30` | no | 175 | | [vpn\_connection\_remote\_ipv4\_network\_cidr](#input\_vpn\_connection\_remote\_ipv4\_network\_cidr) | The IPv4 CIDR on the AWS side of the VPN connection | `string` | `"0.0.0.0/0"` | no | 176 | | [vpn\_connection\_static\_routes\_destinations](#input\_vpn\_connection\_static\_routes\_destinations) | List of CIDR blocks to be used as destination for static routes.
Routes to destinations will be propagated to the route tables defined in `route_table_ids`. | `list(string)` | `[]` | no | 177 | | [vpn\_connection\_static\_routes\_only](#input\_vpn\_connection\_static\_routes\_only) | If set to `true`, the VPN connection will use static routes exclusively.
Static routes must be used for devices that don't support BGP. | `bool` | `false` | no | 178 | | [vpn\_connection\_tunnel1\_cloudwatch\_log\_enabled](#input\_vpn\_connection\_tunnel1\_cloudwatch\_log\_enabled) | Enable or disable VPN tunnel logging feature for the tunnel | `bool` | `false` | no | 179 | | [vpn\_connection\_tunnel1\_cloudwatch\_log\_group\_arn](#input\_vpn\_connection\_tunnel1\_cloudwatch\_log\_group\_arn) | The ARN of the CloudWatch log group to which the logs will be published.
If the list is empty and `vpn_connection_tunnel1_cloudwatch_log_enabled` is `true`,
the module will create a new log group and use it.
If the list is not empty, the module will use the first ARN in the list. | `list(string)` | `[]` | no | 180 | | [vpn\_connection\_tunnel1\_cloudwatch\_log\_output\_format](#input\_vpn\_connection\_tunnel1\_cloudwatch\_log\_output\_format) | Set log format for the tunnel. Default format is json. Possible values are `json` and `text` | `string` | `"json"` | no | 181 | | [vpn\_connection\_tunnel1\_dpd\_timeout\_action](#input\_vpn\_connection\_tunnel1\_dpd\_timeout\_action) | The action to take after DPD timeout occurs for the first VPN tunnel.
Specify `restart` to restart the IKE initiation. Specify `clear` to end the IKE session.
Valid values are `clear` \| `none` \| `restart` | `string` | `"clear"` | no | 182 | | [vpn\_connection\_tunnel1\_ike\_versions](#input\_vpn\_connection\_tunnel1\_ike\_versions) | The IKE versions that are permitted for the first VPN tunnel. Valid values are `ikev1` \| `ikev2` | `list(string)` | `[]` | no | 183 | | [vpn\_connection\_tunnel1\_inside\_cidr](#input\_vpn\_connection\_tunnel1\_inside\_cidr) | The CIDR block of the inside IP addresses for the first VPN tunnel | `string` | `null` | no | 184 | | [vpn\_connection\_tunnel1\_phase1\_dh\_group\_numbers](#input\_vpn\_connection\_tunnel1\_phase1\_dh\_group\_numbers) | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations.
Valid values are 2 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 22 \| 23 \| 24 | `list(string)` | `[]` | no | 185 | | [vpn\_connection\_tunnel1\_phase1\_encryption\_algorithms](#input\_vpn\_connection\_tunnel1\_phase1\_encryption\_algorithms) | List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations.
Valid values are AES128 \| AES256 \| AES128-GCM-16 \| AES256-GCM-16 | `list(string)` | `[]` | no | 186 | | [vpn\_connection\_tunnel1\_phase1\_integrity\_algorithms](#input\_vpn\_connection\_tunnel1\_phase1\_integrity\_algorithms) | One or more integrity algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations.
Valid values are SHA1 \| SHA2-256 \| SHA2-384 \| SHA2-512 | `list(string)` | `[]` | no | 187 | | [vpn\_connection\_tunnel1\_phase1\_lifetime\_seconds](#input\_vpn\_connection\_tunnel1\_phase1\_lifetime\_seconds) | The lifetime for phase 1 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 28800 | `string` | `"28800"` | no | 188 | | [vpn\_connection\_tunnel1\_phase2\_dh\_group\_numbers](#input\_vpn\_connection\_tunnel1\_phase2\_dh\_group\_numbers) | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations.
Valid values are 2 \| 5 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 22 \| 23 \| 24 | `list(string)` | `[]` | no | 189 | | [vpn\_connection\_tunnel1\_phase2\_encryption\_algorithms](#input\_vpn\_connection\_tunnel1\_phase2\_encryption\_algorithms) | List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations.
Valid values are AES128 \| AES256 \| AES128-GCM-16 \| AES256-GCM-16 | `list(string)` | `[]` | no | 190 | | [vpn\_connection\_tunnel1\_phase2\_integrity\_algorithms](#input\_vpn\_connection\_tunnel1\_phase2\_integrity\_algorithms) | One or more integrity algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations.
Valid values are SHA1 \| SHA2-256 \| SHA2-384 \| SHA2-512 | `list(string)` | `[]` | no | 191 | | [vpn\_connection\_tunnel1\_phase2\_lifetime\_seconds](#input\_vpn\_connection\_tunnel1\_phase2\_lifetime\_seconds) | The lifetime for phase 2 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 3600 | `string` | `"3600"` | no | 192 | | [vpn\_connection\_tunnel1\_preshared\_key](#input\_vpn\_connection\_tunnel1\_preshared\_key) | The preshared key of the first VPN tunnel. The preshared key must be between 8 and 64 characters in length and cannot start with zero. Allowed characters are alphanumeric characters, periods(.) and underscores(\_) | `string` | `null` | no | 193 | | [vpn\_connection\_tunnel1\_startup\_action](#input\_vpn\_connection\_tunnel1\_startup\_action) | The action to take when the establishing the tunnel for the first VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for AWS to initiate the IKE negotiation. Valid values are `add` \| `start` | `string` | `"add"` | no | 194 | | [vpn\_connection\_tunnel2\_cloudwatch\_log\_enabled](#input\_vpn\_connection\_tunnel2\_cloudwatch\_log\_enabled) | Enable or disable VPN tunnel logging feature for the tunnel | `bool` | `false` | no | 195 | | [vpn\_connection\_tunnel2\_cloudwatch\_log\_group\_arn](#input\_vpn\_connection\_tunnel2\_cloudwatch\_log\_group\_arn) | The ARN of the CloudWatch log group to which the logs will be published.
If the list is empty and `vpn_connection_tunnel2_cloudwatch_log_enabled` is `true`,
the module will create a new log group and use it.
If the list is not empty, the module will use the first ARN in the list. | `list(string)` | `[]` | no | 196 | | [vpn\_connection\_tunnel2\_cloudwatch\_log\_output\_format](#input\_vpn\_connection\_tunnel2\_cloudwatch\_log\_output\_format) | Set log format for the tunnel. Default format is json. Possible values are `json` and `text` | `string` | `"json"` | no | 197 | | [vpn\_connection\_tunnel2\_dpd\_timeout\_action](#input\_vpn\_connection\_tunnel2\_dpd\_timeout\_action) | The action to take after DPD timeout occurs for the second VPN tunnel. Specify restart to restart the IKE initiation. Specify clear to end the IKE session. Valid values are `clear` \| `none` \| `restart` | `string` | `"clear"` | no | 198 | | [vpn\_connection\_tunnel2\_ike\_versions](#input\_vpn\_connection\_tunnel2\_ike\_versions) | The IKE versions that are permitted for the second VPN tunnel. Valid values are `ikev1` \| `ikev2` | `list(string)` | `[]` | no | 199 | | [vpn\_connection\_tunnel2\_inside\_cidr](#input\_vpn\_connection\_tunnel2\_inside\_cidr) | The CIDR block of the inside IP addresses for the second VPN tunnel | `string` | `null` | no | 200 | | [vpn\_connection\_tunnel2\_phase1\_dh\_group\_numbers](#input\_vpn\_connection\_tunnel2\_phase1\_dh\_group\_numbers) | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations.
Valid values are 2 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 22 \| 23 \| 24 | `list(string)` | `[]` | no | 201 | | [vpn\_connection\_tunnel2\_phase1\_encryption\_algorithms](#input\_vpn\_connection\_tunnel2\_phase1\_encryption\_algorithms) | List of one or more encryption algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations.
Valid values are AES128 \| AES256 \| AES128-GCM-16 \| AES256-GCM-16 | `list(string)` | `[]` | no | 202 | | [vpn\_connection\_tunnel2\_phase1\_integrity\_algorithms](#input\_vpn\_connection\_tunnel2\_phase1\_integrity\_algorithms) | One or more integrity algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations.
Valid values are SHA1 \| SHA2-256 \| SHA2-384 \| SHA2-512 | `list(string)` | `[]` | no | 203 | | [vpn\_connection\_tunnel2\_phase1\_lifetime\_seconds](#input\_vpn\_connection\_tunnel2\_phase1\_lifetime\_seconds) | The lifetime for phase 1 of the IKE negotiation for the second VPN tunnel, in seconds. Valid value is between 900 and 28800 | `string` | `"28800"` | no | 204 | | [vpn\_connection\_tunnel2\_phase2\_dh\_group\_numbers](#input\_vpn\_connection\_tunnel2\_phase2\_dh\_group\_numbers) | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations.
Valid values are 2 \| 5 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 22 \| 23 \| 24 | `list(string)` | `[]` | no | 205 | | [vpn\_connection\_tunnel2\_phase2\_encryption\_algorithms](#input\_vpn\_connection\_tunnel2\_phase2\_encryption\_algorithms) | List of one or more encryption algorithms that are permitted for the second VPN tunnel for phase 2 IKE negotiations.
Valid values are AES128 \| AES256 \| AES128-GCM-16 \| AES256-GCM-16 | `list(string)` | `[]` | no | 206 | | [vpn\_connection\_tunnel2\_phase2\_integrity\_algorithms](#input\_vpn\_connection\_tunnel2\_phase2\_integrity\_algorithms) | One or more integrity algorithms that are permitted for the second VPN tunnel for phase 2 IKE negotiations.
Valid values are SHA1 \| SHA2-256 \| SHA2-384 \| SHA2-512 | `list(string)` | `[]` | no | 207 | | [vpn\_connection\_tunnel2\_phase2\_lifetime\_seconds](#input\_vpn\_connection\_tunnel2\_phase2\_lifetime\_seconds) | The lifetime for phase 2 of the IKE negotiation for the second VPN tunnel, in seconds. Valid value is between 900 and 3600 | `string` | `"3600"` | no | 208 | | [vpn\_connection\_tunnel2\_preshared\_key](#input\_vpn\_connection\_tunnel2\_preshared\_key) | The preshared key of the second VPN tunnel. The preshared key must be between 8 and 64 characters in length and cannot start with zero. Allowed characters are alphanumeric characters, periods(.) and underscores(\_) | `string` | `null` | no | 209 | | [vpn\_connection\_tunnel2\_startup\_action](#input\_vpn\_connection\_tunnel2\_startup\_action) | The action to take when the establishing the tunnel for the second VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for AWS to initiate the IKE negotiation. Valid values are `add` \| `start` | `string` | `"add"` | no | 210 | | [vpn\_gateway\_amazon\_side\_asn](#input\_vpn\_gateway\_amazon\_side\_asn) | The Autonomous System Number (ASN) for the Amazon side of the VPN gateway.
If you don't specify an ASN, the Virtual Private Gateway is created with the default ASN. | `number` | `64512` | no | 211 | 212 | ## Outputs 213 | 214 | | Name | Description | 215 | |------|-------------| 216 | | [customer\_gateway\_device\_name](#output\_customer\_gateway\_device\_name) | Customer Gateway Device Name | 217 | | [customer\_gateway\_id](#output\_customer\_gateway\_id) | Customer Gateway ID | 218 | | [transit\_gateway\_attachment\_id](#output\_transit\_gateway\_attachment\_id) | The ID of the transit gateway attachment for the VPN connection (if a TGW connection) | 219 | | [vpn\_acceleration\_enabled](#output\_vpn\_acceleration\_enabled) | Whether the VPN connection is enabled for acceleration | 220 | | [vpn\_connection\_customer\_gateway\_configuration](#output\_vpn\_connection\_customer\_gateway\_configuration) | The configuration information for the VPN connection's Customer Gateway (in the native XML format) | 221 | | [vpn\_connection\_id](#output\_vpn\_connection\_id) | VPN Connection ID | 222 | | [vpn\_connection\_tunnel1\_address](#output\_vpn\_connection\_tunnel1\_address) | The public IP address of the first VPN tunnel | 223 | | [vpn\_connection\_tunnel1\_cgw\_inside\_address](#output\_vpn\_connection\_tunnel1\_cgw\_inside\_address) | The RFC 6890 link-local address of the first VPN tunnel (Customer Gateway side) | 224 | | [vpn\_connection\_tunnel1\_log\_group\_arn](#output\_vpn\_connection\_tunnel1\_log\_group\_arn) | The CloudWatch Log Group ARN for the tunnel 1 logs | 225 | | [vpn\_connection\_tunnel1\_vgw\_inside\_address](#output\_vpn\_connection\_tunnel1\_vgw\_inside\_address) | The RFC 6890 link-local address of the first VPN tunnel (Virtual Private Gateway side) | 226 | | [vpn\_connection\_tunnel2\_address](#output\_vpn\_connection\_tunnel2\_address) | The public IP address of the second VPN tunnel | 227 | | [vpn\_connection\_tunnel2\_cgw\_inside\_address](#output\_vpn\_connection\_tunnel2\_cgw\_inside\_address) | The RFC 6890 link-local address of the second VPN tunnel (Customer Gateway side) | 228 | | [vpn\_connection\_tunnel2\_log\_group\_arn](#output\_vpn\_connection\_tunnel2\_log\_group\_arn) | The CloudWatch Log Group ARN for the tunnel 2 logs | 229 | | [vpn\_connection\_tunnel2\_vgw\_inside\_address](#output\_vpn\_connection\_tunnel2\_vgw\_inside\_address) | The RFC 6890 link-local address of the second VPN tunnel (Virtual Private Gateway side) | 230 | | [vpn\_gateway\_id](#output\_vpn\_gateway\_id) | Virtual Private Gateway ID | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | ## Related Projects 240 | 241 | Check out these related projects. 242 | 243 | - [terraform-aws-vpc](https://github.com/cloudposse/terraform-aws-vpc) - Terraform module that defines a VPC with public/private subnets across multiple AZs with Internet Gateways 244 | - [terraform-aws-vpc-peering](https://github.com/cloudposse/terraform-aws-vpc-peering) - Terraform module to create a peering connection between two VPCs 245 | - [terraform-aws-kops-vpc-peering](https://github.com/cloudposse/terraform-aws-kops-vpc-peering) - Terraform module to create a peering connection between a backing services VPC and a VPC created by Kops 246 | - [terraform-aws-dynamic-subnets](https://github.com/cloudposse/terraform-aws-dynamic-subnets) - Terraform module for public and private subnets provisioning in existing VPC 247 | - [terraform-aws-multi-az-subnets](https://github.com/cloudposse/terraform-aws-multi-az-subnets) - Terraform module for multi-AZ public and private subnets provisioning 248 | - [terraform-aws-named-subnets](https://github.com/cloudposse/terraform-aws-named-subnets) - Terraform module for named subnets provisioning 249 | 250 | 251 | > [!TIP] 252 | > #### Use Terraform Reference Architectures for AWS 253 | > 254 | > Use Cloud Posse's ready-to-go [terraform architecture blueprints](https://cloudposse.com/reference-architecture/) for AWS to get up and running quickly. 255 | > 256 | > ✅ We build it together with your team.
257 | > ✅ Your team owns everything.
258 | > ✅ 100% Open Source and backed by fanatical support.
259 | > 260 | > Request Quote 261 | >
📚 Learn More 262 | > 263 | >
264 | > 265 | > Cloud Posse is the leading [**DevOps Accelerator**](https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-vpn-connection&utm_content=commercial_support) for funded startups and enterprises. 266 | > 267 | > *Your team can operate like a pro today.* 268 | > 269 | > Ensure that your team succeeds by using Cloud Posse's proven process and turnkey blueprints. Plus, we stick around until you succeed. 270 | > #### Day-0: Your Foundation for Success 271 | > - **Reference Architecture.** You'll get everything you need from the ground up built using 100% infrastructure as code. 272 | > - **Deployment Strategy.** Adopt a proven deployment strategy with GitHub Actions, enabling automated, repeatable, and reliable software releases. 273 | > - **Site Reliability Engineering.** Gain total visibility into your applications and services with Datadog, ensuring high availability and performance. 274 | > - **Security Baseline.** Establish a secure environment from the start, with built-in governance, accountability, and comprehensive audit logs, safeguarding your operations. 275 | > - **GitOps.** Empower your team to manage infrastructure changes confidently and efficiently through Pull Requests, leveraging the full power of GitHub Actions. 276 | > 277 | > Request Quote 278 | > 279 | > #### Day-2: Your Operational Mastery 280 | > - **Training.** Equip your team with the knowledge and skills to confidently manage the infrastructure, ensuring long-term success and self-sufficiency. 281 | > - **Support.** Benefit from a seamless communication over Slack with our experts, ensuring you have the support you need, whenever you need it. 282 | > - **Troubleshooting.** Access expert assistance to quickly resolve any operational challenges, minimizing downtime and maintaining business continuity. 283 | > - **Code Reviews.** Enhance your team’s code quality with our expert feedback, fostering continuous improvement and collaboration. 284 | > - **Bug Fixes.** Rely on our team to troubleshoot and resolve any issues, ensuring your systems run smoothly. 285 | > - **Migration Assistance.** Accelerate your migration process with our dedicated support, minimizing disruption and speeding up time-to-value. 286 | > - **Customer Workshops.** Engage with our team in weekly workshops, gaining insights and strategies to continuously improve and innovate. 287 | > 288 | > Request Quote 289 | >
290 | 291 | ## ✨ Contributing 292 | 293 | This project is under active development, and we encourage contributions from our community. 294 | 295 | 296 | 297 | Many thanks to our outstanding contributors: 298 | 299 | 300 | 301 | 302 | 303 | For 🐛 bug reports & feature requests, please use the [issue tracker](https://github.com/cloudposse/terraform-aws-vpn-connection/issues). 304 | 305 | In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. 306 | 1. Review our [Code of Conduct](https://github.com/cloudposse/terraform-aws-vpn-connection/?tab=coc-ov-file#code-of-conduct) and [Contributor Guidelines](https://github.com/cloudposse/.github/blob/main/CONTRIBUTING.md). 307 | 2. **Fork** the repo on GitHub 308 | 3. **Clone** the project to your own machine 309 | 4. **Commit** changes to your own branch 310 | 5. **Push** your work back up to your fork 311 | 6. Submit a **Pull Request** so that we can review your changes 312 | 313 | **NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request!## Running Terraform Tests 314 | 315 | We use [Atmos](https://atmos.tools) to streamline how Terraform tests are run. It centralizes configuration and wraps common test workflows with easy-to-use commands. 316 | 317 | All tests are located in the [`test/`](test) folder. 318 | 319 | Under the hood, tests are powered by Terratest together with our internal [Test Helpers](https://github.com/cloudposse/test-helpers) library, providing robust infrastructure validation. 320 | 321 | Setup dependencies: 322 | - Install Atmos ([installation guide](https://atmos.tools/install/)) 323 | - Install Go [1.24+ or newer](https://go.dev/doc/install) 324 | - Install Terraform or OpenTofu 325 | 326 | To run tests: 327 | 328 | - Run all tests: 329 | ```sh 330 | atmos test run 331 | ``` 332 | - Clean up test artifacts: 333 | ```sh 334 | atmos test clean 335 | ``` 336 | - Explore additional test options: 337 | ```sh 338 | atmos test --help 339 | ``` 340 | The configuration for test commands is centrally managed. To review what's being imported, see the [`atmos.yaml`](https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml) file. 341 | 342 | Learn more about our [automated testing in our documentation](https://docs.cloudposse.com/community/contribute/automated-testing/) or implementing [custom commands](https://atmos.tools/core-concepts/custom-commands/) with atmos. 343 | 344 | ### 🌎 Slack Community 345 | 346 | Join our [Open Source Community](https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-vpn-connection&utm_content=slack) on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure. 347 | 348 | ### 📰 Newsletter 349 | 350 | Sign up for [our newsletter](https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-vpn-connection&utm_content=newsletter) and join 3,000+ DevOps engineers, CTOs, and founders who get insider access to the latest DevOps trends, so you can always stay in the know. 351 | Dropped straight into your Inbox every week — and usually a 5-minute read. 352 | 353 | ### 📆 Office Hours 354 | 355 | [Join us every Wednesday via Zoom](https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-vpn-connection&utm_content=office_hours) for your weekly dose of insider DevOps trends, AWS news and Terraform insights, all sourced from our SweetOps community, plus a _live Q&A_ that you can’t find anywhere else. 356 | It's **FREE** for everyone! 357 | ## License 358 | 359 | License 360 | 361 |
362 | Preamble to the Apache License, Version 2.0 363 |
364 |
365 | 366 | Complete license is available in the [`LICENSE`](LICENSE) file. 367 | 368 | ```text 369 | Licensed to the Apache Software Foundation (ASF) under one 370 | or more contributor license agreements. See the NOTICE file 371 | distributed with this work for additional information 372 | regarding copyright ownership. The ASF licenses this file 373 | to you under the Apache License, Version 2.0 (the 374 | "License"); you may not use this file except in compliance 375 | with the License. You may obtain a copy of the License at 376 | 377 | https://www.apache.org/licenses/LICENSE-2.0 378 | 379 | Unless required by applicable law or agreed to in writing, 380 | software distributed under the License is distributed on an 381 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 382 | KIND, either express or implied. See the License for the 383 | specific language governing permissions and limitations 384 | under the License. 385 | ``` 386 |
387 | 388 | ## Trademarks 389 | 390 | All other trademarks referenced herein are the property of their respective owners. 391 | 392 | 393 | --- 394 | Copyright © 2017-2025 [Cloud Posse, LLC](https://cpco.io/copyright) 395 | 396 | 397 | README footer 398 | 399 | Beacon 400 | -------------------------------------------------------------------------------- /README.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # This is the canonical configuration for the `README.md` 3 | # Run `make readme` to rebuild the `README.md` 4 | # 5 | 6 | # Name of this project 7 | name: terraform-aws-vpn-connection 8 | # Tags of this project 9 | tags: 10 | - aws 11 | - terraform 12 | - terraform-modules 13 | - vpc 14 | - subnet 15 | - route 16 | - route-table 17 | - vpn 18 | - vpn-connection 19 | - site-to-site-vpn-connection 20 | - virtual-private-gateway 21 | - customer-gateway 22 | - ip 23 | - ip-address 24 | # Categories of this project 25 | categories: 26 | - terraform-modules/networking 27 | # Logo for this project 28 | #logo: docs/logo.png 29 | 30 | # License of this project 31 | license: "APACHE2" 32 | # Canonical GitHub repo 33 | github_repo: cloudposse/terraform-aws-vpn-connection 34 | # Badges to display 35 | badges: 36 | - name: Latest Release 37 | image: https://img.shields.io/github/release/cloudposse/terraform-aws-vpn-connection.svg?style=for-the-badge 38 | url: https://github.com/cloudposse/terraform-aws-vpn-connection/releases/latest 39 | - name: Last Updated 40 | image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-vpn-connection.svg?style=for-the-badge 41 | url: https://github.com/cloudposse/terraform-aws-vpn-connection/commits 42 | - name: Slack Community 43 | image: https://slack.cloudposse.com/for-the-badge.svg 44 | url: https://cloudposse.com/slack 45 | 46 | # List any related terraform modules that this module may be used with or that this module depends on. 47 | related: 48 | - name: "terraform-aws-vpc" 49 | description: "Terraform module that defines a VPC with public/private subnets across multiple AZs with Internet Gateways" 50 | url: "https://github.com/cloudposse/terraform-aws-vpc" 51 | - name: "terraform-aws-vpc-peering" 52 | description: "Terraform module to create a peering connection between two VPCs" 53 | url: "https://github.com/cloudposse/terraform-aws-vpc-peering" 54 | - name: "terraform-aws-kops-vpc-peering" 55 | description: "Terraform module to create a peering connection between a backing services VPC and a VPC created by Kops" 56 | url: "https://github.com/cloudposse/terraform-aws-kops-vpc-peering" 57 | - name: "terraform-aws-dynamic-subnets" 58 | description: "Terraform module for public and private subnets provisioning in existing VPC" 59 | url: "https://github.com/cloudposse/terraform-aws-dynamic-subnets" 60 | - name: "terraform-aws-multi-az-subnets" 61 | description: "Terraform module for multi-AZ public and private subnets provisioning" 62 | url: "https://github.com/cloudposse/terraform-aws-multi-az-subnets" 63 | - name: "terraform-aws-named-subnets" 64 | description: "Terraform module for named subnets provisioning" 65 | url: "https://github.com/cloudposse/terraform-aws-named-subnets" 66 | # Short description of this project 67 | description: |- 68 | Terraform module to provision a [site-to-site](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) [VPN connection](https://docs.aws.amazon.com/vpc/latest/userguide/vpn-connections.html) 69 | between a VPC and an on-premises network. 70 | 71 | The module can do the following: 72 | 73 | - Create a Virtual Private Gateway (VPG) and attach it to the VPC 74 | - Create a Customer Gateway (CGW) pointing to the provided Internet-routable IP address of the external interface on the on-premises network 75 | - Create a Site-to-Site Virtual Private Network (VPN) connection 76 | - Request automatic route propagation between the VPG and the provided route tables in the VPC 77 | - If the VPN connection is configured to use static routes, provision a static route between the VPN connection and the CGW 78 | 79 | Exactly what it does depends on the input parameters. The module is designed to be flexible and can be used in a variety of scenarios. 80 | 81 | - If you supply `customer_gateway_ip_address` and set `transit_gateway_enabled` to `true`, 82 | the module will create a CGW, then create a VPN connection, and then assign the connection to 83 | the Transit Gateway identified by `existing_transit_gateway_id` and the created CGW 84 | - If you supply `customer_gateway_ip_address` and set `transit_gateway_enabled` to `false`, 85 | the module will create a VPG and CGW, then create a VPN connection, and then assign it to the VPG and CGW 86 | - If you do not supply `customer_gateway_ip_address` (set it to `null`) then the module will only create a VPG 87 | 88 | The module also provides some options for adding routes to the VPC or TGW route tables. You need to use 89 | the options that correspond to the kind of attachment point (VPC or TGW) you are using. 90 | 91 | # How to use this project 92 | usage: |- 93 | ```hcl 94 | module "vpn_connection" { 95 | source = "cloudposse/vpn-connection/aws" 96 | # Cloud Posse recommends pinning every module to a specific version 97 | # version = "x.x.x" 98 | namespace = "eg" 99 | stage = "dev" 100 | name = "test" 101 | vpc_id = "vpc-xxxxxxxx" 102 | vpn_gateway_amazon_side_asn = 64512 103 | customer_gateway_bgp_asn = 65000 104 | customer_gateway_ip_address = "172.0.0.1" 105 | route_table_ids = ["rtb-xxxxxxxx", "rtb-yyyyyyyy", "rtb-zzzzzzzz"] 106 | vpn_connection_static_routes_only = "true" 107 | vpn_connection_static_routes_destinations = ["10.80.1.0/24"] 108 | } 109 | ``` 110 | include: [] 111 | contributors: [] 112 | -------------------------------------------------------------------------------- /atmos.yaml: -------------------------------------------------------------------------------- 1 | # Atmos Configuration — powered by https://atmos.tools 2 | # 3 | # This configuration enables centralized, DRY, and consistent project scaffolding using Atmos. 4 | # 5 | # Included features: 6 | # - Organizational custom commands: https://atmos.tools/core-concepts/custom-commands 7 | # - Automated README generation: https://atmos.tools/cli/commands/docs/generate 8 | # 9 | 10 | # Import shared configuration used by all modules 11 | import: 12 | - https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml 13 | -------------------------------------------------------------------------------- /context.tf: -------------------------------------------------------------------------------- 1 | # 2 | # ONLY EDIT THIS FILE IN github.com/cloudposse/terraform-null-label 3 | # All other instances of this file should be a copy of that one 4 | # 5 | # 6 | # Copy this file from https://github.com/cloudposse/terraform-null-label/blob/master/exports/context.tf 7 | # and then place it in your Terraform module to automatically get 8 | # Cloud Posse's standard configuration inputs suitable for passing 9 | # to Cloud Posse modules. 10 | # 11 | # curl -sL https://raw.githubusercontent.com/cloudposse/terraform-null-label/master/exports/context.tf -o context.tf 12 | # 13 | # Modules should access the whole context as `module.this.context` 14 | # to get the input variables with nulls for defaults, 15 | # for example `context = module.this.context`, 16 | # and access individual variables as `module.this.`, 17 | # with final values filled in. 18 | # 19 | # For example, when using defaults, `module.this.context.delimiter` 20 | # will be null, and `module.this.delimiter` will be `-` (hyphen). 21 | # 22 | 23 | module "this" { 24 | source = "cloudposse/label/null" 25 | version = "0.25.0" # requires Terraform >= 0.13.0 26 | 27 | enabled = var.enabled 28 | namespace = var.namespace 29 | tenant = var.tenant 30 | environment = var.environment 31 | stage = var.stage 32 | name = var.name 33 | delimiter = var.delimiter 34 | attributes = var.attributes 35 | tags = var.tags 36 | additional_tag_map = var.additional_tag_map 37 | label_order = var.label_order 38 | regex_replace_chars = var.regex_replace_chars 39 | id_length_limit = var.id_length_limit 40 | label_key_case = var.label_key_case 41 | label_value_case = var.label_value_case 42 | descriptor_formats = var.descriptor_formats 43 | labels_as_tags = var.labels_as_tags 44 | 45 | context = var.context 46 | } 47 | 48 | # Copy contents of cloudposse/terraform-null-label/variables.tf here 49 | 50 | variable "context" { 51 | type = any 52 | default = { 53 | enabled = true 54 | namespace = null 55 | tenant = null 56 | environment = null 57 | stage = null 58 | name = null 59 | delimiter = null 60 | attributes = [] 61 | tags = {} 62 | additional_tag_map = {} 63 | regex_replace_chars = null 64 | label_order = [] 65 | id_length_limit = null 66 | label_key_case = null 67 | label_value_case = null 68 | descriptor_formats = {} 69 | # Note: we have to use [] instead of null for unset lists due to 70 | # https://github.com/hashicorp/terraform/issues/28137 71 | # which was not fixed until Terraform 1.0.0, 72 | # but we want the default to be all the labels in `label_order` 73 | # and we want users to be able to prevent all tag generation 74 | # by setting `labels_as_tags` to `[]`, so we need 75 | # a different sentinel to indicate "default" 76 | labels_as_tags = ["unset"] 77 | } 78 | description = <<-EOT 79 | Single object for setting entire context at once. 80 | See description of individual variables for details. 81 | Leave string and numeric variables as `null` to use default value. 82 | Individual variable settings (non-null) override settings in context object, 83 | except for attributes, tags, and additional_tag_map, which are merged. 84 | EOT 85 | 86 | validation { 87 | condition = lookup(var.context, "label_key_case", null) == null ? true : contains(["lower", "title", "upper"], var.context["label_key_case"]) 88 | error_message = "Allowed values: `lower`, `title`, `upper`." 89 | } 90 | 91 | validation { 92 | condition = lookup(var.context, "label_value_case", null) == null ? true : contains(["lower", "title", "upper", "none"], var.context["label_value_case"]) 93 | error_message = "Allowed values: `lower`, `title`, `upper`, `none`." 94 | } 95 | } 96 | 97 | variable "enabled" { 98 | type = bool 99 | default = null 100 | description = "Set to false to prevent the module from creating any resources" 101 | } 102 | 103 | variable "namespace" { 104 | type = string 105 | default = null 106 | description = "ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique" 107 | } 108 | 109 | variable "tenant" { 110 | type = string 111 | default = null 112 | description = "ID element _(Rarely used, not included by default)_. A customer identifier, indicating who this instance of a resource is for" 113 | } 114 | 115 | variable "environment" { 116 | type = string 117 | default = null 118 | description = "ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'" 119 | } 120 | 121 | variable "stage" { 122 | type = string 123 | default = null 124 | description = "ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'" 125 | } 126 | 127 | variable "name" { 128 | type = string 129 | default = null 130 | description = <<-EOT 131 | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. 132 | This is the only ID element not also included as a `tag`. 133 | The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. 134 | EOT 135 | } 136 | 137 | variable "delimiter" { 138 | type = string 139 | default = null 140 | description = <<-EOT 141 | Delimiter to be used between ID elements. 142 | Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. 143 | EOT 144 | } 145 | 146 | variable "attributes" { 147 | type = list(string) 148 | default = [] 149 | description = <<-EOT 150 | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, 151 | in the order they appear in the list. New attributes are appended to the 152 | end of the list. The elements of the list are joined by the `delimiter` 153 | and treated as a single ID element. 154 | EOT 155 | } 156 | 157 | variable "labels_as_tags" { 158 | type = set(string) 159 | default = ["default"] 160 | description = <<-EOT 161 | Set of labels (ID elements) to include as tags in the `tags` output. 162 | Default is to include all labels. 163 | Tags with empty values will not be included in the `tags` output. 164 | Set to `[]` to suppress all generated tags. 165 | **Notes:** 166 | The value of the `name` tag, if included, will be the `id`, not the `name`. 167 | Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be 168 | changed in later chained modules. Attempts to change it will be silently ignored. 169 | EOT 170 | } 171 | 172 | variable "tags" { 173 | type = map(string) 174 | default = {} 175 | description = <<-EOT 176 | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). 177 | Neither the tag keys nor the tag values will be modified by this module. 178 | EOT 179 | } 180 | 181 | variable "additional_tag_map" { 182 | type = map(string) 183 | default = {} 184 | description = <<-EOT 185 | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`. 186 | This is for some rare cases where resources want additional configuration of tags 187 | and therefore take a list of maps with tag key, value, and additional configuration. 188 | EOT 189 | } 190 | 191 | variable "label_order" { 192 | type = list(string) 193 | default = null 194 | description = <<-EOT 195 | The order in which the labels (ID elements) appear in the `id`. 196 | Defaults to ["namespace", "environment", "stage", "name", "attributes"]. 197 | You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. 198 | EOT 199 | } 200 | 201 | variable "regex_replace_chars" { 202 | type = string 203 | default = null 204 | description = <<-EOT 205 | Terraform regular expression (regex) string. 206 | Characters matching the regex will be removed from the ID elements. 207 | If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. 208 | EOT 209 | } 210 | 211 | variable "id_length_limit" { 212 | type = number 213 | default = null 214 | description = <<-EOT 215 | Limit `id` to this many characters (minimum 6). 216 | Set to `0` for unlimited length. 217 | Set to `null` for keep the existing setting, which defaults to `0`. 218 | Does not affect `id_full`. 219 | EOT 220 | validation { 221 | condition = var.id_length_limit == null ? true : var.id_length_limit >= 6 || var.id_length_limit == 0 222 | error_message = "The id_length_limit must be >= 6 if supplied (not null), or 0 for unlimited length." 223 | } 224 | } 225 | 226 | variable "label_key_case" { 227 | type = string 228 | default = null 229 | description = <<-EOT 230 | Controls the letter case of the `tags` keys (label names) for tags generated by this module. 231 | Does not affect keys of tags passed in via the `tags` input. 232 | Possible values: `lower`, `title`, `upper`. 233 | Default value: `title`. 234 | EOT 235 | 236 | validation { 237 | condition = var.label_key_case == null ? true : contains(["lower", "title", "upper"], var.label_key_case) 238 | error_message = "Allowed values: `lower`, `title`, `upper`." 239 | } 240 | } 241 | 242 | variable "label_value_case" { 243 | type = string 244 | default = null 245 | description = <<-EOT 246 | Controls the letter case of ID elements (labels) as included in `id`, 247 | set as tag values, and output by this module individually. 248 | Does not affect values of tags passed in via the `tags` input. 249 | Possible values: `lower`, `title`, `upper` and `none` (no transformation). 250 | Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs. 251 | Default value: `lower`. 252 | EOT 253 | 254 | validation { 255 | condition = var.label_value_case == null ? true : contains(["lower", "title", "upper", "none"], var.label_value_case) 256 | error_message = "Allowed values: `lower`, `title`, `upper`, `none`." 257 | } 258 | } 259 | 260 | variable "descriptor_formats" { 261 | type = any 262 | default = {} 263 | description = <<-EOT 264 | Describe additional descriptors to be output in the `descriptors` output map. 265 | Map of maps. Keys are names of descriptors. Values are maps of the form 266 | `{ 267 | format = string 268 | labels = list(string) 269 | }` 270 | (Type is `any` so the map values can later be enhanced to provide additional options.) 271 | `format` is a Terraform format string to be passed to the `format()` function. 272 | `labels` is a list of labels, in order, to pass to `format()` function. 273 | Label values will be normalized before being passed to `format()` so they will be 274 | identical to how they appear in `id`. 275 | Default is `{}` (`descriptors` output will be empty). 276 | EOT 277 | } 278 | 279 | #### End of copy of cloudposse/terraform-null-label/variables.tf 280 | -------------------------------------------------------------------------------- /examples/complete/context.tf: -------------------------------------------------------------------------------- 1 | # 2 | # ONLY EDIT THIS FILE IN github.com/cloudposse/terraform-null-label 3 | # All other instances of this file should be a copy of that one 4 | # 5 | # 6 | # Copy this file from https://github.com/cloudposse/terraform-null-label/blob/master/exports/context.tf 7 | # and then place it in your Terraform module to automatically get 8 | # Cloud Posse's standard configuration inputs suitable for passing 9 | # to Cloud Posse modules. 10 | # 11 | # curl -sL https://raw.githubusercontent.com/cloudposse/terraform-null-label/master/exports/context.tf -o context.tf 12 | # 13 | # Modules should access the whole context as `module.this.context` 14 | # to get the input variables with nulls for defaults, 15 | # for example `context = module.this.context`, 16 | # and access individual variables as `module.this.`, 17 | # with final values filled in. 18 | # 19 | # For example, when using defaults, `module.this.context.delimiter` 20 | # will be null, and `module.this.delimiter` will be `-` (hyphen). 21 | # 22 | 23 | module "this" { 24 | source = "cloudposse/label/null" 25 | version = "0.25.0" # requires Terraform >= 0.13.0 26 | 27 | enabled = var.enabled 28 | namespace = var.namespace 29 | tenant = var.tenant 30 | environment = var.environment 31 | stage = var.stage 32 | name = var.name 33 | delimiter = var.delimiter 34 | attributes = var.attributes 35 | tags = var.tags 36 | additional_tag_map = var.additional_tag_map 37 | label_order = var.label_order 38 | regex_replace_chars = var.regex_replace_chars 39 | id_length_limit = var.id_length_limit 40 | label_key_case = var.label_key_case 41 | label_value_case = var.label_value_case 42 | descriptor_formats = var.descriptor_formats 43 | labels_as_tags = var.labels_as_tags 44 | 45 | context = var.context 46 | } 47 | 48 | # Copy contents of cloudposse/terraform-null-label/variables.tf here 49 | 50 | variable "context" { 51 | type = any 52 | default = { 53 | enabled = true 54 | namespace = null 55 | tenant = null 56 | environment = null 57 | stage = null 58 | name = null 59 | delimiter = null 60 | attributes = [] 61 | tags = {} 62 | additional_tag_map = {} 63 | regex_replace_chars = null 64 | label_order = [] 65 | id_length_limit = null 66 | label_key_case = null 67 | label_value_case = null 68 | descriptor_formats = {} 69 | # Note: we have to use [] instead of null for unset lists due to 70 | # https://github.com/hashicorp/terraform/issues/28137 71 | # which was not fixed until Terraform 1.0.0, 72 | # but we want the default to be all the labels in `label_order` 73 | # and we want users to be able to prevent all tag generation 74 | # by setting `labels_as_tags` to `[]`, so we need 75 | # a different sentinel to indicate "default" 76 | labels_as_tags = ["unset"] 77 | } 78 | description = <<-EOT 79 | Single object for setting entire context at once. 80 | See description of individual variables for details. 81 | Leave string and numeric variables as `null` to use default value. 82 | Individual variable settings (non-null) override settings in context object, 83 | except for attributes, tags, and additional_tag_map, which are merged. 84 | EOT 85 | 86 | validation { 87 | condition = lookup(var.context, "label_key_case", null) == null ? true : contains(["lower", "title", "upper"], var.context["label_key_case"]) 88 | error_message = "Allowed values: `lower`, `title`, `upper`." 89 | } 90 | 91 | validation { 92 | condition = lookup(var.context, "label_value_case", null) == null ? true : contains(["lower", "title", "upper", "none"], var.context["label_value_case"]) 93 | error_message = "Allowed values: `lower`, `title`, `upper`, `none`." 94 | } 95 | } 96 | 97 | variable "enabled" { 98 | type = bool 99 | default = null 100 | description = "Set to false to prevent the module from creating any resources" 101 | } 102 | 103 | variable "namespace" { 104 | type = string 105 | default = null 106 | description = "ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique" 107 | } 108 | 109 | variable "tenant" { 110 | type = string 111 | default = null 112 | description = "ID element _(Rarely used, not included by default)_. A customer identifier, indicating who this instance of a resource is for" 113 | } 114 | 115 | variable "environment" { 116 | type = string 117 | default = null 118 | description = "ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'" 119 | } 120 | 121 | variable "stage" { 122 | type = string 123 | default = null 124 | description = "ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'" 125 | } 126 | 127 | variable "name" { 128 | type = string 129 | default = null 130 | description = <<-EOT 131 | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. 132 | This is the only ID element not also included as a `tag`. 133 | The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. 134 | EOT 135 | } 136 | 137 | variable "delimiter" { 138 | type = string 139 | default = null 140 | description = <<-EOT 141 | Delimiter to be used between ID elements. 142 | Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. 143 | EOT 144 | } 145 | 146 | variable "attributes" { 147 | type = list(string) 148 | default = [] 149 | description = <<-EOT 150 | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, 151 | in the order they appear in the list. New attributes are appended to the 152 | end of the list. The elements of the list are joined by the `delimiter` 153 | and treated as a single ID element. 154 | EOT 155 | } 156 | 157 | variable "labels_as_tags" { 158 | type = set(string) 159 | default = ["default"] 160 | description = <<-EOT 161 | Set of labels (ID elements) to include as tags in the `tags` output. 162 | Default is to include all labels. 163 | Tags with empty values will not be included in the `tags` output. 164 | Set to `[]` to suppress all generated tags. 165 | **Notes:** 166 | The value of the `name` tag, if included, will be the `id`, not the `name`. 167 | Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be 168 | changed in later chained modules. Attempts to change it will be silently ignored. 169 | EOT 170 | } 171 | 172 | variable "tags" { 173 | type = map(string) 174 | default = {} 175 | description = <<-EOT 176 | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). 177 | Neither the tag keys nor the tag values will be modified by this module. 178 | EOT 179 | } 180 | 181 | variable "additional_tag_map" { 182 | type = map(string) 183 | default = {} 184 | description = <<-EOT 185 | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`. 186 | This is for some rare cases where resources want additional configuration of tags 187 | and therefore take a list of maps with tag key, value, and additional configuration. 188 | EOT 189 | } 190 | 191 | variable "label_order" { 192 | type = list(string) 193 | default = null 194 | description = <<-EOT 195 | The order in which the labels (ID elements) appear in the `id`. 196 | Defaults to ["namespace", "environment", "stage", "name", "attributes"]. 197 | You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. 198 | EOT 199 | } 200 | 201 | variable "regex_replace_chars" { 202 | type = string 203 | default = null 204 | description = <<-EOT 205 | Terraform regular expression (regex) string. 206 | Characters matching the regex will be removed from the ID elements. 207 | If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. 208 | EOT 209 | } 210 | 211 | variable "id_length_limit" { 212 | type = number 213 | default = null 214 | description = <<-EOT 215 | Limit `id` to this many characters (minimum 6). 216 | Set to `0` for unlimited length. 217 | Set to `null` for keep the existing setting, which defaults to `0`. 218 | Does not affect `id_full`. 219 | EOT 220 | validation { 221 | condition = var.id_length_limit == null ? true : var.id_length_limit >= 6 || var.id_length_limit == 0 222 | error_message = "The id_length_limit must be >= 6 if supplied (not null), or 0 for unlimited length." 223 | } 224 | } 225 | 226 | variable "label_key_case" { 227 | type = string 228 | default = null 229 | description = <<-EOT 230 | Controls the letter case of the `tags` keys (label names) for tags generated by this module. 231 | Does not affect keys of tags passed in via the `tags` input. 232 | Possible values: `lower`, `title`, `upper`. 233 | Default value: `title`. 234 | EOT 235 | 236 | validation { 237 | condition = var.label_key_case == null ? true : contains(["lower", "title", "upper"], var.label_key_case) 238 | error_message = "Allowed values: `lower`, `title`, `upper`." 239 | } 240 | } 241 | 242 | variable "label_value_case" { 243 | type = string 244 | default = null 245 | description = <<-EOT 246 | Controls the letter case of ID elements (labels) as included in `id`, 247 | set as tag values, and output by this module individually. 248 | Does not affect values of tags passed in via the `tags` input. 249 | Possible values: `lower`, `title`, `upper` and `none` (no transformation). 250 | Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs. 251 | Default value: `lower`. 252 | EOT 253 | 254 | validation { 255 | condition = var.label_value_case == null ? true : contains(["lower", "title", "upper", "none"], var.label_value_case) 256 | error_message = "Allowed values: `lower`, `title`, `upper`, `none`." 257 | } 258 | } 259 | 260 | variable "descriptor_formats" { 261 | type = any 262 | default = {} 263 | description = <<-EOT 264 | Describe additional descriptors to be output in the `descriptors` output map. 265 | Map of maps. Keys are names of descriptors. Values are maps of the form 266 | `{ 267 | format = string 268 | labels = list(string) 269 | }` 270 | (Type is `any` so the map values can later be enhanced to provide additional options.) 271 | `format` is a Terraform format string to be passed to the `format()` function. 272 | `labels` is a list of labels, in order, to pass to `format()` function. 273 | Label values will be normalized before being passed to `format()` so they will be 274 | identical to how they appear in `id`. 275 | Default is `{}` (`descriptors` output will be empty). 276 | EOT 277 | } 278 | 279 | #### End of copy of cloudposse/terraform-null-label/variables.tf 280 | -------------------------------------------------------------------------------- /examples/complete/fixtures.us-east-2.tfvars: -------------------------------------------------------------------------------- 1 | region = "us-east-2" 2 | 3 | namespace = "eg" 4 | 5 | stage = "test" 6 | 7 | name = "vpn-connection" 8 | 9 | vpc_id = "" 10 | vpn_gateway_amazon_side_asn = 64512 11 | customer_gateway_bgp_asn = 65000 12 | customer_gateway_ip_address = "172.0.0.1" 13 | route_table_ids = [] 14 | vpn_connection_static_routes_only = true 15 | vpn_connection_static_routes_destinations = ["10.80.1.0/24"] 16 | vpn_connection_tunnel1_inside_cidr = null 17 | vpn_connection_tunnel2_inside_cidr = null 18 | vpn_connection_tunnel1_preshared_key = null 19 | vpn_connection_tunnel2_preshared_key = null 20 | -------------------------------------------------------------------------------- /examples/complete/main.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | region = var.region 3 | } 4 | 5 | module "vpn_connection" { 6 | source = "../../" 7 | 8 | vpc_id = var.vpc_id 9 | vpn_gateway_amazon_side_asn = var.vpn_gateway_amazon_side_asn 10 | customer_gateway_bgp_asn = var.customer_gateway_bgp_asn 11 | customer_gateway_ip_address = var.customer_gateway_ip_address 12 | route_table_ids = var.route_table_ids 13 | vpn_connection_static_routes_only = var.vpn_connection_static_routes_only 14 | vpn_connection_static_routes_destinations = var.vpn_connection_static_routes_destinations 15 | vpn_connection_tunnel1_inside_cidr = var.vpn_connection_tunnel1_inside_cidr 16 | vpn_connection_tunnel2_inside_cidr = var.vpn_connection_tunnel2_inside_cidr 17 | vpn_connection_tunnel1_preshared_key = var.vpn_connection_tunnel1_preshared_key 18 | vpn_connection_tunnel2_preshared_key = var.vpn_connection_tunnel2_preshared_key 19 | 20 | context = module.this.context 21 | } 22 | -------------------------------------------------------------------------------- /examples/complete/outputs.tf: -------------------------------------------------------------------------------- 1 | output "vpn_gateway_id" { 2 | description = "Virtual Private Gateway ID" 3 | value = module.vpn_connection.vpn_connection_id 4 | } 5 | 6 | output "customer_gateway_id" { 7 | description = "Customer Gateway ID" 8 | value = module.vpn_connection.customer_gateway_id 9 | } 10 | 11 | output "vpn_connection_id" { 12 | description = "VPN Connection ID" 13 | value = module.vpn_connection.vpn_connection_id 14 | } 15 | 16 | output "vpn_connection_customer_gateway_configuration" { 17 | description = "The configuration information for the VPN connection's Customer Gateway (in the native XML format)" 18 | sensitive = true 19 | value = module.vpn_connection.vpn_connection_customer_gateway_configuration 20 | } 21 | 22 | output "vpn_connection_tunnel1_address" { 23 | description = "The public IP address of the first VPN tunnel" 24 | value = module.vpn_connection.vpn_connection_tunnel1_address 25 | } 26 | 27 | output "vpn_connection_tunnel1_cgw_inside_address" { 28 | description = "The RFC 6890 link-local address of the first VPN tunnel (Customer Gateway side)" 29 | value = module.vpn_connection.vpn_connection_tunnel1_cgw_inside_address 30 | } 31 | 32 | output "vpn_connection_tunnel1_vgw_inside_address" { 33 | description = "The RFC 6890 link-local address of the first VPN tunnel (Virtual Private Gateway side)" 34 | value = module.vpn_connection.vpn_connection_tunnel1_vgw_inside_address 35 | } 36 | 37 | output "vpn_connection_tunnel1_log_group_arn" { 38 | description = "The CloudWatch Log Group ARN for the tunnel 1 logs" 39 | value = module.vpn_connection.vpn_connection_tunnel1_log_group_arn 40 | } 41 | 42 | output "vpn_connection_tunnel2_address" { 43 | description = "The public IP address of the second VPN tunnel" 44 | value = module.vpn_connection.vpn_connection_tunnel2_address 45 | } 46 | 47 | output "vpn_connection_tunnel2_cgw_inside_address" { 48 | description = "The RFC 6890 link-local address of the second VPN tunnel (Customer Gateway side)" 49 | value = module.vpn_connection.vpn_connection_tunnel2_cgw_inside_address 50 | } 51 | 52 | output "vpn_connection_tunnel2_vgw_inside_address" { 53 | description = "The RFC 6890 link-local address of the second VPN tunnel (Virtual Private Gateway side)" 54 | value = module.vpn_connection.vpn_connection_tunnel2_vgw_inside_address 55 | } 56 | 57 | output "vpn_connection_tunnel2_log_group_arn" { 58 | description = "The CloudWatch Log Group ARN for the tunnel 2 logs" 59 | value = module.vpn_connection.vpn_connection_tunnel2_log_group_arn 60 | } 61 | 62 | output "vpn_acceleration_enabled" { 63 | description = "Whether the VPN connection is enabled for acceleration" 64 | value = module.vpn_connection.vpn_acceleration_enabled 65 | } 66 | -------------------------------------------------------------------------------- /examples/complete/variables.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | type = string 3 | description = "AWS Region" 4 | nullable = false 5 | } 6 | 7 | variable "vpc_id" { 8 | type = string 9 | description = "The ID of the VPC to which the Virtual Private Gateway will be attached" 10 | nullable = false 11 | } 12 | 13 | variable "vpn_gateway_amazon_side_asn" { 14 | type = number 15 | description = "The Autonomous System Number (ASN) for the Amazon side of the VPN gateway. If you don't specify an ASN, the Virtual Private Gateway is created with the default ASN" 16 | default = 64512 17 | nullable = false 18 | } 19 | 20 | variable "customer_gateway_bgp_asn" { 21 | type = number 22 | description = "The Customer Gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN)" 23 | default = 65000 24 | nullable = false 25 | } 26 | 27 | variable "customer_gateway_ip_address" { 28 | type = string 29 | description = "The IP address of the gateway's Internet-routable external interface" 30 | } 31 | 32 | variable "route_table_ids" { 33 | type = list(string) 34 | description = "The IDs of the route tables for which routes from the Virtual Private Gateway will be propagated" 35 | nullable = false 36 | } 37 | 38 | variable "vpn_connection_static_routes_only" { 39 | type = bool 40 | description = "If set to `true`, the VPN connection will use static routes exclusively. Static routes must be used for devices that don't support BGP" 41 | default = true 42 | nullable = false 43 | } 44 | 45 | variable "vpn_connection_static_routes_destinations" { 46 | type = list(string) 47 | description = "List of CIDR blocks to be used as destination for static routes. Routes to destinations will be propagated to the route tables defined in `route_table_ids`" 48 | default = ["10.80.1.0/24"] 49 | nullable = false 50 | } 51 | 52 | variable "vpn_connection_tunnel1_inside_cidr" { 53 | type = string 54 | description = "The CIDR block of the inside IP addresses for the first VPN tunnel" 55 | default = "" 56 | } 57 | 58 | variable "vpn_connection_tunnel2_inside_cidr" { 59 | type = string 60 | description = "The CIDR block of the inside IP addresses for the second VPN tunnel" 61 | default = "" 62 | } 63 | 64 | variable "vpn_connection_tunnel1_preshared_key" { 65 | type = string 66 | description = "The preshared key of the first VPN tunnel. The pre-shared key must be between 8 and 64 characters in length and cannot start with zero. Allowed characters are alphanumeric characters, periods(.) and underscores(_)" 67 | default = "" 68 | } 69 | 70 | variable "vpn_connection_tunnel2_preshared_key" { 71 | type = string 72 | description = "The preshared key of the second VPN tunnel. The pre-shared key must be between 8 and 64 characters in length and cannot start with zero. Allowed characters are alphanumeric characters, periods(.) and underscores(_)" 73 | default = "" 74 | } 75 | -------------------------------------------------------------------------------- /examples/complete/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.3.0" 3 | 4 | required_providers { 5 | aws = { 6 | source = "hashicorp/aws" 7 | version = ">= 2.0" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /main.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | enabled = module.this.enabled 3 | 4 | create_log_group = local.enabled && ( 5 | (var.vpn_connection_tunnel1_cloudwatch_log_enabled && length(var.vpn_connection_tunnel1_cloudwatch_log_group_arn) == 0) || 6 | (var.vpn_connection_tunnel2_cloudwatch_log_enabled && length(var.vpn_connection_tunnel2_cloudwatch_log_group_arn) == 0) 7 | ) 8 | tunnel1_log_group_arn = try(var.vpn_connection_tunnel1_cloudwatch_log_group_arn[0], module.logs.log_group_arn) 9 | tunnel2_log_group_arn = try(var.vpn_connection_tunnel2_cloudwatch_log_group_arn[0], module.logs.log_group_arn) 10 | 11 | transit_gateway_enabled = local.enabled && var.transit_gateway_enabled 12 | transit_gateway_rt_enabled = local.transit_gateway_enabled && var.transit_gateway_route_table_id != null 13 | vpn_gateway_enabled = local.enabled && !var.transit_gateway_enabled && var.existing_vpn_gateway_id == null 14 | 15 | vpn_gateway_only = var.customer_gateway_ip_address == null 16 | 17 | transit_gateway_attachment_id = one(aws_vpn_connection.default[*].transit_gateway_attachment_id) 18 | vpn_gateway_id = local.vpn_gateway_enabled ? one(aws_vpn_gateway.default[*].id) : var.existing_vpn_gateway_id 19 | customer_gateway_id = one(aws_customer_gateway.default[*].id) 20 | customer_gateway_device_name = var.customer_gateway_device_name == "" ? module.this.id : var.customer_gateway_device_name 21 | vpn_connection_id = one(aws_vpn_connection.default[*].id) 22 | } 23 | 24 | # https://www.terraform.io/docs/providers/aws/r/vpn_gateway.html 25 | resource "aws_vpn_gateway" "default" { 26 | count = local.vpn_gateway_enabled ? 1 : 0 27 | 28 | vpc_id = var.vpc_id 29 | amazon_side_asn = var.vpn_gateway_amazon_side_asn 30 | tags = module.this.tags 31 | } 32 | 33 | # https://www.terraform.io/docs/providers/aws/r/customer_gateway.html 34 | resource "aws_customer_gateway" "default" { 35 | count = local.enabled && !local.vpn_gateway_only ? 1 : 0 36 | 37 | device_name = local.customer_gateway_device_name 38 | bgp_asn = var.customer_gateway_bgp_asn <= 2147483647 ? var.customer_gateway_bgp_asn : null 39 | bgp_asn_extended = var.customer_gateway_bgp_asn > 2147483647 ? var.customer_gateway_bgp_asn : null 40 | ip_address = var.customer_gateway_ip_address 41 | type = "ipsec.1" 42 | tags = module.this.tags 43 | 44 | lifecycle { 45 | create_before_destroy = true 46 | } 47 | } 48 | 49 | module "logs" { 50 | source = "cloudposse/cloudwatch-logs/aws" 51 | version = "0.6.9" 52 | 53 | enabled = local.create_log_group 54 | iam_role_enabled = false 55 | retention_in_days = var.vpn_connection_log_retention_in_days 56 | 57 | context = module.this.context 58 | } 59 | 60 | # https://www.terraform.io/docs/providers/aws/r/vpn_connection.html 61 | resource "aws_vpn_connection" "default" { 62 | count = local.enabled && !local.vpn_gateway_only ? 1 : 0 63 | 64 | vpn_gateway_id = local.transit_gateway_enabled ? null : local.vpn_gateway_id 65 | customer_gateway_id = local.customer_gateway_id 66 | transit_gateway_id = local.transit_gateway_enabled ? var.existing_transit_gateway_id : null 67 | type = "ipsec.1" 68 | enable_acceleration = var.vpn_acceleration_enabled ? true : null 69 | static_routes_only = var.vpn_connection_static_routes_only 70 | local_ipv4_network_cidr = var.vpn_connection_local_ipv4_network_cidr 71 | remote_ipv4_network_cidr = var.vpn_connection_remote_ipv4_network_cidr 72 | 73 | tunnel1_dpd_timeout_action = var.vpn_connection_tunnel1_dpd_timeout_action 74 | tunnel1_ike_versions = var.vpn_connection_tunnel1_ike_versions 75 | tunnel1_inside_cidr = var.vpn_connection_tunnel1_inside_cidr 76 | tunnel1_preshared_key = var.vpn_connection_tunnel1_preshared_key 77 | tunnel1_startup_action = var.vpn_connection_tunnel1_startup_action 78 | 79 | tunnel1_phase1_dh_group_numbers = var.vpn_connection_tunnel1_phase1_dh_group_numbers 80 | tunnel1_phase2_dh_group_numbers = var.vpn_connection_tunnel1_phase2_dh_group_numbers 81 | tunnel1_phase1_encryption_algorithms = var.vpn_connection_tunnel1_phase1_encryption_algorithms 82 | tunnel1_phase2_encryption_algorithms = var.vpn_connection_tunnel1_phase2_encryption_algorithms 83 | tunnel1_phase1_integrity_algorithms = var.vpn_connection_tunnel1_phase1_integrity_algorithms 84 | tunnel1_phase2_integrity_algorithms = var.vpn_connection_tunnel1_phase2_integrity_algorithms 85 | tunnel1_phase1_lifetime_seconds = var.vpn_connection_tunnel1_phase1_lifetime_seconds 86 | tunnel1_phase2_lifetime_seconds = var.vpn_connection_tunnel1_phase2_lifetime_seconds 87 | 88 | tunnel1_log_options { 89 | cloudwatch_log_options { 90 | log_enabled = var.vpn_connection_tunnel1_cloudwatch_log_enabled 91 | log_group_arn = var.vpn_connection_tunnel1_cloudwatch_log_enabled ? local.tunnel1_log_group_arn : null 92 | log_output_format = var.vpn_connection_tunnel1_cloudwatch_log_enabled ? var.vpn_connection_tunnel1_cloudwatch_log_output_format : null 93 | } 94 | } 95 | 96 | tunnel2_dpd_timeout_action = var.vpn_connection_tunnel2_dpd_timeout_action 97 | tunnel2_ike_versions = var.vpn_connection_tunnel2_ike_versions 98 | tunnel2_inside_cidr = var.vpn_connection_tunnel2_inside_cidr 99 | tunnel2_preshared_key = var.vpn_connection_tunnel2_preshared_key 100 | tunnel2_startup_action = var.vpn_connection_tunnel2_startup_action 101 | 102 | tunnel2_phase1_dh_group_numbers = var.vpn_connection_tunnel2_phase1_dh_group_numbers 103 | tunnel2_phase2_dh_group_numbers = var.vpn_connection_tunnel2_phase2_dh_group_numbers 104 | tunnel2_phase1_encryption_algorithms = var.vpn_connection_tunnel2_phase1_encryption_algorithms 105 | tunnel2_phase2_encryption_algorithms = var.vpn_connection_tunnel2_phase2_encryption_algorithms 106 | tunnel2_phase1_integrity_algorithms = var.vpn_connection_tunnel2_phase1_integrity_algorithms 107 | tunnel2_phase2_integrity_algorithms = var.vpn_connection_tunnel2_phase2_integrity_algorithms 108 | tunnel2_phase1_lifetime_seconds = var.vpn_connection_tunnel2_phase1_lifetime_seconds 109 | tunnel2_phase2_lifetime_seconds = var.vpn_connection_tunnel2_phase2_lifetime_seconds 110 | 111 | tunnel2_log_options { 112 | cloudwatch_log_options { 113 | log_enabled = var.vpn_connection_tunnel2_cloudwatch_log_enabled 114 | log_group_arn = var.vpn_connection_tunnel2_cloudwatch_log_enabled ? local.tunnel2_log_group_arn : null 115 | log_output_format = var.vpn_connection_tunnel2_cloudwatch_log_enabled ? var.vpn_connection_tunnel2_cloudwatch_log_output_format : null 116 | } 117 | } 118 | 119 | tags = module.this.tags 120 | } 121 | 122 | # https://www.terraform.io/docs/providers/aws/r/vpn_gateway_route_propagation.html 123 | resource "aws_vpn_gateway_route_propagation" "default" { 124 | count = local.enabled && !var.transit_gateway_enabled ? length(var.route_table_ids) : 0 125 | vpn_gateway_id = local.vpn_gateway_id 126 | route_table_id = element(var.route_table_ids, count.index) 127 | } 128 | 129 | # https://www.terraform.io/docs/providers/aws/r/vpn_connection_route.html 130 | resource "aws_vpn_connection_route" "default" { 131 | count = local.enabled && var.vpn_connection_static_routes_only ? length(var.vpn_connection_static_routes_destinations) : 0 132 | vpn_connection_id = local.vpn_connection_id 133 | destination_cidr_block = element(var.vpn_connection_static_routes_destinations, count.index) 134 | } 135 | 136 | ## Transit Gateway VPN Connection Attachments 137 | 138 | # Required to tag VPN Connection TGW Attachments out of bound of the VPN Connection resource 139 | # If we do not do this, the TGW Attachment will not have a name tag or any tags, which makes it difficult to identify in the console. 140 | # https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_tag 141 | resource "aws_ec2_tag" "default" { 142 | for_each = local.transit_gateway_enabled ? module.this.tags : {} 143 | 144 | resource_id = local.transit_gateway_attachment_id 145 | key = each.key 146 | value = each.value 147 | } 148 | 149 | # https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route_table_association 150 | resource "aws_ec2_transit_gateway_route_table_association" "default" { 151 | count = local.transit_gateway_rt_enabled ? 1 : 0 152 | 153 | transit_gateway_attachment_id = local.transit_gateway_attachment_id 154 | transit_gateway_route_table_id = var.transit_gateway_route_table_id 155 | } 156 | 157 | # https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route_table_propagation 158 | resource "aws_ec2_transit_gateway_route_table_propagation" "default" { 159 | count = local.transit_gateway_rt_enabled ? 1 : 0 160 | 161 | transit_gateway_attachment_id = local.transit_gateway_attachment_id 162 | transit_gateway_route_table_id = var.transit_gateway_route_table_id 163 | } 164 | 165 | # https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_transit_gateway_route 166 | resource "aws_ec2_transit_gateway_route" "default" { 167 | for_each = local.transit_gateway_rt_enabled ? var.transit_gateway_routes : {} 168 | 169 | blackhole = each.value.blackhole 170 | destination_cidr_block = each.value.destination_cidr_block 171 | transit_gateway_attachment_id = local.transit_gateway_attachment_id 172 | transit_gateway_route_table_id = var.transit_gateway_route_table_id 173 | } 174 | -------------------------------------------------------------------------------- /outputs.tf: -------------------------------------------------------------------------------- 1 | output "vpn_gateway_id" { 2 | description = "Virtual Private Gateway ID" 3 | value = local.vpn_gateway_id 4 | } 5 | 6 | output "customer_gateway_id" { 7 | description = "Customer Gateway ID" 8 | value = local.customer_gateway_id 9 | } 10 | 11 | output "customer_gateway_device_name" { 12 | description = "Customer Gateway Device Name" 13 | value = one(aws_customer_gateway.default[*].device_name) 14 | } 15 | 16 | output "vpn_connection_id" { 17 | description = "VPN Connection ID" 18 | value = local.vpn_connection_id 19 | } 20 | 21 | output "vpn_connection_customer_gateway_configuration" { 22 | description = "The configuration information for the VPN connection's Customer Gateway (in the native XML format)" 23 | sensitive = true 24 | value = one(aws_vpn_connection.default[*].customer_gateway_configuration) 25 | } 26 | 27 | output "vpn_connection_tunnel1_address" { 28 | description = "The public IP address of the first VPN tunnel" 29 | value = one(aws_vpn_connection.default[*].tunnel1_address) 30 | } 31 | 32 | output "vpn_connection_tunnel1_cgw_inside_address" { 33 | description = "The RFC 6890 link-local address of the first VPN tunnel (Customer Gateway side)" 34 | value = one(aws_vpn_connection.default[*].tunnel1_cgw_inside_address) 35 | } 36 | 37 | output "vpn_connection_tunnel1_vgw_inside_address" { 38 | description = "The RFC 6890 link-local address of the first VPN tunnel (Virtual Private Gateway side)" 39 | value = one(aws_vpn_connection.default[*].tunnel1_vgw_inside_address) 40 | } 41 | 42 | output "vpn_connection_tunnel1_log_group_arn" { 43 | description = "The CloudWatch Log Group ARN for the tunnel 1 logs" 44 | value = var.vpn_connection_tunnel1_cloudwatch_log_enabled ? one(aws_vpn_connection.default[*].tunnel1_log_options[0].cloudwatch_log_options[0].log_group_arn) : null 45 | } 46 | 47 | output "vpn_connection_tunnel2_address" { 48 | description = "The public IP address of the second VPN tunnel" 49 | value = one(aws_vpn_connection.default[*].tunnel2_address) 50 | } 51 | 52 | output "vpn_connection_tunnel2_cgw_inside_address" { 53 | description = "The RFC 6890 link-local address of the second VPN tunnel (Customer Gateway side)" 54 | value = one(aws_vpn_connection.default[*].tunnel2_cgw_inside_address) 55 | } 56 | 57 | output "vpn_connection_tunnel2_vgw_inside_address" { 58 | description = "The RFC 6890 link-local address of the second VPN tunnel (Virtual Private Gateway side)" 59 | value = one(aws_vpn_connection.default[*].tunnel2_vgw_inside_address) 60 | } 61 | 62 | output "vpn_connection_tunnel2_log_group_arn" { 63 | description = "The CloudWatch Log Group ARN for the tunnel 2 logs" 64 | value = var.vpn_connection_tunnel2_cloudwatch_log_enabled ? one(aws_vpn_connection.default[*].tunnel2_log_options[0].cloudwatch_log_options[0].log_group_arn) : null 65 | } 66 | 67 | output "transit_gateway_attachment_id" { 68 | description = "The ID of the transit gateway attachment for the VPN connection (if a TGW connection)" 69 | value = local.transit_gateway_attachment_id 70 | } 71 | 72 | output "vpn_acceleration_enabled" { 73 | description = "Whether the VPN connection is enabled for acceleration" 74 | value = one(aws_vpn_connection.default[*].enable_acceleration) 75 | } 76 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | .test-harness 2 | -------------------------------------------------------------------------------- /test/Makefile: -------------------------------------------------------------------------------- 1 | TEST_HARNESS ?= https://github.com/cloudposse/test-harness.git 2 | TEST_HARNESS_BRANCH ?= master 3 | TEST_HARNESS_PATH = $(realpath .test-harness) 4 | BATS_ARGS ?= --tap 5 | BATS_LOG ?= test.log 6 | 7 | # Define a macro to run the tests 8 | define RUN_TESTS 9 | @echo "Running tests in $(1)" 10 | @cd $(1) && bats $(BATS_ARGS) $(addsuffix .bats,$(addprefix $(TEST_HARNESS_PATH)/test/terraform/,$(TESTS))) 11 | endef 12 | 13 | default: all 14 | 15 | -include Makefile.* 16 | 17 | ## Provision the test-harnesss 18 | .test-harness: 19 | [ -d $@ ] || git clone --depth=1 -b $(TEST_HARNESS_BRANCH) $(TEST_HARNESS) $@ 20 | 21 | ## Initialize the tests 22 | init: .test-harness 23 | 24 | ## Install all dependencies (OS specific) 25 | deps:: 26 | @exit 0 27 | 28 | ## Clean up the test harness 29 | clean: 30 | [ "$(TEST_HARNESS_PATH)" == "/" ] || rm -rf $(TEST_HARNESS_PATH) 31 | 32 | ## Run all tests 33 | all: module examples/complete 34 | 35 | ## Run basic sanity checks against the module itself 36 | module: export TESTS ?= installed lint module-pinning provider-pinning validate terraform-docs input-descriptions output-descriptions 37 | module: deps 38 | $(call RUN_TESTS, ../) 39 | 40 | ## Run tests against example 41 | examples/complete: export TESTS ?= installed lint validate 42 | examples/complete: deps 43 | $(call RUN_TESTS, ../$@) 44 | -------------------------------------------------------------------------------- /test/Makefile.alpine: -------------------------------------------------------------------------------- 1 | ifneq (,$(wildcard /sbin/apk)) 2 | ## Install all dependencies for alpine 3 | deps:: init 4 | @apk add --update terraform-docs@cloudposse json2hcl@cloudposse 5 | endif 6 | -------------------------------------------------------------------------------- /test/src/.gitignore: -------------------------------------------------------------------------------- 1 | .gopath 2 | vendor/ 3 | -------------------------------------------------------------------------------- /test/src/Makefile: -------------------------------------------------------------------------------- 1 | export TERRAFORM_VERSION ?= $(shell curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version' | cut -d. -f1) 2 | 3 | .DEFAULT_GOAL : all 4 | .PHONY: all 5 | 6 | ## Default target 7 | all: test 8 | 9 | .PHONY : init 10 | ## Initialize tests 11 | init: 12 | @exit 0 13 | 14 | .PHONY : test 15 | ## Run tests 16 | test: init 17 | go mod download 18 | go test -v -timeout 60m 19 | 20 | ## Run tests in docker container 21 | docker/test: 22 | docker run --name terratest --rm -it -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e GITHUB_TOKEN \ 23 | -e PATH="/usr/local/terraform/$(TERRAFORM_VERSION)/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ 24 | -v $(CURDIR)/../../:/module/ cloudposse/test-harness:latest -C /module/test/src test 25 | 26 | .PHONY : clean 27 | ## Clean up files 28 | clean: 29 | rm -rf ../../examples/complete/*.tfstate* 30 | -------------------------------------------------------------------------------- /test/src/examples_complete_test.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "strings" 7 | "testing" 8 | 9 | "github.com/gruntwork-io/terratest/modules/random" 10 | "github.com/gruntwork-io/terratest/modules/terraform" 11 | testStructure "github.com/gruntwork-io/terratest/modules/test-structure" 12 | "github.com/stretchr/testify/assert" 13 | ) 14 | 15 | const ( 16 | region = "us-east-2" 17 | ) 18 | 19 | func cleanup(t *testing.T, terraformOptions *terraform.Options, tempTestFolder string) { 20 | terraform.Destroy(t, terraformOptions) 21 | os.RemoveAll(tempTestFolder) 22 | } 23 | 24 | func detectPlatform() string { 25 | cmd := exec.Command("terraform", "--version") 26 | out, _ := cmd.CombinedOutput() 27 | platform := "" 28 | if strings.Contains(string(out), "Terraform") { 29 | platform = "tf" 30 | } else if strings.Contains(string(out), "OpenTofu") { 31 | platform = "tofu" 32 | } else { 33 | platform = "unknown" 34 | } 35 | return platform 36 | } 37 | 38 | // Test the Terraform module in examples/complete using Terratest. 39 | func TestExamplesComplete(t *testing.T) { 40 | t.Parallel() 41 | randID := strings.ToLower(random.UniqueId()) 42 | platform := detectPlatform() 43 | attributes := []string{randID, platform} 44 | 45 | rootFolder := "../../" 46 | terraformFolderRelativeToRoot := "examples/complete" 47 | varFiles := []string{"fixtures." + region + ".tfvars"} 48 | 49 | tempTestFolder := testStructure.CopyTerraformFolderToTemp(t, rootFolder, terraformFolderRelativeToRoot) 50 | 51 | terraformOptions := &terraform.Options{ 52 | // The path to where our Terraform code is located 53 | TerraformDir: tempTestFolder, 54 | Upgrade: true, 55 | // Variables to pass to our Terraform code using -var-file options 56 | VarFiles: varFiles, 57 | Vars: map[string]interface{}{ 58 | "attributes": attributes, 59 | }, 60 | } 61 | 62 | // At the end of the test, run `terraform destroy` to clean up any resources that were created 63 | defer cleanup(t, terraformOptions, tempTestFolder) 64 | 65 | // This will run `terraform init` and `terraform apply` and fail the test if there are any errors 66 | terraform.InitAndApply(t, terraformOptions) 67 | 68 | // Run `terraform output` to get the value of an output variable 69 | vpnConnectionId := terraform.Output(t, terraformOptions, "vpn_connection_id") 70 | // Verify we're getting back the outputs we expect 71 | assert.Contains(t, vpnConnectionId, "vpn-") 72 | 73 | vpnGatewayId := terraform.Output(t, terraformOptions, "vpn_gateway_id") 74 | assert.Contains(t, vpnGatewayId, "vpn-") 75 | } 76 | 77 | func TestExamplesCompleteDisabled(t *testing.T) { 78 | t.Parallel() 79 | randID := strings.ToLower(random.UniqueId()) 80 | platform := detectPlatform() 81 | attributes := []string{randID, platform} 82 | 83 | rootFolder := "../../" 84 | terraformFolderRelativeToRoot := "examples/complete" 85 | varFiles := []string{"fixtures." + region + ".tfvars"} 86 | 87 | tempTestFolder := testStructure.CopyTerraformFolderToTemp(t, rootFolder, terraformFolderRelativeToRoot) 88 | 89 | terraformOptions := &terraform.Options{ 90 | // The path to where our Terraform code is located 91 | TerraformDir: tempTestFolder, 92 | Upgrade: true, 93 | // Variables to pass to our Terraform code using -var-file options 94 | VarFiles: varFiles, 95 | Vars: map[string]interface{}{ 96 | "attributes": attributes, 97 | "enabled": "false", 98 | }, 99 | } 100 | 101 | // At the end of the test, run `terraform destroy` to clean up any resources that were created 102 | defer cleanup(t, terraformOptions, tempTestFolder) 103 | 104 | // This will run `terraform init` and `terraform apply` and fail the test if there are any errors 105 | results := terraform.InitAndApply(t, terraformOptions) 106 | 107 | // Should complete successfully without creating or changing any resources 108 | assert.Contains(t, results, "Resources: 0 added, 0 changed, 0 destroyed.") 109 | } 110 | -------------------------------------------------------------------------------- /test/src/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/cloudposse/terraform-aws-vpn-connection 2 | 3 | go 1.23.0 4 | 5 | toolchain go1.23.9 6 | 7 | require ( 8 | github.com/gruntwork-io/terratest v0.49.0 9 | github.com/stretchr/testify v1.10.0 10 | ) 11 | 12 | require ( 13 | filippo.io/edwards25519 v1.1.0 // indirect 14 | github.com/agext/levenshtein v1.2.3 // indirect 15 | github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect 16 | github.com/aws/aws-sdk-go-v2 v1.32.5 // indirect 17 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect 18 | github.com/aws/aws-sdk-go-v2/config v1.28.5 // indirect 19 | github.com/aws/aws-sdk-go-v2/credentials v1.17.46 // indirect 20 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 // indirect 21 | github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.41 // indirect 22 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 // indirect 23 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 // indirect 24 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect 25 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 // indirect 26 | github.com/aws/aws-sdk-go-v2/service/acm v1.30.6 // indirect 27 | github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.0 // indirect 28 | github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.44.0 // indirect 29 | github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1 // indirect 30 | github.com/aws/aws-sdk-go-v2/service/ec2 v1.193.0 // indirect 31 | github.com/aws/aws-sdk-go-v2/service/ecr v1.36.6 // indirect 32 | github.com/aws/aws-sdk-go-v2/service/ecs v1.52.0 // indirect 33 | github.com/aws/aws-sdk-go-v2/service/iam v1.38.1 // indirect 34 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect 35 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5 // indirect 36 | github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5 // indirect 37 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 // indirect 38 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5 // indirect 39 | github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 // indirect 40 | github.com/aws/aws-sdk-go-v2/service/lambda v1.69.0 // indirect 41 | github.com/aws/aws-sdk-go-v2/service/rds v1.91.0 // indirect 42 | github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2 // indirect 43 | github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 // indirect 44 | github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6 // indirect 45 | github.com/aws/aws-sdk-go-v2/service/sns v1.33.6 // indirect 46 | github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1 // indirect 47 | github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 // indirect 48 | github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 // indirect 49 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 // indirect 50 | github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 // indirect 51 | github.com/aws/smithy-go v1.22.1 // indirect 52 | github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect 53 | github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect 54 | github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect 55 | github.com/davecgh/go-spew v1.1.1 // indirect 56 | github.com/emicklei/go-restful/v3 v3.9.0 // indirect 57 | github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 // indirect 58 | github.com/go-logr/logr v1.4.2 // indirect 59 | github.com/go-openapi/jsonpointer v0.19.6 // indirect 60 | github.com/go-openapi/jsonreference v0.20.2 // indirect 61 | github.com/go-openapi/swag v0.22.3 // indirect 62 | github.com/go-sql-driver/mysql v1.8.1 // indirect 63 | github.com/gogo/protobuf v1.3.2 // indirect 64 | github.com/golang/protobuf v1.5.4 // indirect 65 | github.com/google/gnostic-models v0.6.8 // indirect 66 | github.com/google/go-cmp v0.6.0 // indirect 67 | github.com/google/gofuzz v1.2.0 // indirect 68 | github.com/google/uuid v1.6.0 // indirect 69 | github.com/gruntwork-io/go-commons v0.8.0 // indirect 70 | github.com/hashicorp/errwrap v1.0.0 // indirect 71 | github.com/hashicorp/go-cleanhttp v0.5.2 // indirect 72 | github.com/hashicorp/go-getter/v2 v2.2.3 // indirect 73 | github.com/hashicorp/go-multierror v1.1.1 // indirect 74 | github.com/hashicorp/go-safetemp v1.0.0 // indirect 75 | github.com/hashicorp/go-version v1.7.0 // indirect 76 | github.com/hashicorp/hcl/v2 v2.22.0 // indirect 77 | github.com/hashicorp/terraform-json v0.23.0 // indirect 78 | github.com/imdario/mergo v0.3.11 // indirect 79 | github.com/jackc/pgpassfile v1.0.0 // indirect 80 | github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect 81 | github.com/jackc/pgx/v5 v5.7.1 // indirect 82 | github.com/jackc/puddle/v2 v2.2.2 // indirect 83 | github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect 84 | github.com/jmespath/go-jmespath v0.4.0 // indirect 85 | github.com/josharian/intern v1.0.0 // indirect 86 | github.com/json-iterator/go v1.1.12 // indirect 87 | github.com/klauspost/compress v1.16.5 // indirect 88 | github.com/mailru/easyjson v0.7.7 // indirect 89 | github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect 90 | github.com/mitchellh/go-homedir v1.1.0 // indirect 91 | github.com/mitchellh/go-testing-interface v1.14.1 // indirect 92 | github.com/mitchellh/go-wordwrap v1.0.1 // indirect 93 | github.com/moby/spdystream v0.2.0 // indirect 94 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 95 | github.com/modern-go/reflect2 v1.0.2 // indirect 96 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect 97 | github.com/pmezard/go-difflib v1.0.0 // indirect 98 | github.com/pquerna/otp v1.4.0 // indirect 99 | github.com/russross/blackfriday/v2 v2.1.0 // indirect 100 | github.com/spf13/pflag v1.0.5 // indirect 101 | github.com/tmccombs/hcl2json v0.6.4 // indirect 102 | github.com/ulikunitz/xz v0.5.10 // indirect 103 | github.com/urfave/cli v1.22.16 // indirect 104 | github.com/zclconf/go-cty v1.15.0 // indirect 105 | golang.org/x/crypto v0.36.0 // indirect 106 | golang.org/x/mod v0.18.0 // indirect 107 | golang.org/x/net v0.38.0 // indirect 108 | golang.org/x/oauth2 v0.24.0 // indirect 109 | golang.org/x/sync v0.12.0 // indirect 110 | golang.org/x/sys v0.31.0 // indirect 111 | golang.org/x/term v0.30.0 // indirect 112 | golang.org/x/text v0.23.0 // indirect 113 | golang.org/x/time v0.8.0 // indirect 114 | golang.org/x/tools v0.22.0 // indirect 115 | google.golang.org/protobuf v1.35.1 // indirect 116 | gopkg.in/inf.v0 v0.9.1 // indirect 117 | gopkg.in/yaml.v2 v2.4.0 // indirect 118 | gopkg.in/yaml.v3 v3.0.1 // indirect 119 | k8s.io/api v0.28.4 // indirect 120 | k8s.io/apimachinery v0.28.4 // indirect 121 | k8s.io/client-go v0.28.4 // indirect 122 | k8s.io/klog/v2 v2.100.1 // indirect 123 | k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect 124 | k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect 125 | sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect 126 | sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect 127 | sigs.k8s.io/yaml v1.3.0 // indirect 128 | ) 129 | -------------------------------------------------------------------------------- /test/src/go.sum: -------------------------------------------------------------------------------- 1 | filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= 2 | filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= 3 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 4 | github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= 5 | github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= 6 | github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= 7 | github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= 8 | github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= 9 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= 10 | github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 11 | github.com/aws/aws-sdk-go-v2 v1.32.5 h1:U8vdWJuY7ruAkzaOdD7guwJjD06YSKmnKCJs7s3IkIo= 12 | github.com/aws/aws-sdk-go-v2 v1.32.5/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= 13 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8= 14 | github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc= 15 | github.com/aws/aws-sdk-go-v2/config v1.28.5 h1:Za41twdCXbuyyWv9LndXxZZv3QhTG1DinqlFsSuvtI0= 16 | github.com/aws/aws-sdk-go-v2/config v1.28.5/go.mod h1:4VsPbHP8JdcdUDmbTVgNL/8w9SqOkM5jyY8ljIxLO3o= 17 | github.com/aws/aws-sdk-go-v2/credentials v1.17.46 h1:AU7RcriIo2lXjUfHFnFKYsLCwgbz1E7Mm95ieIRDNUg= 18 | github.com/aws/aws-sdk-go-v2/credentials v1.17.46/go.mod h1:1FmYyLGL08KQXQ6mcTlifyFXfJVCNJTVGuQP4m0d/UA= 19 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 h1:sDSXIrlsFSFJtWKLQS4PUWRvrT580rrnuLydJrCQ/yA= 20 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20/go.mod h1:WZ/c+w0ofps+/OUqMwWgnfrgzZH1DZO1RIkktICsqnY= 21 | github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.41 h1:hqcxMc2g/MwwnRMod9n6Bd+t+9Nf7d5qRg7RaXKPd6o= 22 | github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.41/go.mod h1:d1eH0VrttvPmrCraU68LOyNdu26zFxQFjrVSb5vdhog= 23 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 h1:4usbeaes3yJnCFC7kfeyhkdkPtoRYPa/hTmCqMpKpLI= 24 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24/go.mod h1:5CI1JemjVwde8m2WG3cz23qHKPOxbpkq0HaoreEgLIY= 25 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 h1:N1zsICrQglfzaBnrfM0Ys00860C+QFwu6u/5+LomP+o= 26 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24/go.mod h1:dCn9HbJ8+K31i8IQ8EWmWj0EiIk0+vKiHNMxTTYveAg= 27 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= 28 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= 29 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 h1:JX70yGKLj25+lMC5Yyh8wBtvB01GDilyRuJvXJ4piD0= 30 | github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24/go.mod h1:+Ln60j9SUTD0LEwnhEB0Xhg61DHqplBrbZpLgyjoEHg= 31 | github.com/aws/aws-sdk-go-v2/service/acm v1.30.6 h1:fDg0RlN30Xf/yYzEUL/WXqhmgFsjVb/I3230oCfyI5w= 32 | github.com/aws/aws-sdk-go-v2/service/acm v1.30.6/go.mod h1:zRR6jE3v/TcbfO8C2P+H0Z+kShiKKVaVyoIl8NQRjyg= 33 | github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.0 h1:1KzQVZi7OTixxaVJ8fWaJAUBjme+iQ3zBOCZhE4RgxQ= 34 | github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.0/go.mod h1:I1+/2m+IhnK5qEbhS3CrzjeiVloo9sItE/2K+so0fkU= 35 | github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.44.0 h1:OREVd94+oXW5a+3SSUAo4K0L5ci8cucCLu+PSiek8OU= 36 | github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.44.0/go.mod h1:Qbr4yfpNqVNl69l/GEDK+8wxLf/vHi0ChoiSDzD7thU= 37 | github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1 h1:vucMirlM6D+RDU8ncKaSZ/5dGrXNajozVwpmWNPn2gQ= 38 | github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1/go.mod h1:fceORfs010mNxZbQhfqUjUeHlTwANmIT4mvHamuUaUg= 39 | github.com/aws/aws-sdk-go-v2/service/ec2 v1.193.0 h1:RhSoBFT5/8tTmIseJUXM6INTXTQDF8+0oyxWBnozIms= 40 | github.com/aws/aws-sdk-go-v2/service/ec2 v1.193.0/go.mod h1:mzj8EEjIHSN2oZRXiw1Dd+uB4HZTl7hC8nBzX9IZMWw= 41 | github.com/aws/aws-sdk-go-v2/service/ecr v1.36.6 h1:zg+3FGHA0PBs0KM25qE/rOf2o5zsjNa1g/Qq83+SDI0= 42 | github.com/aws/aws-sdk-go-v2/service/ecr v1.36.6/go.mod h1:ZSq54Z9SIsOTf1Efwgw1msilSs4XVEfVQiP9nYVnKpM= 43 | github.com/aws/aws-sdk-go-v2/service/ecs v1.52.0 h1:7/vgFWplkusJN/m+3QOa+W9FNRqa8ujMPNmdufRaJpg= 44 | github.com/aws/aws-sdk-go-v2/service/ecs v1.52.0/go.mod h1:dPTOvmjJQ1T7Q+2+Xs2KSPrMvx+p0rpyV+HsQVnUK4o= 45 | github.com/aws/aws-sdk-go-v2/service/iam v1.38.1 h1:hfkzDZHBp9jAT4zcd5mtqckpU4E3Ax0LQaEWWk1VgN8= 46 | github.com/aws/aws-sdk-go-v2/service/iam v1.38.1/go.mod h1:u36ahDtZcQHGmVm/r+0L1sfKX4fzLEMdCqiKRKkUMVM= 47 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= 48 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= 49 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5 h1:gvZOjQKPxFXy1ft3QnEyXmT+IqneM9QAUWlM3r0mfqw= 50 | github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5/go.mod h1:DLWnfvIcm9IET/mmjdxeXbBKmTCm0ZB8p1za9BVteM8= 51 | github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5 h1:3Y457U2eGukmjYjeHG6kanZpDzJADa2m0ADqnuePYVQ= 52 | github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5/go.mod h1:CfwEHGkTjYZpkQ/5PvcbEtT7AJlG68KkEvmtwU8z3/U= 53 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 h1:wtpJ4zcwrSbwhECWQoI/g6WM9zqCcSpHDJIWSbMLOu4= 54 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5/go.mod h1:qu/W9HXQbbQ4+1+JcZp0ZNPV31ym537ZJN+fiS7Ti8E= 55 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5 h1:P1doBzv5VEg1ONxnJss1Kh5ZG/ewoIE4MQtKKc6Crgg= 56 | github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5/go.mod h1:NOP+euMW7W3Ukt28tAxPuoWao4rhhqJD3QEBk7oCg7w= 57 | github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 h1:CZImQdb1QbU9sGgJ9IswhVkxAcjkkD1eQTMA1KHWk+E= 58 | github.com/aws/aws-sdk-go-v2/service/kms v1.37.6/go.mod h1:YJDdlK0zsyxVBxGU48AR/Mi8DMrGdc1E3Yij4fNrONA= 59 | github.com/aws/aws-sdk-go-v2/service/lambda v1.69.0 h1:BXt75frE/FYtAmEDBJRBa2HexOw+oAZWZl6QknZEFgg= 60 | github.com/aws/aws-sdk-go-v2/service/lambda v1.69.0/go.mod h1:guz2K3x4FKSdDaoeB+TPVgJNU9oj2gftbp5cR8ela1A= 61 | github.com/aws/aws-sdk-go-v2/service/rds v1.91.0 h1:eqHz3Uih+gb0vLE5Cc4Xf733vOxsxDp6GFUUVQU4d7w= 62 | github.com/aws/aws-sdk-go-v2/service/rds v1.91.0/go.mod h1:h2jc7IleH3xHY7y+h8FH7WAZcz3IVLOB6/jXotIQ/qU= 63 | github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2 h1:wmt05tPp/CaRZpPV5B4SaJ5TwkHKom07/BzHoLdkY1o= 64 | github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2/go.mod h1:d+K9HESMpGb1EU9/UmmpInbGIUcAkwmcY6ZO/A3zZsw= 65 | github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 h1:Q2ax8S21clKOnHhhr933xm3JxdJebql+R7aNo7p7GBQ= 66 | github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0/go.mod h1:ralv4XawHjEMaHOWnTFushl0WRqim/gQWesAMF6hTow= 67 | github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6 h1:1KDMKvOKNrpD667ORbZ/+4OgvUoaok1gg/MLzrHF9fw= 68 | github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6/go.mod h1:DmtyfCfONhOyVAJ6ZMTrDSFIeyCBlEO93Qkfhxwbxu0= 69 | github.com/aws/aws-sdk-go-v2/service/sns v1.33.6 h1:lEUtRHICiXsd7VRwRjXaY7MApT2X4Ue0Mrwe6XbyBro= 70 | github.com/aws/aws-sdk-go-v2/service/sns v1.33.6/go.mod h1:SODr0Lu3lFdT0SGsGX1TzFTapwveBrT5wztVoYtppm8= 71 | github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1 h1:39WvSrVq9DD6UHkD+fx5x19P5KpRQfNdtgReDVNbelc= 72 | github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1/go.mod h1:3gwPzC9LER/BTQdQZ3r6dUktb1rSjABF1D3Sr6nS7VU= 73 | github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 h1:mADKqoZaodipGgiZfuAjtlcr4IVBtXPZKVjkzUZCCYM= 74 | github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0/go.mod h1:l9qF25TzH95FhcIak6e4vt79KE4I7M2Nf59eMUVjj6c= 75 | github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 h1:3zu537oLmsPfDMyjnUS2g+F2vITgy5pB74tHI+JBNoM= 76 | github.com/aws/aws-sdk-go-v2/service/sso v1.24.6/go.mod h1:WJSZH2ZvepM6t6jwu4w/Z45Eoi75lPN7DcydSRtJg6Y= 77 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 h1:K0OQAsDywb0ltlFrZm0JHPY3yZp/S9OaoLU33S7vPS8= 78 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5/go.mod h1:ORITg+fyuMoeiQFiVGoqB3OydVTLkClw/ljbblMq6Cc= 79 | github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 h1:6SZUVRQNvExYlMLbHdlKB48x0fLbc2iVROyaNEwBHbU= 80 | github.com/aws/aws-sdk-go-v2/service/sts v1.33.1/go.mod h1:GqWyYCwLXnlUB1lOAXQyNSPqPLQJvmo8J0DWBzp9mtg= 81 | github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= 82 | github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= 83 | github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= 84 | github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= 85 | github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= 86 | github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= 87 | github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= 88 | github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 89 | github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= 90 | github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 91 | github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 92 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 93 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 94 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 95 | github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= 96 | github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= 97 | github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= 98 | github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= 99 | github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 h1:skJKxRtNmevLqnayafdLe2AsenqRupVmzZSqrvb5caU= 100 | github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= 101 | github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 102 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 103 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 104 | github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= 105 | github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= 106 | github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= 107 | github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= 108 | github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= 109 | github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= 110 | github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= 111 | github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= 112 | github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= 113 | github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= 114 | github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= 115 | github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= 116 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 117 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 118 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 119 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 120 | github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= 121 | github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= 122 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 123 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 124 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 125 | github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= 126 | github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 127 | github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= 128 | github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 129 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 130 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 131 | github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 132 | github.com/gruntwork-io/go-commons v0.8.0 h1:k/yypwrPqSeYHevLlEDmvmgQzcyTwrlZGRaxEM6G0ro= 133 | github.com/gruntwork-io/go-commons v0.8.0/go.mod h1:gtp0yTtIBExIZp7vyIV9I0XQkVwiQZze678hvDXof78= 134 | github.com/gruntwork-io/terratest v0.49.0 h1:GurfpHEOEr8vntB77QcxDh+P7aiQRUgPFdgb6q9PuWI= 135 | github.com/gruntwork-io/terratest v0.49.0/go.mod h1:/+dfGio9NqUpvvukuPo29B8zy6U5FYJn9PdmvwztK4A= 136 | github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= 137 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 138 | github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= 139 | github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= 140 | github.com/hashicorp/go-getter/v2 v2.2.3 h1:6CVzhT0KJQHqd9b0pK3xSP0CM/Cv+bVhk+jcaRJ2pGk= 141 | github.com/hashicorp/go-getter/v2 v2.2.3/go.mod h1:hp5Yy0GMQvwWVUmwLs3ygivz1JSLI323hdIE9J9m7TY= 142 | github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= 143 | github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= 144 | github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= 145 | github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= 146 | github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= 147 | github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= 148 | github.com/hashicorp/hcl/v2 v2.22.0 h1:hkZ3nCtqeJsDhPRFz5EA9iwcG1hNWGePOTw6oyul12M= 149 | github.com/hashicorp/hcl/v2 v2.22.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= 150 | github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= 151 | github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= 152 | github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= 153 | github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= 154 | github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= 155 | github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= 156 | github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= 157 | github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= 158 | github.com/jackc/pgx/v5 v5.7.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs= 159 | github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= 160 | github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= 161 | github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= 162 | github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt70eK/BSch+gFAGrNzecsoENgu2o= 163 | github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= 164 | github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= 165 | github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= 166 | github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= 167 | github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= 168 | github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= 169 | github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= 170 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= 171 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 172 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 173 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 174 | github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= 175 | github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= 176 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 177 | github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 178 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 179 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 180 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 181 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 182 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 183 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 184 | github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= 185 | github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= 186 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 187 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 188 | github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= 189 | github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= 190 | github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 h1:ofNAzWCcyTALn2Zv40+8XitdzCgXY6e9qvXwN9W0YXg= 191 | github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= 192 | github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= 193 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 194 | github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= 195 | github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= 196 | github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= 197 | github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= 198 | github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= 199 | github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= 200 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 201 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 202 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 203 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= 204 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 205 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= 206 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 207 | github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= 208 | github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM= 209 | github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= 210 | github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= 211 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 212 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 213 | github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg= 214 | github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= 215 | github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= 216 | github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 217 | github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 218 | github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= 219 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 220 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 221 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 222 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 223 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 224 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 225 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 226 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 227 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 228 | github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 229 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 230 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 231 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 232 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 233 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 234 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 235 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 236 | github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= 237 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 238 | github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= 239 | github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 240 | github.com/tmccombs/hcl2json v0.6.4 h1:/FWnzS9JCuyZ4MNwrG4vMrFrzRgsWEOVi+1AyYUVLGw= 241 | github.com/tmccombs/hcl2json v0.6.4/go.mod h1:+ppKlIW3H5nsAsZddXPy2iMyvld3SHxyjswOZhavRDk= 242 | github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= 243 | github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= 244 | github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= 245 | github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= 246 | github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= 247 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 248 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 249 | github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= 250 | github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= 251 | github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= 252 | github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= 253 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 254 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 255 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 256 | golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= 257 | golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= 258 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 259 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 260 | golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= 261 | golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 262 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 263 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 264 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 265 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 266 | golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= 267 | golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= 268 | golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= 269 | golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 270 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 271 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 272 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 273 | golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= 274 | golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 275 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 276 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 277 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 278 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 279 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 280 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 281 | golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= 282 | golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 283 | golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= 284 | golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= 285 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 286 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 287 | golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= 288 | golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= 289 | golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= 290 | golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 291 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 292 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 293 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 294 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 295 | golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= 296 | golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= 297 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 298 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 299 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 300 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 301 | google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= 302 | google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 303 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 304 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 305 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 306 | gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= 307 | gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 308 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 309 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 310 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 311 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 312 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 313 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 314 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 315 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 316 | k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= 317 | k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= 318 | k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= 319 | k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= 320 | k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= 321 | k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= 322 | k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= 323 | k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= 324 | k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= 325 | k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= 326 | k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= 327 | k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= 328 | sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= 329 | sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= 330 | sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= 331 | sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= 332 | sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= 333 | sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= 334 | -------------------------------------------------------------------------------- /variables.tf: -------------------------------------------------------------------------------- 1 | variable "vpc_id" { 2 | type = string 3 | description = <<-EOT 4 | The ID of the VPC to which the Virtual Private Gateway will be attached. 5 | Not needed if attaching the VPN connection to a Transit Gateway. 6 | EOT 7 | default = null 8 | } 9 | 10 | variable "vpn_gateway_amazon_side_asn" { 11 | type = number 12 | description = <<-EOT 13 | The Autonomous System Number (ASN) for the Amazon side of the VPN gateway. 14 | If you don't specify an ASN, the Virtual Private Gateway is created with the default ASN. 15 | EOT 16 | default = 64512 17 | nullable = false 18 | } 19 | 20 | variable "existing_vpn_gateway_id" { 21 | type = string 22 | description = <<-EOT 23 | Existing VPN Gateway ID. If provided the module will use the vpn gateway 24 | provided here. 25 | EOT 26 | default = null 27 | } 28 | 29 | variable "customer_gateway_device_name" { 30 | type = string 31 | description = <<-EOT 32 | The Device Name of the Customer Gateway. Set to `null` to leave unnamed. 33 | WARNING: Changing this value will cause the Customer Gateway to be replaced. 34 | EOT 35 | default = "" 36 | // Allow null for backward compatibility, because setting/changing the name causes the gateway to be replaced 37 | } 38 | 39 | variable "customer_gateway_bgp_asn" { 40 | type = number 41 | description = "The Customer Gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN)" 42 | default = 65000 43 | nullable = false 44 | } 45 | 46 | variable "customer_gateway_ip_address" { 47 | type = string 48 | description = <<-EOT 49 | The Internet-routable IP address of the Customer Gateway's external interface. 50 | WARNING: If set to `null`, the module will not create a Customer Gateway *or a VPN connection* 51 | and will only create a VPN Gateway. 52 | EOT 53 | default = null 54 | } 55 | 56 | variable "route_table_ids" { 57 | type = list(string) 58 | description = "The IDs of the route tables for which routes from the Virtual Private Gateway will be propagated" 59 | default = [] 60 | nullable = false 61 | } 62 | 63 | variable "vpn_connection_static_routes_only" { 64 | type = bool 65 | description = <<-EOT 66 | If set to `true`, the VPN connection will use static routes exclusively. 67 | Static routes must be used for devices that don't support BGP. 68 | EOT 69 | default = false 70 | nullable = false 71 | } 72 | 73 | variable "vpn_connection_static_routes_destinations" { 74 | type = list(string) 75 | description = <<-EOT 76 | List of CIDR blocks to be used as destination for static routes. 77 | Routes to destinations will be propagated to the route tables defined in `route_table_ids`. 78 | EOT 79 | default = [] 80 | nullable = false 81 | } 82 | 83 | variable "vpn_connection_local_ipv4_network_cidr" { 84 | type = string 85 | description = "The IPv4 CIDR on the Customer Gateway (on-premises) side of the VPN connection" 86 | default = "0.0.0.0/0" 87 | } 88 | 89 | variable "vpn_connection_remote_ipv4_network_cidr" { 90 | type = string 91 | description = "The IPv4 CIDR on the AWS side of the VPN connection" 92 | default = "0.0.0.0/0" 93 | } 94 | 95 | variable "vpn_connection_log_retention_in_days" { 96 | type = number 97 | description = "Specifies the number of days you want to retain log events" 98 | default = 30 99 | nullable = false 100 | } 101 | 102 | variable "vpn_connection_tunnel1_dpd_timeout_action" { 103 | type = string 104 | description = <<-EOT 105 | The action to take after DPD timeout occurs for the first VPN tunnel. 106 | Specify `restart` to restart the IKE initiation. Specify `clear` to end the IKE session. 107 | Valid values are `clear` | `none` | `restart` 108 | EOT 109 | default = "clear" 110 | nullable = false 111 | } 112 | 113 | variable "vpn_connection_tunnel1_ike_versions" { 114 | type = list(string) 115 | description = "The IKE versions that are permitted for the first VPN tunnel. Valid values are `ikev1` | `ikev2`" 116 | default = [] 117 | nullable = false 118 | } 119 | 120 | variable "vpn_connection_tunnel1_inside_cidr" { 121 | type = string 122 | description = "The CIDR block of the inside IP addresses for the first VPN tunnel" 123 | default = null 124 | } 125 | 126 | variable "vpn_connection_tunnel1_phase1_encryption_algorithms" { 127 | type = list(string) 128 | description = <<-EOT 129 | List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations. 130 | Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16 131 | EOT 132 | default = [] 133 | nullable = false 134 | } 135 | 136 | variable "vpn_connection_tunnel1_phase2_encryption_algorithms" { 137 | type = list(string) 138 | description = <<-EOT 139 | List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations. 140 | Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16 141 | EOT 142 | default = [] 143 | nullable = false 144 | } 145 | 146 | variable "vpn_connection_tunnel1_phase1_integrity_algorithms" { 147 | type = list(string) 148 | description = <<-EOT 149 | One or more integrity algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations. 150 | Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512 151 | EOT 152 | default = [] 153 | nullable = false 154 | } 155 | 156 | variable "vpn_connection_tunnel1_phase2_integrity_algorithms" { 157 | type = list(string) 158 | description = <<-EOT 159 | One or more integrity algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations. 160 | Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512 161 | EOT 162 | default = [] 163 | nullable = false 164 | } 165 | 166 | variable "vpn_connection_tunnel1_phase1_dh_group_numbers" { 167 | type = list(string) 168 | description = <<-EOT 169 | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations. 170 | Valid values are 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 171 | EOT 172 | default = [] 173 | nullable = false 174 | } 175 | 176 | variable "vpn_connection_tunnel1_phase2_dh_group_numbers" { 177 | type = list(string) 178 | description = <<-EOT 179 | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations. 180 | Valid values are 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 181 | EOT 182 | default = [] 183 | nullable = false 184 | } 185 | 186 | variable "vpn_connection_tunnel1_phase1_lifetime_seconds" { 187 | type = string 188 | description = "The lifetime for phase 1 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 28800" 189 | default = "28800" 190 | nullable = false 191 | } 192 | 193 | variable "vpn_connection_tunnel1_phase2_lifetime_seconds" { 194 | type = string 195 | description = "The lifetime for phase 2 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 3600" 196 | default = "3600" 197 | nullable = false 198 | } 199 | 200 | variable "vpn_connection_tunnel1_preshared_key" { 201 | type = string 202 | description = "The preshared key of the first VPN tunnel. The preshared key must be between 8 and 64 characters in length and cannot start with zero. Allowed characters are alphanumeric characters, periods(.) and underscores(_)" 203 | default = null 204 | } 205 | 206 | variable "vpn_connection_tunnel1_startup_action" { 207 | type = string 208 | description = "The action to take when the establishing the tunnel for the first VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for AWS to initiate the IKE negotiation. Valid values are `add` | `start`" 209 | default = "add" 210 | nullable = false 211 | } 212 | 213 | variable "vpn_connection_tunnel1_cloudwatch_log_enabled" { 214 | type = bool 215 | description = "Enable or disable VPN tunnel logging feature for the tunnel" 216 | default = false 217 | nullable = false 218 | } 219 | 220 | variable "vpn_connection_tunnel1_cloudwatch_log_group_arn" { 221 | type = list(string) 222 | description = <<-EOT 223 | The ARN of the CloudWatch log group to which the logs will be published. 224 | If the list is empty and `vpn_connection_tunnel1_cloudwatch_log_enabled` is `true`, 225 | the module will create a new log group and use it. 226 | If the list is not empty, the module will use the first ARN in the list. 227 | EOT 228 | default = [] 229 | nullable = false 230 | } 231 | 232 | variable "vpn_connection_tunnel1_cloudwatch_log_output_format" { 233 | type = string 234 | description = "Set log format for the tunnel. Default format is json. Possible values are `json` and `text`" 235 | default = "json" 236 | nullable = false 237 | } 238 | 239 | variable "vpn_connection_tunnel2_dpd_timeout_action" { 240 | type = string 241 | description = "The action to take after DPD timeout occurs for the second VPN tunnel. Specify restart to restart the IKE initiation. Specify clear to end the IKE session. Valid values are `clear` | `none` | `restart`" 242 | default = "clear" 243 | nullable = false 244 | } 245 | 246 | variable "vpn_connection_tunnel2_ike_versions" { 247 | type = list(string) 248 | description = "The IKE versions that are permitted for the second VPN tunnel. Valid values are `ikev1` | `ikev2`" 249 | default = [] 250 | nullable = false 251 | } 252 | 253 | variable "vpn_connection_tunnel2_inside_cidr" { 254 | type = string 255 | description = "The CIDR block of the inside IP addresses for the second VPN tunnel" 256 | default = null 257 | } 258 | 259 | variable "vpn_connection_tunnel2_phase1_encryption_algorithms" { 260 | type = list(string) 261 | description = <<-EOT 262 | List of one or more encryption algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations. 263 | Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16 264 | EOT 265 | default = [] 266 | nullable = false 267 | } 268 | 269 | variable "vpn_connection_tunnel2_phase2_encryption_algorithms" { 270 | type = list(string) 271 | description = <<-EOT 272 | List of one or more encryption algorithms that are permitted for the second VPN tunnel for phase 2 IKE negotiations. 273 | Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16 274 | EOT 275 | default = [] 276 | nullable = false 277 | } 278 | 279 | variable "vpn_connection_tunnel2_phase1_integrity_algorithms" { 280 | type = list(string) 281 | description = <<-EOT 282 | One or more integrity algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations. 283 | Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512 284 | EOT 285 | default = [] 286 | nullable = false 287 | } 288 | 289 | variable "vpn_connection_tunnel2_phase2_integrity_algorithms" { 290 | type = list(string) 291 | description = <<-EOT 292 | One or more integrity algorithms that are permitted for the second VPN tunnel for phase 2 IKE negotiations. 293 | Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512 294 | EOT 295 | default = [] 296 | nullable = false 297 | } 298 | 299 | variable "vpn_connection_tunnel2_phase1_dh_group_numbers" { 300 | type = list(string) 301 | description = <<-EOT 302 | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations. 303 | Valid values are 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 304 | EOT 305 | default = [] 306 | nullable = false 307 | } 308 | 309 | variable "vpn_connection_tunnel2_phase2_dh_group_numbers" { 310 | type = list(string) 311 | description = <<-EOT 312 | List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations. 313 | Valid values are 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 314 | EOT 315 | default = [] 316 | nullable = false 317 | } 318 | 319 | variable "vpn_connection_tunnel2_phase1_lifetime_seconds" { 320 | type = string 321 | description = "The lifetime for phase 1 of the IKE negotiation for the second VPN tunnel, in seconds. Valid value is between 900 and 28800" 322 | default = "28800" 323 | nullable = false 324 | } 325 | 326 | variable "vpn_connection_tunnel2_phase2_lifetime_seconds" { 327 | type = string 328 | description = "The lifetime for phase 2 of the IKE negotiation for the second VPN tunnel, in seconds. Valid value is between 900 and 3600" 329 | default = "3600" 330 | nullable = false 331 | } 332 | 333 | variable "vpn_connection_tunnel2_preshared_key" { 334 | type = string 335 | description = "The preshared key of the second VPN tunnel. The preshared key must be between 8 and 64 characters in length and cannot start with zero. Allowed characters are alphanumeric characters, periods(.) and underscores(_)" 336 | default = null 337 | } 338 | 339 | variable "vpn_connection_tunnel2_startup_action" { 340 | type = string 341 | description = "The action to take when the establishing the tunnel for the second VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for AWS to initiate the IKE negotiation. Valid values are `add` | `start`" 342 | default = "add" 343 | nullable = false 344 | } 345 | 346 | variable "vpn_connection_tunnel2_cloudwatch_log_enabled" { 347 | type = bool 348 | description = "Enable or disable VPN tunnel logging feature for the tunnel" 349 | default = false 350 | nullable = false 351 | } 352 | 353 | variable "vpn_connection_tunnel2_cloudwatch_log_group_arn" { 354 | type = list(string) 355 | description = <<-EOT 356 | The ARN of the CloudWatch log group to which the logs will be published. 357 | If the list is empty and `vpn_connection_tunnel2_cloudwatch_log_enabled` is `true`, 358 | the module will create a new log group and use it. 359 | If the list is not empty, the module will use the first ARN in the list. 360 | EOT 361 | default = [] 362 | nullable = false 363 | } 364 | 365 | variable "vpn_connection_tunnel2_cloudwatch_log_output_format" { 366 | type = string 367 | description = "Set log format for the tunnel. Default format is json. Possible values are `json` and `text`" 368 | default = "json" 369 | nullable = false 370 | } 371 | 372 | variable "existing_transit_gateway_id" { 373 | type = string 374 | default = "" 375 | description = <<-EOT 376 | Existing Transit Gateway ID. Required if `transit_gateway_enabled` is `true`, ignored otherwise. 377 | To set up a transit gateway, one can use the`cloudposse/transit-gateway/aws` module and pass 378 | the output `transit_gateway_id` to this variable. 379 | EOT 380 | } 381 | 382 | variable "transit_gateway_enabled" { 383 | type = bool 384 | description = <<-EOT 385 | If `true`, the module will not create a Virtual Private Gateway but instead will attach 386 | the VPN connection to the Transit Gateway specified by `existing_transit_gateway_id` 387 | EOT 388 | default = false 389 | nullable = false 390 | } 391 | 392 | variable "transit_gateway_route_table_id" { 393 | type = string 394 | description = "The ID of the route table for the transit gateway that you want to associate + propagate the VPN connection's TGW attachment" 395 | default = null 396 | } 397 | 398 | variable "transit_gateway_routes" { 399 | type = map(object({ 400 | blackhole = optional(bool, false) 401 | destination_cidr_block = string 402 | })) 403 | description = "A map of transit gateway routes to create on the given TGW route table (via `transit_gateway_route_table_id`) for the created VPN Attachment. Use the key in the map to describe the route" 404 | default = {} 405 | nullable = false 406 | } 407 | 408 | variable "vpn_acceleration_enabled" { 409 | type = bool 410 | description = <<-EOT 411 | Set to true to enable VPN acceleration for the VPN connection. Can only be set at creation time, cannot be changed later. 412 | Accelerated VPN connections come with several restrictions: consult the AWS documentation for details. 413 | EOT 414 | default = false 415 | nullable = false 416 | } 417 | -------------------------------------------------------------------------------- /versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.3.0" 3 | 4 | required_providers { 5 | aws = { 6 | source = "hashicorp/aws" 7 | version = ">= 5.53.0" 8 | } 9 | } 10 | } 11 | --------------------------------------------------------------------------------