1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Add terraform files and config for GCP

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2023-06-21 20:43:07 +01:00
committed by Sunny
parent f6b0c6e7ef
commit 7c1b897919
8 changed files with 310 additions and 2 deletions

View File

@@ -45,6 +45,9 @@ const (
// azureTerraformPath is the path to the folder containing the
// terraform files for azure infra
azureTerraformPath = "./terraform/azure"
// gcpTerraformPath is the path to the folder containing the
// terraform files for gcp infra
gcpTerraformPath = "./terraform/gcp"
// kubeconfigPath is the path of the file containing the kubeconfig
kubeconfigPath = "./build/kubeconfig"
@@ -55,7 +58,7 @@ const (
var (
// supportedProviders are the providers supported by the test.
supportedProviders = []string{"azure"}
supportedProviders = []string{"azure", "gcp"}
// cfg is a struct containing different variables needed for the test.
cfg *testConfig
@@ -269,8 +272,14 @@ func getProviderConfig(provider string) *providerConfig {
getTestConfig: getTestConfigAKS,
registryLogin: registryLoginACR,
}
case "gcp":
return &providerConfig{
terraformPath: gcpTerraformPath,
createKubeconfig: createKubeConfigGKE,
getTestConfig: getTestConfigGKE,
registryLogin: registryLoginGCR,
}
}
return nil
}