-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
cloud-gcpGoogle CloudGoogle Cloudtechnical-debtRefactoring, linting & tidyingRefactoring, linting & tidying
Description
Context: #718 (comment)
Culprit:
terraform-provider-iterative/iterative/gcp/provider.go
Lines 441 to 522 in fd4a940
instanceTypes := make(map[string]map[string]map[string]string) | |
instanceTypes["m"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "0", | |
"type": "", | |
}, | |
"machine": { | |
"type": "e2-custom-8-32768", | |
}, | |
} | |
instanceTypes["l"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "0", | |
"type": "", | |
}, | |
"machine": { | |
"type": "e2-custom-32-131072", | |
}, | |
} | |
instanceTypes["xl"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "0", | |
"type": "", | |
}, | |
"machine": { | |
"type": "n2-custom-64-262144", | |
}, | |
} | |
instanceTypes["m+k80"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "1", | |
"type": "nvidia-tesla-k80", | |
}, | |
"machine": { | |
"type": "custom-8-53248", | |
}, | |
} | |
instanceTypes["l+k80"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "4", | |
"type": "nvidia-tesla-k80", | |
}, | |
"machine": { | |
"type": "custom-32-131072", | |
}, | |
} | |
instanceTypes["xl+k80"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "8", | |
"type": "nvidia-tesla-k80", | |
}, | |
"machine": { | |
"type": "custom-64-212992-ext", | |
}, | |
} | |
instanceTypes["m+v100"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "1", | |
"type": "nvidia-tesla-v100", | |
}, | |
"machine": { | |
"type": "custom-8-65536-ext", | |
}, | |
} | |
instanceTypes["l+v100"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "4", | |
"type": "nvidia-tesla-v100", | |
}, | |
"machine": { | |
"type": "custom-32-262144-ext", | |
}, | |
} | |
instanceTypes["xl+v100"] = map[string]map[string]string{ | |
"accelerator": { | |
"count": "8", | |
"type": "nvidia-tesla-v100", | |
}, | |
"machine": { | |
"type": "custom-64-524288-ext", | |
}, | |
} |
Ideally the solution is reuseable for parsing machine types for runner
and task
Metadata
Metadata
Assignees
Labels
cloud-gcpGoogle CloudGoogle Cloudtechnical-debtRefactoring, linting & tidyingRefactoring, linting & tidying