@@ -19,6 +19,8 @@ description: |
1919references :
2020 guides :
2121 ' Managing workload identity pools ' : ' https://cloud.google.com/iam/docs/manage-workload-identity-pools-providers#pools'
22+ ' Configure managed workload identity authentication for Compute Engine ' : ' https://cloud.google.com/iam/docs/create-managed-workload-identities'
23+ ' Configure managed workload identity authentication for GKE ' : ' https://cloud.google.com/iam/docs/create-managed-workload-identities-gke'
2224 api : ' https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools'
2325docs :
2426base_url : ' projects/{{project}}/locations/global/workloadIdentityPools'
@@ -40,19 +42,42 @@ async:
4042 base_url : ' {{op_id}}'
4143 result :
4244 resource_inside_response : false
45+ iam_policy :
46+ parent_resource_attribute : ' workload_identity_pool_id'
47+ method_name_separator : ' :'
48+ fetch_iam_policy_verb : ' POST'
49+ import_format :
50+ - ' projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}'
51+ - ' {{workload_identity_pool_id}}'
52+ iam_conditions_request_type : ' REQUEST_BODY'
53+ min_version : beta
4354custom_code :
4455 constants : ' templates/terraform/constants/iam_workload_identity_pool.go.tmpl'
4556 decoder : ' templates/terraform/decoders/treat_deleted_state_as_gone.go.tmpl'
4657 test_check_destroy : ' templates/terraform/custom_check_destroy/iam_workload_identity_pool.go.tmpl'
4758examples :
4859 - name : ' iam_workload_identity_pool_basic'
4960 primary_resource_id : ' example'
61+ primary_resource_name :
62+ ' fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])'
5063 vars :
5164 workload_identity_pool_id : ' example-pool'
52- - name : ' iam_workload_identity_pool_full '
65+ - name : ' iam_workload_identity_pool_full_federation_only_mode '
5366 primary_resource_id : ' example'
67+ primary_resource_name :
68+ ' fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])'
5469 vars :
5570 workload_identity_pool_id : ' example-pool'
71+ min_version : beta
72+ external_providers :
73+ - ' random'
74+ - name : ' iam_workload_identity_pool_full_trust_domain_mode'
75+ primary_resource_id : ' example'
76+ primary_resource_name :
77+ ' fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])'
78+ vars :
79+ workload_identity_pool_id : ' example-pool'
80+ min_version : beta
5681parameters :
5782properties :
5883 - name : ' workloadIdentityPoolId'
@@ -70,11 +95,11 @@ properties:
7095 type : Enum
7196 description : |
7297 The state of the pool.
73- * STATE_UNSPECIFIED: State unspecified.
74- * ACTIVE: The pool is active, and may be used in Google Cloud policies.
75- * DELETED: The pool is soft-deleted. Soft-deleted pools are permanently deleted after
98+ * ` STATE_UNSPECIFIED` : State unspecified.
99+ * ` ACTIVE` : The pool is active, and may be used in Google Cloud policies.
100+ * ` DELETED` : The pool is soft-deleted. Soft-deleted pools are permanently deleted after
76101 approximately 30 days. You can restore a soft-deleted pool using
77- UndeleteWorkloadIdentityPool. You cannot reuse the ID of a soft-deleted pool until it is
102+ ` UndeleteWorkloadIdentityPool` . You cannot reuse the ID of a soft-deleted pool until it is
78103 permanently deleted. While a pool is deleted, you cannot use it to exchange tokens, or
79104 use existing tokens to access resources. If the pool is undeleted, existing tokens grant
80105 access again.
@@ -101,3 +126,142 @@ properties:
101126 Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use
102127 existing tokens to access resources. If the pool is re-enabled, existing tokens grant
103128 access again.
129+ - name : mode
130+ type : Enum
131+ description : |
132+ The mode for the pool is operating in.
133+
134+
135+ ~> **Note** Altering this field requires a new `workload_identity_pool_id`. It is recommended
136+ to automate this by appending a random string of characters `[a-z0-9-]` to the
137+ `workload_identity_pool_id` with something like `random_string`
138+ [from the `random` provider](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string).
139+
140+ * `MODE_UNSPECIFIED`: State unspecified. New pools should not use this mode. Pools with an
141+ unspecified mode will operate as if they are in `FEDERATION_ONLY` mode.
142+ * `FEDERATION_ONLY`: Pools can only be used for federating external workload identities into
143+ Google Cloud. Unless otherwise noted, no structure or format constraints are applied to
144+ workload identities in a `FEDERATION_ONLY` mode pool, and you may not create any resources
145+ within the pool besides providers.
146+ * `TRUST_DOMAIN`: Pools can be used to assign identities to either external workloads or those
147+ hosted on Google Cloud. All identities within a `TRUST_DOMAIN` mode pool must consist of a
148+ single namespace and individual workload identifier. The subject identifier for all identities
149+ must conform to the following import_format:
150+
151+ `ns/<namespace>/sa/<workload_identifier>`
152+
153+ `WorkloadIdentityPoolProvider`(`google.iam.v1.WorkloadIdentityPoolProvider`)s
154+ cannot be created within `TRUST_DOMAIN` mode pools.
155+ min_version : beta
156+ immutable : true
157+ enum_values :
158+ - ' MODE_UNSPECIFIED'
159+ - ' FEDERATION_ONLY'
160+ - ' TRUST_DOMAIN'
161+ - name : ' inlineCertificateIssuanceConfig'
162+ type : NestedObject
163+ description : |
164+ Represents configuration for generating mutual TLS (mTLS) certificates for the identities
165+ within this pool. Defines the Certificate Authority (CA) pool resources and configurations
166+ required for issuance and rotation of mTLS workload certificates.
167+ min_version : beta
168+ properties :
169+ - name : ' caPools'
170+ type : KeyValuePairs
171+ description : |
172+ A required mapping of a cloud region to the CA pool resource located in that region used
173+ for certificate issuance, adhering to these constraints:
174+
175+ * **Key format:** A supported cloud region name equivalent to the location identifier in
176+ the corresponding map entry's value.
177+ * **Value format:** A valid CA pool resource path format like:
178+ `projects/{project}/locations/{location}/caPools/{ca_pool}`
179+ * **Region Matching:** Workloads are ONLY issued certificates from CA pools within the
180+ same region. Also the CA pool region (in value) must match the workload's region (key).
181+ required : true
182+ - name : ' lifetime'
183+ type : String
184+ description : |
185+ Lifetime of the workload certificates issued by the CA pool in seconds. Must be between
186+ `36000s` (10 hours) to `2592000s` (30 days), ends in the suffix "`s`" (indicating seconds)
187+ and is preceded by the number of seconds. If unspecified, this will be defaulted to
188+ `86400s` (24 hours).
189+ default_from_api : true
190+ - name : ' rotationWindowPercentage'
191+ type : Integer
192+ description : |
193+ Rotation window percentage indicating when certificate rotation should be initiated based
194+ on remaining lifetime. Must be between `10` - `80`. If unspecified, this will be defaulted
195+ to `50`.
196+ default_from_api : true
197+ - name : ' keyAlgorithm'
198+ type : Enum
199+ description : |
200+ Key algorithm to use when generating the key pair. This key pair will be used to create
201+ the certificate. If unspecified, this will default to `ECDSA_P256`.
202+
203+ * `KEY_ALGORITHM_UNSPECIFIED`: Unspecified key algorithm. Defaults to `ECDSA_P256`.
204+ * `RSA_2048`: Specifies RSA with a 2048-bit modulus.
205+ * `RSA_3072`: Specifies RSA with a 3072-bit modulus.
206+ * `RSA_4096`: Specifies RSA with a 4096-bit modulus.
207+ * `ECDSA_P256`: Specifies ECDSA with curve P256.
208+ * `ECDSA_P384`: Specifies ECDSA with curve P384.
209+ default_from_api : true
210+ enum_values :
211+ - ' KEY_ALGORITHM_UNSPECIFIED'
212+ - ' RSA_2048'
213+ - ' RSA_3072'
214+ - ' RSA_4096'
215+ - ' ECDSA_P256'
216+ - ' ECDSA_P384'
217+ - name : ' inlineTrustConfig'
218+ type : NestedObject
219+ description : |
220+ Represents config to add additional trusted trust domains. Defines configuration for extending
221+ trust to additional trust domains. By establishing trust with another domain, the current
222+ domain will recognize and accept certificates issued by entities within the trusted domains.
223+ Note that a trust domain automatically trusts itself, eliminating the need for explicit
224+ configuration.
225+ min_version : beta
226+ send_empty_value : true
227+ properties :
228+ - name : ' additionalTrustBundles'
229+ type : Map
230+ description : |
231+ Maps specific trust domains (e.g., "example.com") to their corresponding `TrustStore`
232+ objects, which contain the trusted root certificates for that domain. There can be a
233+ maximum of `10` trust domain entries in this map.
234+
235+ Note that a trust domain automatically trusts itself and don't need to be specified here.
236+ If however, this `WorkloadIdentityPool`'s trust domain contains any trust anchors in the
237+ `additional_trust_bundles` map, those trust anchors will be *appended to* the Trust Bundle
238+ automatically derived from your `InlineCertificateIssuanceConfig`'s `ca_pools`.
239+ key_name : trust_domain
240+ key_description : |
241+ The trusted trust domains (e.g., "example.com") to be extended trust to additional trust
242+ domains to.
243+ value_type :
244+ name : trustStore
245+ type : NestedObject
246+ description : |
247+ Trust store that contains trust anchors and optional intermediate CAs used in PKI to
248+ build trust chain and verify client's identity.
249+ properties :
250+ - name : ' trustAnchors'
251+ type : Array
252+ description : |
253+ List of Trust Anchors to be used while performing validation against a given
254+ `TrustStore`. The incoming end entity's certificate must be chained up to one of the
255+ trust anchors here.
256+ required : true
257+ item_type :
258+ type : NestedObject
259+ description : |
260+ Represents a root of trust.
261+ properties :
262+ - name : ' pemCertificate'
263+ type : String
264+ description : |
265+ PEM certificate of the PKI used for validation. Must only contain one ca
266+ certificate(either root or intermediate cert).
267+ required : true
0 commit comments