From 76ac1fe1748c444f39990f7582c7d4d00e3da803 Mon Sep 17 00:00:00 2001 From: Benoit Garcia Date: Mon, 6 Nov 2023 20:37:02 +0100 Subject: [PATCH 1/2] chore(docs): Fix versions requirements in the documentation. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8dfac00..e006cfe 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ module "my_instance" { | Name | Version | |------|---------| -| [terraform](#requirement_terraform) | >= 0.13 | +| [terraform](#requirement_terraform) | >= 1.3 | | [scaleway](#requirement_scaleway) | >= 2.2.0 | ## Resources From 6ec8e8922e1bc792e1db02452e3b89815c5ba100 Mon Sep 17 00:00:00 2001 From: Benoit Garcia Date: Mon, 6 Nov 2023 20:39:42 +0100 Subject: [PATCH 2/2] feat: Add support for routed IP addresses. --- README.md | 3 ++- main.tf | 1 + variables.tf | 6 ++++++ versions.tf | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e006cfe..96cd158 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ module "my_instance" { | Name | Version | |------|---------| | [terraform](#requirement_terraform) | >= 1.3 | -| [scaleway](#requirement_scaleway) | >= 2.2.0 | +| [scaleway](#requirement_scaleway) | >= 2.28.0 | ## Resources @@ -60,6 +60,7 @@ module "my_instance" { | [private_networks](#input_private_networks) | Private networks associated with the server. | `list(string)` | `[]` | no | | [project_id](#input_project_id) | ID of the project the namespace is associated with. Ressource will be created in the project set at the provider level if null. | `string` | `null` | no | | [root_volume](#input_root_volume) | Root volume attached to the server on creation. Updates to `root_volume.size_in_gb` will be ignored after the creation of the server. | ```object({ delete_on_termination = bool size_in_gb = number volume_id = optional(string) volume_type = optional(string) })``` | `null` | no | +| [routed_ip_enabled](#input_routed_ip_enabled) | Determine if the instance will support routed ips only. Changing it to true will migrate the server and its IP to routed type. | `bool` | `false` | no | | [security_group_id](#input_security_group_id) | ID of the security group the server is attached to. | `string` | `null` | no | | [state](#input_state) | State of the server. Default to 'started'. Possible values are: 'started', 'stopped' or 'standby'. | `string` | `"started"` | no | | [tags](#input_tags) | Tags associated with the server and dedicated ip address. | `list(string)` | `[]` | no | diff --git a/main.tf b/main.tf index b8f1397..809640c 100644 --- a/main.tf +++ b/main.tf @@ -52,6 +52,7 @@ resource "scaleway_instance_server" "this" { enable_dynamic_ip = var.enable_public_ipv4 enable_ipv6 = var.enable_ipv6 ip_id = var.enable_public_ipv4 == true ? scaleway_instance_ip.this[0].id : null + routed_ip_enabled = var.routed_ip_enabled dynamic "private_network" { for_each = toset(var.private_networks) diff --git a/variables.tf b/variables.tf index 444b469..9dd49a8 100644 --- a/variables.tf +++ b/variables.tf @@ -73,6 +73,12 @@ variable "enable_public_ipv4" { default = false } +variable "routed_ip_enabled" { + type = bool + description = "Determine if the instance will support routed ips only. Changing it to true will migrate the server and its IP to routed type." + default = false +} + variable "private_networks" { type = list(string) description = "Private networks associated with the server." diff --git a/versions.tf b/versions.tf index 4755099..18eb955 100644 --- a/versions.tf +++ b/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { scaleway = { source = "scaleway/scaleway" - version = ">= 2.2.0" + version = ">= 2.28.0" } } }