scaleway/terraform-scaleway-vpc-module
HCL
Captured source
source ↗scaleway/terraform-scaleway-vpc-module
Description: Terraform module for configuring a VPC
Language: HCL
License: Apache-2.0
Stars: 6
Forks: 5
Open issues: 5
Created: 2023-04-14T15:03:41Z
Pushed: 2024-07-10T07:38:05Z
Default branch: main
Fork: no
Archived: no
README:
Scaleway VPC Terraform module
Terraform module that can be used to deploy VPC resources on Scaleway. Common deployment examples can be found in [examples/](./examples).
Usage
The example below provision a basic VPC with a Public Gateway and a Load Balancer with some instances behind it.
module "vpc" {
# to modify
source = "scaleway/vpc-module/scaleway"
version = ">= 1.0.0"
public_gateway_name = "my_public_gw"
private_network_name = "my_vpc"
zones = ["fr-par-1"]
}Requirements
| Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.13 | | [scaleway](#requirement\_scaleway) | >= 2.17 |
Providers
| Name | Version | |------|---------| | [scaleway](#provider\_scaleway) | >= 2.17 |
Modules
No modules.
Resources
| Name | Type | |------|------| | scaleway_vpc_gateway_network.main | resource | | scaleway_vpc_private_network.main | resource | | scaleway_vpc_public_gateway.main | resource | | scaleway_vpc_public_gateway_dhcp.main | resource | | scaleway_vpc_public_gateway_ip.main | resource | | scaleway_vpc_public_gateway_ip_reverse_dns.main | resource | | scaleway_vpc_public_gateway_dhcp_reservation.reservations | data source |
Inputs
| Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [gateway\_dhcp\_address](#input\_gateway\_dhcp\_address) | IP address of the DHCP server. This will be the gateway's address in the Private Network. Defaults to the first address of the subnet. (IP address) | string | "192.168.0.1" | no | | [gateway\_dhcp\_dns\_search](#input\_gateway\_dhcp\_dns\_search) | Array of DNS server IP addresses used to override the DNS server list pushed to DHCP clients, instead of the gateway itself | list(string) | null | no | | [gateway\_dhcp\_dns\_server\_servers\_override](#input\_gateway\_dhcp\_dns\_server\_servers\_override) | A list of additional Array of DNS server IP addresses used to override the DNS server list pushed to DHCP clients, instead of the gateway itself. Default the gateway_dhcp_address | list(string) | [] | no | | [gateway\_dhcp\_enable\_dynamic](#input\_gateway\_dhcp\_enable\_dynamic) | Defines whether to enable dynamic pooling of IPs. When false, only pre-existing DHCP reservations will be handed out. Defaults to true | bool | true | no | | [gateway\_dhcp\_pool\_high](#input\_gateway\_dhcp\_pool\_high) | High IP (inclusive) of the dynamic address pool. Must be in the config's subnet. Defaults to the last address of the subnet. (IP address) | string | "192.168.0.254" | no | | [gateway\_dhcp\_pool\_low](#input\_gateway\_dhcp\_pool\_low) | Low IP (inclusive) of the dynamic address pool. Must be in the config's subnet. Defaults to the second address of the subnet. (IP address) | string | "192.168.0.2" | no | | [gateway\_dhcp\_push\_default\_route](#input\_gateway\_dhcp\_push\_default\_route) | Defines whether the gateway should push a default route to DHCP clients or only hand out IPs. Defaults to true | bool | true | no | | [gateway\_dhcp\_push\_dns\_server](#input\_gateway\_dhcp\_push\_dns\_server) | Defines whether the gateway should push custom DNS servers to clients. This allows for Instance hostname -> IP resolution. Defaults to true. | bool | true | no | | [gateway\_dhcp\_rebind\_timer](#input\_gateway\_dhcp\_rebind\_timer) | After how long a DHCP client will query for a new lease if previous renews fail. Must be 30s lower than valid_lifetime. Defaults to 51m (3060s). (in seconds) | number | 3060 | no | | [gateway\_dhcp\_renew\_timer](#input\_gateway\_dhcp\_renew\_timer) | After how long a renew will be attempted. Must be 30s lower than rebind_timer. Defaults to 50m (3000s). (in seconds) | number | 3000 | no | | [gateway\_dhcp\_subnet](#input\_gateway\_dhcp\_subnet) | Subnet for the DHCP server. | string | "192.168.0.0/24" | no | | [gateway\_dhcp\_valid\_lifetime](#input\_gateway\_dhcp\_valid\_lifetime) | How long DHCP entries will be valid for. Defaults to 1h (3600s). (in seconds | number | 3600 | no | | [gateway\_network\_cleanup\_dhcp](#input\_gateway\_network\_cleanup\_dhcp) | Defines whether to clean up attached DHCP configurations (if any, and if not attached to another Gateway Network) | bool | true | no | | [gateway\_network\_enable\_masquerade](#input\_gateway\_network\_enable\_masquerade) | Defines whether the gateway should masquerade traffic for the attached Private Network (i.e. whether to enable dynamic NAT) | bool | true | no | | [gateway\_reverse\_dns](#input\_gateway\_reverse\_dns) | Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project | bool | false | no | | [instances](#input\_instances) | A map of interface and/or instance mac addresses containing their properties | any | {} | no | | [list\_reservations](#input\_list\_reservations) | Defines whether to list reservations addresses) | bool | false | no | | [name](#input\_name) | Name to be used on all the resources as identifier | string | "" | no | | [private\_network\_ipv4\_subnet](#input\_private\_network\_ipv4\_subnet) | IPv4 subnet to be used on private network resource | string | "192.168.0.0/24" | no | | [private\_network\_name](#input\_private\_network\_name) | Name to be used on private network resource as identifier | string | "" | no | |…
Excerpt shown — open the source for the full document.