Skip to content

Commit 6937861

Browse files
modular-magicianEdward Sun
and
Edward Sun
authored
fixed basePath (#6309) (#12145)
Co-authored-by: Edward Sun <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Edward Sun <[email protected]>
1 parent 9c63579 commit 6937861

4 files changed

+8
-5
lines changed

.changelog/6309.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
Cloud IAM: fixed incorrect basePath for `IAMBetaBasePathKey` on `google_iam_workload_identity_pool` (ga)
3+
```

google/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ var DefaultBasePaths = map[string]string{
382382
GameServicesBasePathKey: "https://gameservices.googleapis.com/v1/",
383383
GKEHubBasePathKey: "https://gkehub.googleapis.com/v1/",
384384
HealthcareBasePathKey: "https://healthcare.googleapis.com/v1/",
385-
IAMBetaBasePathKey: "https://iam.googleapis.com/v/",
385+
IAMBetaBasePathKey: "https://iam.googleapis.com/v1/",
386386
IapBasePathKey: "https://iap.googleapis.com/v1/",
387387
IdentityPlatformBasePathKey: "https://identitytoolkit.googleapis.com/v2/",
388388
KMSBasePathKey: "https://cloudkms.googleapis.com/v1/",

google/resource_iam_workload_identity_pool_provider_sweeper_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func testSweepIAMBetaWorkloadIdentityPoolProvider(region string) error {
6161
},
6262
}
6363

64-
listTemplate := strings.Split("https://iam.googleapis.com/v/projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}/providers", "?")[0]
64+
listTemplate := strings.Split("https://iam.googleapis.com/v1/projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}/providers", "?")[0]
6565
listUrl, err := replaceVars(d, config, listTemplate)
6666
if err != nil {
6767
log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err)
@@ -103,7 +103,7 @@ func testSweepIAMBetaWorkloadIdentityPoolProvider(region string) error {
103103
continue
104104
}
105105

106-
deleteTemplate := "https://iam.googleapis.com/v/projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}/providers/{{workload_identity_pool_provider_id}}"
106+
deleteTemplate := "https://iam.googleapis.com/v1/projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}/providers/{{workload_identity_pool_provider_id}}"
107107
deleteUrl, err := replaceVars(d, config, deleteTemplate)
108108
if err != nil {
109109
log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err)

google/resource_iam_workload_identity_pool_sweeper_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func testSweepIAMBetaWorkloadIdentityPool(region string) error {
6161
},
6262
}
6363

64-
listTemplate := strings.Split("https://iam.googleapis.com/v/projects/{{project}}/locations/global/workloadIdentityPools", "?")[0]
64+
listTemplate := strings.Split("https://iam.googleapis.com/v1/projects/{{project}}/locations/global/workloadIdentityPools", "?")[0]
6565
listUrl, err := replaceVars(d, config, listTemplate)
6666
if err != nil {
6767
log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err)
@@ -103,7 +103,7 @@ func testSweepIAMBetaWorkloadIdentityPool(region string) error {
103103
continue
104104
}
105105

106-
deleteTemplate := "https://iam.googleapis.com/v/projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}"
106+
deleteTemplate := "https://iam.googleapis.com/v1/projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}"
107107
deleteUrl, err := replaceVars(d, config, deleteTemplate)
108108
if err != nil {
109109
log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err)

0 commit comments

Comments
 (0)