Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure CPU architecture is configurable #93

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export TF_VAR_scaleway_secret_key=<secret_key>
# export TF_VAR_scaleway_zone="nl-ams-1"
# export TF_VAR_scaleway_type="DEV1-S"
# export TF_VAR_scaleway_image="Ubuntu 22.04 Jammy Jellyfish"

# export TF_VAR_scaleway_image_architecture="x86_64"
```

#### Using DigitalOcean as provider
Expand Down
19 changes: 10 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ module "provider" {
# module "provider" {
# source = "./provider/scaleway"
#
# organization_id = var.scaleway_organization_id
# access_key = var.scaleway_access_key
# secret_key = var.scaleway_secret_key
# zone = var.scaleway_zone
# type = var.scaleway_type
# image = var.scaleway_image
# hosts = var.node_count
# hostname_format = var.hostname_format
# organization_id = var.scaleway_organization_id
# access_key = var.scaleway_access_key
# secret_key = var.scaleway_secret_key
# zone = var.scaleway_zone
# type = var.scaleway_type
# image = var.scaleway_image
# image_architecture = var.scaleway_image_architecture
# hosts = var.node_count
# hostname_format = var.hostname_format
# }

# module "provider" {
Expand Down Expand Up @@ -68,7 +69,7 @@ module "provider" {

# module "provider" {
# source = "./provider/upcloud"
#
#
# username = var.upcloud_username
# password = var.upcloud_password
# hosts = var.node_count
Expand Down
6 changes: 5 additions & 1 deletion provider/scaleway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ variable "image" {
type = string
}

variable "image_architecture" {
type = string
}

variable "apt_packages" {
type = list(any)
default = []
Expand Down Expand Up @@ -64,7 +68,7 @@ resource "scaleway_instance_server" "host" {
}

data "scaleway_instance_image" "image" {
architecture = "x86_64"
architecture = var.image_architecture
name = var.image
}

Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ variable "scaleway_image" {
default = "Ubuntu 22.04 Jammy Jellyfish"
}

variable "scaleway_image_architecture" {
default = "x86_64"
}

/* digitalocean */
variable "digitalocean_token" {
default = ""
Expand Down