@@ -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,40 @@ 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+ min_version : beta
4352custom_code :
4453 constants : ' templates/terraform/constants/iam_workload_identity_pool.go.tmpl'
4554 decoder : ' templates/terraform/decoders/treat_deleted_state_as_gone.go.tmpl'
4655 test_check_destroy : ' templates/terraform/custom_check_destroy/iam_workload_identity_pool.go.tmpl'
4756examples :
4857 - name : ' iam_workload_identity_pool_basic'
4958 primary_resource_id : ' example'
59+ primary_resource_name :
60+ ' fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])'
5061 vars :
5162 workload_identity_pool_id : ' example-pool'
52- - name : ' iam_workload_identity_pool_full '
63+ - name : ' iam_workload_identity_pool_full_federation_only_mode '
5364 primary_resource_id : ' example'
65+ primary_resource_name :
66+ ' fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])'
5467 vars :
5568 workload_identity_pool_id : ' example-pool'
69+ min_version : beta
70+ external_providers :
71+ - ' random'
72+ - name : ' iam_workload_identity_pool_full_trust_domain_mode'
73+ primary_resource_id : ' example'
74+ primary_resource_name :
75+ ' fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])'
76+ vars :
77+ workload_identity_pool_id : ' example-pool'
78+ min_version : beta
5679parameters :
5780properties :
5881 - name : ' workloadIdentityPoolId'
@@ -70,11 +93,11 @@ properties:
7093 type : Enum
7194 description : |
7295 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
96+ * ` STATE_UNSPECIFIED` : State unspecified.
97+ * ` ACTIVE` : The pool is active, and may be used in Google Cloud policies.
98+ * ` DELETED` : The pool is soft-deleted. Soft-deleted pools are permanently deleted after
7699 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
100+ ` UndeleteWorkloadIdentityPool` . You cannot reuse the ID of a soft-deleted pool until it is
78101 permanently deleted. While a pool is deleted, you cannot use it to exchange tokens, or
79102 use existing tokens to access resources. If the pool is undeleted, existing tokens grant
80103 access again.
@@ -101,3 +124,155 @@ properties:
101124 Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use
102125 existing tokens to access resources. If the pool is re-enabled, existing tokens grant
103126 access again.
127+ - name : mode
128+ type : Enum
129+ description : |
130+ The mode for the pool is operating in.
131+
132+
133+ ~> **Note** Altering this field requires a new `workload_identity_pool_id`. To automate
134+ `workload_identity_pool_id` changes, append a random string (numbers/lowercase letters) to the
135+ `workload_identity_pool_id` (see `FEDERATION_ONLY` mode example above).
136+
137+ * `MODE_UNSPECIFIED`: State unspecified. New pools should not use this mode. Pools with an
138+ unspecified mode will operate as if they are in `FEDERATION_ONLY` mode.
139+ * `FEDERATION_ONLY`: Pools can only be used for federating external workload identities into
140+ Google Cloud. Unless otherwise noted, no structure or format constraints are applied to
141+ workload identities in a `FEDERATION_ONLY` mode pool, and you may not create any resources
142+ within the pool besides providers.
143+ * `TRUST_DOMAIN`: Pools can be used to assign identities to either external workloads or those
144+ hosted on Google Cloud. All identities within a `TRUST_DOMAIN` mode pool must consist of a
145+ single namespace and individual workload identifier. The subject identifier for all identities
146+ must conform to the following import_format:
147+
148+ `ns/<namespace>/sa/<workload_identifier>`
149+
150+ `WorkloadIdentityPoolProvider`(`google.iam.v1.WorkloadIdentityPoolProvider`)s
151+ cannot be created within `TRUST_DOMAIN` mode pools.
152+ min_version : beta
153+ immutable : true
154+ enum_values :
155+ - ' MODE_UNSPECIFIED'
156+ - ' FEDERATION_ONLY'
157+ - ' TRUST_DOMAIN'
158+ - name : ' inlineCertificateIssuanceConfig'
159+ type : NestedObject
160+ description : |
161+ Represents configuration for generating mutual TLS (mTLS) certificates for the identities
162+ within this pool. Defines the Certificate Authority (CA) pool resources and configurations
163+ required for issuance and rotation of mTLS workload certificates.
164+ min_version : beta
165+ properties :
166+ - name : ' caPools'
167+ type : KeyValuePairs
168+ description : |
169+ A required mapping of a cloud region to the CA pool resource located in that region used
170+ for certificate issuance, adhering to these constraints:
171+
172+ * **Key format:** A supported cloud region name equivalent to the location identifier in
173+ the corresponding map entry's value.
174+ * **Value format:** A valid CA pool resource path format like:
175+ `projects/{project}/locations/{location}/caPools/{ca_pool}`
176+ * **Region Matching:** Workloads are ONLY issued certificates from CA pools within the
177+ same region. Also the CA pool region (in value) must match the workload's region (key).
178+ - name : ' lifetime'
179+ type : String
180+ description : |
181+ Lifetime of the workload certificates issued by the CA pool in seconds. Must be between
182+ `36000s` (10 hours) to `2592000s` (30 days), ends in the suffix "`s`" (indicating seconds)
183+ and is preceded by the number of seconds. If unspecified, this will be defaulted to
184+ `86400s` (24 hours).
185+ - name : ' rotationWindowPercentage'
186+ type : Integer
187+ description : |
188+ Rotation window percentage indicating when certificate rotation should be initiated based
189+ on remaining lifetime. Must be between 10 - 80. If unspecified, this will be defaulted to
190+ 50.
191+ - name : ' keyAlgorithm'
192+ type : Enum
193+ description : |
194+ Key algorithm to use when generating the key pair. This key pair will be used to create
195+ the certificate. If unspecified, this will default to `ECDSA_P256`.
196+
197+ * `KEY_ALGORITHM_UNSPECIFIED`: Unspecified key algorithm. Defaults to `ECDSA_P256`.
198+ * `RSA_2048`: Specifies RSA with a 2048-bit modulus.
199+ * `RSA_3072`: Specifies RSA with a 3072-bit modulus.
200+ * `RSA_4096`: Specifies RSA with a 4096-bit modulus.
201+ * `ECDSA_P256`: Specifies ECDSA with curve P256.
202+ * `ECDSA_P384`: Specifies ECDSA with curve P384.
203+ enum_values :
204+ - ' KEY_ALGORITHM_UNSPECIFIED'
205+ - ' RSA_2048'
206+ - ' RSA_3072'
207+ - ' RSA_4096'
208+ - ' ECDSA_P256'
209+ - ' ECDSA_P384'
210+ - name : ' inlineTrustConfig'
211+ type : NestedObject
212+ description : |
213+ Represents config to add additional trusted trust domains. Defines configuration for extending
214+ trust to additional trust domains. By establishing trust with another domain, the current
215+ domain will recognize and accept certificates issued by entities within the trusted domains.
216+ Note that a trust domain automatically trusts itself, eliminating the need for explicit
217+ configuration.
218+ min_version : beta
219+ properties :
220+ - name : ' additionalTrustBundles'
221+ type : Map
222+ description : |
223+ Maps specific trust domains (e.g., "example.com") to their corresponding `TrustStore`
224+ objects, which contain the trusted root certificates for that domain. There can be a
225+ maximum of `10` trust domain entries in this map.
226+
227+ Note that a trust domain automatically trusts itself and don't need to be specified here.
228+ If however, this `WorkloadIdentityPool`'s trust domain contains any trust anchors in the
229+ `additional_trust_bundles` map, those trust anchors will be *appended to* the Trust Bundle
230+ automatically derived from your `InlineCertificateIssuanceConfig`'s `ca_pools`.
231+ key_name : trust_domain
232+ key_description : |
233+ The trusted trust domains (e.g., "example.com") to be extended trust to additional trust
234+ domains to.
235+ value_type :
236+ name : trustStore
237+ type : NestedObject
238+ description : |
239+ Trust store that contains trust anchors and optional intermediate CAs used in PKI to
240+ build trust chain and verify client's identity.
241+ properties :
242+ - name : ' trustAnchors'
243+ type : Array
244+ description : |
245+ List of Trust Anchors to be used while performing validation against a given
246+ `TrustStore`. The incoming end entity's certificate must be chained up to one of the
247+ trust anchors here.
248+ required : true
249+ item_type :
250+ type : NestedObject
251+ description : |
252+ Represents a root of trust.
253+ properties :
254+ - name : ' pemCertificate'
255+ type : String
256+ description : |
257+ PEM certificate of the PKI used for validation. Must only contain one ca
258+ certificate(either root or intermediate cert).
259+ required : true
260+ - name : ' intermediateCas'
261+ type : Array
262+ description : |
263+ Set of intermediate CA certificates used for building the trust chain to trust
264+ anchor.
265+
266+
267+ ~> **Note** Intermediate CAs are only supported when configuring X.509 federation.
268+ item_type :
269+ type : NestedObject
270+ description : |
271+ Intermediate CA certificates used for building the trust chain to trust anchor.
272+ properties :
273+ - name : ' pemCertificate'
274+ type : String
275+ description : |
276+ PEM certificate of the PKI used for validation. Must only contain one ca
277+ certificate.
278+ required : true
0 commit comments