Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terraform-aws-modules/terraform-aws-customer-gateway
Terraform module to create AWS Customer Gateway resources πΊπ¦
https://github.com/terraform-aws-modules/terraform-aws-customer-gateway
aws aws-vpn terraform-module
Last synced: 29 days ago
JSON representation
Terraform module to create AWS Customer Gateway resources πΊπ¦
- Host: GitHub
- URL: https://github.com/terraform-aws-modules/terraform-aws-customer-gateway
- Owner: terraform-aws-modules
- License: apache-2.0
- Created: 2017-09-26T08:35:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-30T11:37:12.000Z (5 months ago)
- Last Synced: 2024-09-27T19:21:05.764Z (about 1 month ago)
- Topics: aws, aws-vpn, terraform-module
- Language: HCL
- Homepage: https://registry.terraform.io/modules/terraform-aws-modules/customer-gateway/aws
- Size: 46.9 KB
- Stars: 17
- Watchers: 5
- Forks: 52
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tf - terraform-aws-customer-gateway - Creates Customer Gateway on AWS. (Community Modules / Miscellaneous)
README
# AWS Customer Gateway Terraform module
Terraform module which creates AWS Customer Gateway resources on AWS.
This module has been extracted from the [VPC](https://github.com/terraform-aws-modules/terraform-aws-vpc) module, because sometimes it makes sense to reuse Customer Gateways across multiple VPC resources. Check out other related modules - [VPC](https://github.com/terraform-aws-modules/terraform-aws-vpc), [VPN Gateway](https://github.com/terraform-aws-modules/terraform-aws-vpn-gateway) and [Transit Gateway](https://github.com/terraform-aws-modules/terraform-aws-transit-gateway) for more details.
## Usage
```hcl
module "cgw" {
source = "terraform-aws-modules/customer-gateway/aws"
version = "~> 1.0"name = "test-cgw"
customer_gateways = {
IP1 = {
bgp_asn = 65112
ip_address = "49.33.1.162"
},
IP2 = {
bgp_asn = 65112
ip_address = "85.38.42.93"
}
}tags = {
Test = "maybe"
}
}
```## Examples
- [Complete example](https://github.com/terraform-aws-modules/terraform-aws-customer-gateway/tree/master/examples/complete) creates 2 Customer Gateways, a VPC and creates 2 VPN connections between them.
## Conditional creation
Sometimes you need to have a way to create Customer Gateway conditionally but Terraform does not allow to use `count` inside `module` block, so the solution is to specify argument `create`.
```hcl
# This CGW will not be created
module "cgw" {
source = "terraform-aws-modules/customer-gateway/aws"
version = "~> 1.0"create = false
# ... omitted
}
```## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0 |
| [aws](#requirement\_aws) | >= 4.0 |## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_customer_gateway.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/customer_gateway) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [create](#input\_create) | Whether to create Customer Gateway resources | `bool` | `true` | no |
| [customer\_gateways](#input\_customer\_gateways) | Maps of Customer Gateway's attributes (BGP ASN and Gateway's Internet-routable external IP address) | `map(map(any))` | `{}` | no |
| [name](#input\_name) | Name to be used on all the resources as identifier | `string` | `""` | no |
| [tags](#input\_tags) | A mapping of tags to assign to all resources | `map(string)` | `{}` | no |## Outputs
| Name | Description |
|------|-------------|
| [customer\_gateway](#output\_customer\_gateway) | Map of Customer Gateway attributes |
| [ids](#output\_ids) | List of IDs of Customer Gateway |## Authors
Module is maintained by [Anton Babenko](https://github.com/antonbabenko) with help from [these awesome contributors](https://github.com/terraform-aws-modules/terraform-aws-customer-gateway/graphs/contributors).
## License
Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-customer-gateway/tree/master/LICENSE) for full details.