Skip to content

Commit 3e87a1c

Browse files
committed
Use the server arch speficied from the product offer
1 parent c925277 commit 3e87a1c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

pkg/api/helpers.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -415,16 +415,7 @@ func CreateServer(api *ScalewayAPI, c *ConfigCreateServer) (string, error) {
415415

416416
arch := os.Getenv("SCW_TARGET_ARCH")
417417
if arch == "" {
418-
switch server.CommercialType[:2] {
419-
case "C1":
420-
arch = "arm"
421-
case "C2", "VC", "X6":
422-
arch = "x86_64"
423-
case "AR":
424-
arch = "arm64"
425-
default:
426-
return "", fmt.Errorf("%s wrong commercial type", server.CommercialType)
427-
}
418+
arch = offer.Arch
428419
}
429420
imageIdentifier := &ScalewayImageIdentifier{
430421
Arch: arch,

0 commit comments

Comments
 (0)