Skip to content

Commit 8333b53

Browse files
committed
Remove OS check on VPS because API is no longer behaving as it did
1 parent 185c4e2 commit 8333b53

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

resource_transip_vps.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -170,25 +170,6 @@ func resourceVpsCreate(d *schema.ResourceData, m interface{}) error {
170170
return fmt.Errorf("Product %s is invalid. Valid product names are: %v", productName, availableProducts)
171171
}
172172

173-
// query with fake vps name "x"
174-
availableOss, err := repository.GetOperatingSystems("x")
175-
if err != nil {
176-
return fmt.Errorf("Failed to get available operating systems: %s", err)
177-
}
178-
validOs := false
179-
var osNames []string
180-
for _, os := range availableOss {
181-
osNames = append(osNames, os.Name)
182-
}
183-
for _, osName := range osNames {
184-
if osName == operatingSystem {
185-
validOs = true
186-
}
187-
}
188-
if !validOs {
189-
return fmt.Errorf("Operating system %s is invalid. Valid operating system names are: %v", operatingSystem, osNames)
190-
}
191-
192173
base64InstallText := base64.StdEncoding.EncodeToString([]byte(installText))
193174

194175
// Generate a unique temporary description to assign during VPS creation so we can reference

0 commit comments

Comments
 (0)