Skip to content

scaleway-terraform-modules/terraform-scaleway-instance

Terraform / Scaleway

Purpose

This repository is used to deploy an instance on scaleway using terraform.

Usage

module "my_instance" {
  source  = "scaleway-terraform-modules/instance/scaleway"
  version = "2.0.0"

  instance_type = "PLAY2-PICO"
  image         = "fr-par-2/3f9ace44-c310-4a9e-b28f-960b9c7fc848"

  hostname   = "my_instance"
  domainname = "example.com"

  enable_ipv6        = false
  enable_public_ipv4 = false
}

Requirements

Name Version
terraform >= 1.3
scaleway >= 2.28.0

Resources

Name Type
scaleway_domain_record.ipv4 resource
scaleway_domain_record.ipv6 resource
scaleway_instance_ip.ipv6 resource
scaleway_instance_ip.public_ipv4 resource
scaleway_instance_ip_reverse_dns.ipv6 resource
scaleway_instance_ip_reverse_dns.public_ipv4 resource
scaleway_instance_server.this resource
scaleway_instance_private_nic.this data source
scaleway_ipam_ip.private_ipv4 data source

Inputs

Name Description Type Default Required
additional_volume_ids Additional volumes attached to the server. Updates to this field will trigger a stop/start of the server. list(string) [] no
boot_type The boot Type of the server. Default to 'local'. Possible values are: 'local', 'bootscript' or 'rescue'. string "local" no
bootscript_id ID of the bootscript to use (set boot_type to bootscript). string null no
domainname Domain name of the instance. If set, instance IPs will be registered in the matching DNS zone. string null no
enable_ipv6 Determines if IPv6 is enabled for the server. bool false no
enable_public_ipv4 Determines if a public IPv4 will be attached to the server. bool false no
hostname Name of the instance. If not set, it will be randomly generated by Scaleway. string null no
image UUID or the label of the base image used by the server. Must be null if root_volume.volume_id is used. string null no
instance_type Commercial type of the server. Default to 'DEV1-S'. Updates to this field will recreate a new resource. string "DEV1-S" no
placement_group_id ID of the placement group the server is attached to. string null no
private_networks Private networks associated with the server. list(string) [] no
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 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 Determine if the instance will support routed ips only. Changing it to true will migrate the server and its IP to routed type. bool true no
security_group_id ID of the security group the server is attached to. string null no
state State of the server. Default to 'started'. Possible values are: 'started', 'stopped' or 'standby'. string "started" no
tags Tags associated with the server and dedicated ip address. list(string) [] no
zone The zone in which the instance should be created. Ressource will be created in the zone set at the provider level if null. string null no

Outputs

Name Description
ip4 IPv4 address of the intance.
ip6 IPv6 address of the instance.
name Name of the instance.

Authors

Module is maintained with help from the community.

License

Mozilla Public License 2.0 Licensed. See LICENSE for full details.