Skip to content

Latest commit

 

History

History
104 lines (84 loc) · 9.68 KB

README.md

File metadata and controls

104 lines (84 loc) · 9.68 KB

Scaleway VPC Terraform module

Terraform module that can be used to deploy VPC resources on Scaleway. Common deployment examples can be found in 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 >= 0.13
scaleway >= 2.17

Providers

Name Version
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 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 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 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 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 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 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 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 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 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 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 Subnet for the DHCP server. string "192.168.0.0/24" no
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 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 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 Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project bool false no
instances A map of interface and/or instance mac addresses containing their properties any {} no
list_reservations Defines whether to list reservations addresses) bool false no
name Name to be used on all the resources as identifier string "" no
private_network_ipv4_subnet IPv4 subnet to be used on private network resource string "192.168.0.0/24" no
private_network_name Name to be used on private network resource as identifier string "" no
public_gateway_bastion_enabled Defines whether SSH bastion is enabled on the gateway bool true no
public_gateway_enable_smtp Defines whether SMTP is allowed on the gateway bool false no
public_gateway_name Name to be used on gateway resource as identifier string "" no
reverse_dns_zone Reverse domain name for the IP address string false no
tags A list of tags to add to all resources list(string) [] no
timeouts Define maximum timeout for creating, updating, and deleting VPC resources map(string) {} no
vpc_public_gateway_type Type to be used on gateway resource as default string "VPC-GW-S" no
vpc_tags Additional tags for the VPC list(string) [] no
wait_reservations Determines whether wait reservations are available bool true no
zones A list of availability zones in the region list(string) [] no

Outputs

Name Description
dhcp_reservations ID of VPC Gateway DHCP reservations.
private_network_id ID of private networks.
public_gateway_id ID of public gateways.
public_gateway_ip_address Address of the public gateway IP.
public_gateway_ip_id ID of gateway IP.

Refresh documentation

To create the Readme.md, we use Terraform-docs. The configuration is in the file .terraform-docs.yml. If you want to refresh the Readme.md, from the root of the module execute the following command:

terraform-docs .