An open API service indexing awesome lists of open source software.

https://github.com/scaleway-terraform-modules/terraform-scaleway-instance

Manage Scaleway instances with Terraform.
https://github.com/scaleway-terraform-modules/terraform-scaleway-instance

instance scaleway scaleway-instance terraform-module

Last synced: about 1 year ago
JSON representation

Manage Scaleway instances with Terraform.

Awesome Lists containing this project

README

          

# Terraform / Scaleway

## Purpose

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

## Usage

- Setup the [scaleway provider](https://www.terraform.io/docs/providers/scaleway/index.html) in your tf file.
- Include this module in your tf file. Refer to [documentation](https://www.terraform.io/docs/modules/sources.html#generic-git-repository).

```hcl
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](#requirement_terraform) | >= 1.3 |
| [scaleway](#requirement_scaleway) | >= 2.28.0 |

## Resources

| Name | Type |
|------|------|
| [scaleway_domain_record.ipv4](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/domain_record) | resource |
| [scaleway_domain_record.ipv6](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/domain_record) | resource |
| [scaleway_instance_ip.ipv6](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_ip) | resource |
| [scaleway_instance_ip.public_ipv4](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_ip) | resource |
| [scaleway_instance_ip_reverse_dns.ipv6](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_ip_reverse_dns) | resource |
| [scaleway_instance_ip_reverse_dns.public_ipv4](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_ip_reverse_dns) | resource |
| [scaleway_instance_server.this](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/instance_server) | resource |
| [scaleway_instance_private_nic.this](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/data-sources/instance_private_nic) | data source |
| [scaleway_ipam_ip.private_ipv4](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/data-sources/ipam_ip) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [additional_volume_ids](#input_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](#input_boot_type) | The boot Type of the server. Default to 'local'. Possible values are: 'local', 'bootscript' or 'rescue'. | `string` | `"local"` | no |
| [bootscript_id](#input_bootscript_id) | ID of the bootscript to use (set boot_type to bootscript). | `string` | `null` | no |
| [domainname](#input_domainname) | Domain name of the instance. If set, instance IPs will be registered in the matching DNS zone. | `string` | `null` | no |
| [enable_ipv6](#input_enable_ipv6) | Determines if IPv6 is enabled for the server. | `bool` | `false` | no |
| [enable_public_ipv4](#input_enable_public_ipv4) | Determines if a public IPv4 will be attached to the server. | `bool` | `false` | no |
| [hostname](#input_hostname) | Name of the instance. If not set, it will be randomly generated by Scaleway. | `string` | `null` | no |
| [image](#input_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](#input_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](#input_placement_group_id) | ID of the placement group the server is attached to. | `string` | `null` | no |
| [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 |
| [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 |
| [user_data](#input_user_data) | User data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using: - string - UTF-8 encoded file content using file - Binary files using filebase64. | `any` | `null` | no |
| [zone](#input_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](#output_ip4) | IPv4 address of the intance. |
| [ip6](#output_ip6) | IPv6 address of the instance. |
| [name](#output_name) | Name of the instance. |

## Authors

Module is maintained with help from [the community](https://github.com/scaleway-terraform-modules/terraform-scaleway-instance/graphs/contributors).

## License

Mozilla Public License 2.0 Licensed. See [LICENSE](https://github.com/scaleway-terraform-modules/terraform-scaleway-instance/tree/master/LICENSE) for full details.