From 612b0fc1439b8c8bd550761e25ac229053d24e12 Mon Sep 17 00:00:00 2001 From: AkbaraliShaikh Date: Tue, 17 Sep 2024 14:22:42 +0530 Subject: [PATCH] Change the default CSP url Signed-off-by: AkbaraliShaikh --- README.md | 2 +- docs/guides/provider_behind_proxy.md | 4 ++-- docs/index.md | 4 ++-- examples/provider/provider.tf | 4 ++-- examples/provider/variables.tf | 3 ++- examples/proxy/provider.tf | 4 ++-- examples/proxy/variables.tf | 2 +- internal/authctx/constants.go | 2 +- internal/resources/ekscluster/resource_ekscluster_test.go | 2 +- .../resources/gitrepository/resource_git_repository_test.go | 2 +- internal/resources/helmcharts/helm_charts_data_source_test.go | 2 +- internal/resources/helmfeature/resource_helm_feature_test.go | 2 +- internal/resources/helmrelease/resource_helm_release_test.go | 2 +- .../resources/helmrepository/repository_data_source_test.go | 2 +- internal/resources/kubernetessecret/resource_secret_test.go | 2 +- .../resources/kustomization/resource_kustomization_test.go | 2 +- .../managementcluster/management_cluster_registration_test.go | 2 +- internal/resources/package/data_source_package_test.go | 2 +- internal/resources/packages/data_source_packages_test.go | 2 +- .../kind/mutation/resource/resource_mutation_policy_test.go | 2 +- .../kind/network/resource/resource_network_policy_test.go | 2 +- internal/resources/provisioner/provisioner_resource_test.go | 2 +- internal/resources/sourcesecret/resource_sourcesecret_test.go | 2 +- .../tanzupackageinstall/package_install_resource_test.go | 2 +- .../tanzupackagerepository/data_source_repository_test.go | 2 +- .../resource_package_repository_test.go | 2 +- 26 files changed, 31 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 984805af8..b8553c791 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Example: ```shell $ export TMC_ENDPOINT = my-org.tmc.cloud.vmware.com -$ export VMW_CLOUD_ENDPOINT = console.cloud.vmware.com +$ export VMW_CLOUD_ENDPOINT = console.tanzu.broadcom.com ``` Environment variables specific to particular resources: diff --git a/docs/guides/provider_behind_proxy.md b/docs/guides/provider_behind_proxy.md index accfda699..06effa063 100644 --- a/docs/guides/provider_behind_proxy.md +++ b/docs/guides/provider_behind_proxy.md @@ -21,8 +21,8 @@ provider "tanzu-mission-control" { vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var # if you are using dev or different csp endpoint, change the default value below - # for production environments the vmw_cloud_endpoint is console.cloud.vmware.com - # vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var + # for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com + # vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var # the following values shall be only populated when the provider needs to be used behind a proxy. # these values will only work if the user provides HTTP_PROXY or HTTPS_PROXY env var diff --git a/docs/index.md b/docs/index.md index 5fd52e3d7..fd3251803 100644 --- a/docs/index.md +++ b/docs/index.md @@ -74,8 +74,8 @@ provider "tanzu-mission-control" { vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var # if you are using dev or different csp endpoint, change the default value below - # for production environments the vmw_cloud_endpoint is console.cloud.vmware.com - # vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var + # for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com + # vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var } # Provider configuration for TMC Self-Managed diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 77c52d45c..27ef2edb8 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -4,8 +4,8 @@ provider "tanzu-mission-control" { vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var # if you are using dev or different csp endpoint, change the default value below - # for production environments the vmw_cloud_endpoint is console.cloud.vmware.com - # vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var + # for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com + # vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var } # Provider configuration for TMC Self-Managed diff --git a/examples/provider/variables.tf b/examples/provider/variables.tf index ef33a6278..5c46ff3fe 100644 --- a/examples/provider/variables.tf +++ b/examples/provider/variables.tf @@ -2,10 +2,11 @@ variable "endpoint" { } variable "vmw_cloud_api_token" { + default = "https://console.tanzu.broadcom.com" } variable "vmw_cloud_endpoint" { - default = "console.cloud.vmware.com" + default = "console.tanzu.broadcom.com" } variable "oidc_issuer" { diff --git a/examples/proxy/provider.tf b/examples/proxy/provider.tf index f93a710ce..380397606 100644 --- a/examples/proxy/provider.tf +++ b/examples/proxy/provider.tf @@ -3,8 +3,8 @@ provider "tanzu-mission-control" { vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var # if you are using dev or different csp endpoint, change the default value below - # for production environments the vmw_cloud_endpoint is console.cloud.vmware.com - # vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var + # for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com + # vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var # the following values shall be only populated when the provider needs to be used behind a proxy. # these values will only work if the user provides HTTP_PROXY or HTTPS_PROXY env var diff --git a/examples/proxy/variables.tf b/examples/proxy/variables.tf index f176ce7ae..c882a09e0 100644 --- a/examples/proxy/variables.tf +++ b/examples/proxy/variables.tf @@ -8,7 +8,7 @@ variable "client_auth_key" {} variable "ca_cert" {} variable "vmw_cloud_endpoint" { - default = "console.cloud.vmware.com" + default = "console.tanzu.broadcom.com" } variable "insecure_allow_unverified_ssl" { diff --git a/internal/authctx/constants.go b/internal/authctx/constants.go index c8ae183fb..6c794b12f 100644 --- a/internal/authctx/constants.go +++ b/internal/authctx/constants.go @@ -10,7 +10,7 @@ const ( projectID = "project_id" vmwCloudEndpoint = "vmw_cloud_endpoint" vmwCloudAPIToken = "vmw_cloud_api_token" - defaultCSPEndpoint = "console.cloud.vmware.com" + defaultCSPEndpoint = "console.tanzu.broadcom.com" selfManaged = "self_managed" oidcIssuer = "oidc_issuer" smUsername = "username" diff --git a/internal/resources/ekscluster/resource_ekscluster_test.go b/internal/resources/ekscluster/resource_ekscluster_test.go index c7e1f5aed..9b4c7d373 100644 --- a/internal/resources/ekscluster/resource_ekscluster_test.go +++ b/internal/resources/ekscluster/resource_ekscluster_test.go @@ -274,7 +274,7 @@ func TestAcceptanceForMkpClusterResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") setupHTTPMocks(t, clusterName) diff --git a/internal/resources/gitrepository/resource_git_repository_test.go b/internal/resources/gitrepository/resource_git_repository_test.go index d581953d9..6ad2e252c 100644 --- a/internal/resources/gitrepository/resource_git_repository_test.go +++ b/internal/resources/gitrepository/resource_git_repository_test.go @@ -60,7 +60,7 @@ func TestAcceptanceForGitRepositoryResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") testConfig.setupHTTPMocks(t) diff --git a/internal/resources/helmcharts/helm_charts_data_source_test.go b/internal/resources/helmcharts/helm_charts_data_source_test.go index 91e7ee2a1..81148f80b 100644 --- a/internal/resources/helmcharts/helm_charts_data_source_test.go +++ b/internal/resources/helmcharts/helm_charts_data_source_test.go @@ -39,7 +39,7 @@ func TestAcceptanceForHelmChratsDataSource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/helmfeature/resource_helm_feature_test.go b/internal/resources/helmfeature/resource_helm_feature_test.go index 0aae3b872..f25627a45 100644 --- a/internal/resources/helmfeature/resource_helm_feature_test.go +++ b/internal/resources/helmfeature/resource_helm_feature_test.go @@ -57,7 +57,7 @@ func TestAcceptanceForHelmFeatureResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") os.Setenv("ORG_ID", "bc27608b-4809-4cac-9e04-778803963da2") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/helmrelease/resource_helm_release_test.go b/internal/resources/helmrelease/resource_helm_release_test.go index c130bf74b..1e67fc1cc 100644 --- a/internal/resources/helmrelease/resource_helm_release_test.go +++ b/internal/resources/helmrelease/resource_helm_release_test.go @@ -61,7 +61,7 @@ func TestAcceptanceForHelmReleaseResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") os.Setenv("ORG_ID", "bc27608b-4809-4cac-9e04-778803963da2") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/helmrepository/repository_data_source_test.go b/internal/resources/helmrepository/repository_data_source_test.go index 017db9ede..6f0c017ce 100644 --- a/internal/resources/helmrepository/repository_data_source_test.go +++ b/internal/resources/helmrepository/repository_data_source_test.go @@ -41,7 +41,7 @@ func TestAcceptanceForHelmRepositoryDataSource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/kubernetessecret/resource_secret_test.go b/internal/resources/kubernetessecret/resource_secret_test.go index 9c651339d..874f7b85b 100644 --- a/internal/resources/kubernetessecret/resource_secret_test.go +++ b/internal/resources/kubernetessecret/resource_secret_test.go @@ -60,7 +60,7 @@ func TestAcceptanceForSecretResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") } else { diff --git a/internal/resources/kustomization/resource_kustomization_test.go b/internal/resources/kustomization/resource_kustomization_test.go index 901a7073a..7e5ef180e 100644 --- a/internal/resources/kustomization/resource_kustomization_test.go +++ b/internal/resources/kustomization/resource_kustomization_test.go @@ -61,7 +61,7 @@ func TestAcceptanceForKustomizationResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/managementcluster/management_cluster_registration_test.go b/internal/resources/managementcluster/management_cluster_registration_test.go index 217f0b02f..e8cb20ac3 100644 --- a/internal/resources/managementcluster/management_cluster_registration_test.go +++ b/internal/resources/managementcluster/management_cluster_registration_test.go @@ -47,7 +47,7 @@ func TestAcceptanceForManagementClusterRegistrationResource(t *testing.T) { os.Setenv(authctx.ServerEndpointEnvVar, endpoint) os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") setupHTTPMocks(t) setUpOrgPolicyEndPointMocks(t, endpoint, tkgsSimpleName, clustermodel.NewVmwareTanzuManageV1alpha1CommonClusterKubernetesProviderType("VMWARE_TANZU_KUBERNETES_GRID_SERVICE")) diff --git a/internal/resources/package/data_source_package_test.go b/internal/resources/package/data_source_package_test.go index e41dba9ee..da0b8718e 100644 --- a/internal/resources/package/data_source_package_test.go +++ b/internal/resources/package/data_source_package_test.go @@ -42,7 +42,7 @@ func TestAcceptanceForPackageDataSource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/packages/data_source_packages_test.go b/internal/resources/packages/data_source_packages_test.go index b4d9e3eec..d840abfca 100644 --- a/internal/resources/packages/data_source_packages_test.go +++ b/internal/resources/packages/data_source_packages_test.go @@ -41,7 +41,7 @@ func TestAcceptanceForPackagesDataSource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/policy/kind/mutation/resource/resource_mutation_policy_test.go b/internal/resources/policy/kind/mutation/resource/resource_mutation_policy_test.go index c95866345..be2e5d433 100644 --- a/internal/resources/policy/kind/mutation/resource/resource_mutation_policy_test.go +++ b/internal/resources/policy/kind/mutation/resource/resource_mutation_policy_test.go @@ -48,7 +48,7 @@ func TestAcceptanceForMutationPolicyResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "play.abc.def.ghi.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") testConfig.ScopeHelperResources.OrgID = "dummy_org" testConfig.setupHTTPMocks(t) diff --git a/internal/resources/policy/kind/network/resource/resource_network_policy_test.go b/internal/resources/policy/kind/network/resource/resource_network_policy_test.go index 144bf86f4..70d5fffc9 100644 --- a/internal/resources/policy/kind/network/resource/resource_network_policy_test.go +++ b/internal/resources/policy/kind/network/resource/resource_network_policy_test.go @@ -61,7 +61,7 @@ func TestAcceptanceForNetworkPolicyResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "play.abc.def.ghi.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") testConfig.ScopeHelperResources.OrgID = "dummy_org" testConfig.setupHTTPMocks(t) diff --git a/internal/resources/provisioner/provisioner_resource_test.go b/internal/resources/provisioner/provisioner_resource_test.go index b53a3a5ee..b239363b9 100644 --- a/internal/resources/provisioner/provisioner_resource_test.go +++ b/internal/resources/provisioner/provisioner_resource_test.go @@ -39,7 +39,7 @@ func TestAcceptanceForProvisionerResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv(authctx.ServerEndpointEnvVar, endpoint) os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") setupHTTPMocks(t) setUpProvisionerEndPointMocks(t, endpoint, provisionerName) diff --git a/internal/resources/sourcesecret/resource_sourcesecret_test.go b/internal/resources/sourcesecret/resource_sourcesecret_test.go index eb3e69ac3..c5d535964 100644 --- a/internal/resources/sourcesecret/resource_sourcesecret_test.go +++ b/internal/resources/sourcesecret/resource_sourcesecret_test.go @@ -60,7 +60,7 @@ func TestAcceptanceForSourceSecretResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") testConfig.setupHTTPMocks(t) diff --git a/internal/resources/tanzupackageinstall/package_install_resource_test.go b/internal/resources/tanzupackageinstall/package_install_resource_test.go index ab09d0e04..a83325ff6 100644 --- a/internal/resources/tanzupackageinstall/package_install_resource_test.go +++ b/internal/resources/tanzupackageinstall/package_install_resource_test.go @@ -60,7 +60,7 @@ func TestAcceptanceForPackageInstallResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/tanzupackagerepository/data_source_repository_test.go b/internal/resources/tanzupackagerepository/data_source_repository_test.go index 65e6c9f7c..e63790bb1 100644 --- a/internal/resources/tanzupackagerepository/data_source_repository_test.go +++ b/internal/resources/tanzupackagerepository/data_source_repository_test.go @@ -31,7 +31,7 @@ func TestAcceptanceForPackageRepositoryDataSource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...") diff --git a/internal/resources/tanzupackagerepository/resource_package_repository_test.go b/internal/resources/tanzupackagerepository/resource_package_repository_test.go index c1d3d48f1..19feb3bd6 100644 --- a/internal/resources/tanzupackagerepository/resource_package_repository_test.go +++ b/internal/resources/tanzupackagerepository/resource_package_repository_test.go @@ -58,7 +58,7 @@ func TestAcceptanceForPackageRepositoryResource(t *testing.T) { os.Setenv("TF_ACC", "true") os.Setenv("TMC_ENDPOINT", "dummy.tmc.mock.vmware.com") os.Setenv("VMW_CLOUD_API_TOKEN", "dummy") - os.Setenv("VMW_CLOUD_ENDPOINT", "console.cloud.vmware.com") + os.Setenv("VMW_CLOUD_ENDPOINT", "console.tanzu.broadcom.com") log.Println("Setting up the mock endpoints...")