Skip to content

Commit 96c85ab

Browse files
fix documentations and error messages (#6927) (#13314)
Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]>
1 parent 6bb9939 commit 96c85ab

5 files changed

+15
-12
lines changed

.changelog/6927.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
Fixed some issues in Terraform documentations and error messages.
3+
```

google/resource_iam_workforce_pool.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ func validateWorkforcePoolId(v interface{}, k string) (ws []string, errors []err
3838

3939
if !regexp.MustCompile(workforcePoolIdRegexp).MatchString(value) {
4040
errors = append(errors, fmt.Errorf(
41-
"Workforce Pool Id \"%q\" must contain only lowercase letters [a-z], digits [0-9], and hyphens "+
41+
"%q (%q) must contain only lowercase letters [a-z], digits [0-9], and hyphens "+
4242
"[-]. The WorkforcePool ID must be between 6 and 63 characters, begin "+
43-
"with a letter, and cannot have a trailing hyphen.", k))
43+
"with a letter, and cannot have a trailing hyphen.", k, value))
4444
}
4545

4646
return
@@ -125,7 +125,7 @@ Format: 'locations/{location}/workforcePools/{workforcePoolId}'`,
125125
* ACTIVE: The pool is active, and may be used in Google Cloud policies.
126126
* DELETED: The pool is soft-deleted. Soft-deleted pools are permanently deleted
127127
after approximately 30 days. You can restore a soft-deleted pool using
128-
[UndeleteWorkforcePool][WorkforcePools.UndeleteWorkforcePool].
128+
[workforcePools.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools/undelete#google.iam.admin.v1.WorkforcePools.UndeleteWorkforcePool).
129129
You cannot reuse the ID of a soft-deleted pool until it is permanently deleted.
130130
While a pool is deleted, you cannot use it to exchange tokens, or use
131131
existing tokens to access resources. If the pool is undeleted, existing

google/resource_iam_workforce_pool_provider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ func validateWorkforcePoolProviderId(v interface{}, k string) (ws []string, erro
3232

3333
if strings.HasPrefix(value, "gcp-") {
3434
errors = append(errors, fmt.Errorf(
35-
"%q \"%q\" can not start with \"gcp-\". "+
35+
"%q (%q) can not start with \"gcp-\". "+
3636
"The prefix `gcp-` is reserved for use by Google, and may not be specified.", k, value))
3737
}
3838

3939
if !regexp.MustCompile(workforcePoolProviderIdRegexp).MatchString(value) {
4040
errors = append(errors, fmt.Errorf(
41-
"Workforce Pool Provider Id \"%q\" must be 4-32 characters, and may contain the characters [a-z0-9-].", value))
41+
"%q (%q) must be 4-32 characters, and may contain the characters [a-z0-9-].", k, value))
4242
}
4343

4444
return

website/docs/r/iam_workforce_pool.html.markdown

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ description: |-
2222

2323
Represents a collection of external workforces. Provides namespaces for
2424
federated users that can be referenced in IAM policies.
25-
Note: Ask your Google Cloud account team to request access to workforce identity
26-
federation for your billing/quota project. The account team notifies you when the project is
27-
granted access.
2825

2926

3027
To get more information about WorkforcePool, see:
@@ -33,6 +30,9 @@ To get more information about WorkforcePool, see:
3330
* How-to Guides
3431
* [Manage pools](https://cloud.google.com/iam/docs/manage-workforce-identity-pools-providers#manage_pools)
3532

33+
~> **Note:** Ask your Google Cloud account team to request access to workforce identity federation for
34+
your billing/quota project. The account team notifies you when the project is granted access.
35+
3636
## Example Usage - Iam Workforce Pool Basic
3737

3838

@@ -119,7 +119,7 @@ In addition to the arguments listed above, the following computed attributes are
119119
* ACTIVE: The pool is active, and may be used in Google Cloud policies.
120120
* DELETED: The pool is soft-deleted. Soft-deleted pools are permanently deleted
121121
after approximately 30 days. You can restore a soft-deleted pool using
122-
[UndeleteWorkforcePool][WorkforcePools.UndeleteWorkforcePool].
122+
[workforcePools.undelete](https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools/undelete#google.iam.admin.v1.WorkforcePools.UndeleteWorkforcePool).
123123
You cannot reuse the ID of a soft-deleted pool until it is permanently deleted.
124124
While a pool is deleted, you cannot use it to exchange tokens, or use
125125
existing tokens to access resources. If the pool is undeleted, existing

website/docs/r/iam_workforce_pool_provider.html.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ description: |-
2121
# google\_iam\_workforce\_pool\_provider
2222

2323
A configuration for an external identity provider.
24-
~> **Note:** Ask your Google Cloud account team to request access to workforce identity
25-
federation for your billing/quota project. The account team notifies you when the project is
26-
granted access.
2724

2825

2926
To get more information about WorkforcePoolProvider, see:
@@ -32,6 +29,9 @@ To get more information about WorkforcePoolProvider, see:
3229
* How-to Guides
3330
* [Configure a provider within the workforce pool](https://cloud.google.com/iam/docs/manage-workforce-identity-pools-providers#configure_a_provider_within_the_workforce_pool)
3431

32+
~> **Note:** Ask your Google Cloud account team to request access to workforce identity federation for your
33+
billing/quota project. The account team notifies you when the project is granted access.
34+
3535
## Example Usage - Iam Workforce Pool Provider Saml Basic
3636

3737

0 commit comments

Comments
 (0)