Represents a collection of external workload identities. You can define IAM policies to grant these identities access to Google Cloud resources.
To get more information about WorkloadIdentityPool, see:
resource "google_iam_workload_identity_pool" "example" {
workload_identity_pool_id = "example-pool"
}
resource "google_iam_workload_identity_pool" "example" {
workload_identity_pool_id = "example-pool"
display_name = "Name of pool"
description = "Identity pool for automated test"
disabled = true
}
The following arguments are supported:
workload_identity_pool_id
-
(Required)
The ID to use for the pool, which becomes the final component of the resource name. This
value should be 4-32 characters, and may contain the characters [a-z0-9-]. The prefix
gcp-
is reserved for use by Google, and may not be specified.display_name
-
(Optional)
A display name for the pool. Cannot exceed 32 characters.
description
-
(Optional)
A description of the pool. Cannot exceed 256 characters.
disabled
-
(Optional)
Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use
existing tokens to access resources. If the pool is re-enabled, existing tokens grant
access again.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}
state
-
The state of the pool.
name
-
The resource name of the pool as
projects/{project_number}/locations/global/workloadIdentityPools/{workload_identity_pool_id}
.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.WorkloadIdentityPool can be imported using any of these accepted formats:
projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}
{{project}}/{{workload_identity_pool_id}}
{{workload_identity_pool_id}}
In Terraform v1.5.0 and later, use an import
block to import WorkloadIdentityPool using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}"
to = google_iam_workload_identity_pool.default
}
When using the terraform import
command, WorkloadIdentityPool can be imported using one of the formats above. For example:
$ terraform import google_iam_workload_identity_pool.default projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}
$ terraform import google_iam_workload_identity_pool.default {{project}}/{{workload_identity_pool_id}}
$ terraform import google_iam_workload_identity_pool.default {{workload_identity_pool_id}}
This resource supports User Project Overrides.