Skip to content

Commit be06d88

Browse files
tbobmbenoit-garcia
authored andcommitted
fix(user-data): allow cloud-init configuration
Signed-off-by: Theo Bob Massard <[email protected]>
1 parent b0572c4 commit be06d88

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module "my_instance" {
6767
| <a name="input_security_group_id"></a> [security_group_id](#input_security_group_id) | ID of the security group the server is attached to. | `string` | `null` | no |
6868
| <a name="input_state"></a> [state](#input_state) | State of the server. Default to 'started'. Possible values are: 'started', 'stopped' or 'standby'. | `string` | `"started"` | no |
6969
| <a name="input_tags"></a> [tags](#input_tags) | Tags associated with the server and dedicated ip address. | `list(string)` | `[]` | no |
70+
| <a name="input_user_data"></a> [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 |
7071
| <a name="input_zone"></a> [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 |
7172

7273
## Outputs

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ resource "scaleway_instance_server" "this" {
3737
boot_type = var.boot_type
3838
bootscript_id = var.bootscript_id
3939
state = var.state
40-
# user_data = var.user_data
40+
user_data = var.user_data
4141

4242
project_id = var.project_id
4343
zone = var.zone

variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ variable "state" {
108108
}
109109
}
110110

111-
# variable "user_data" {
112-
# type = any
113-
# description = "User data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:\n- string\n- UTF-8 encoded file content using file\n- Binary files using filebase64."
114-
# default = null
115-
# }
111+
variable "user_data" {
112+
type = any
113+
description = "User data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:\n- string\n- UTF-8 encoded file content using file\n- Binary files using filebase64."
114+
default = null
115+
}
116116

117117
# Location & Tenancy
118118
variable "project_id" {

0 commit comments

Comments
 (0)