@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
210 lines (209 loc) • 9.72 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Represents a public key configuration for a Workforce Pool Provider. The key can be configured in your identity provider to encrypt SAML assertions.
* Google holds the corresponding private key, which it uses to decrypt encrypted tokens.
*
* To get more information about WorkforcePoolProviderKey, see:
*
* * [API documentation](https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers.keys)
* * How-to Guides
* * [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)
* * [Workforce Identity Federation Overview](https://cloud.google.com/iam/docs/workforce-identity-federation)
*
* ## Example Usage
*
* ### Iam Workforce Pool Provider Saml Key Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const pool = new gcp.iam.WorkforcePool("pool", {
* workforcePoolId: "example-pool",
* parent: "organizations/123456789",
* location: "global",
* });
* const provider = new gcp.iam.WorkforcePoolProvider("provider", {
* workforcePoolId: pool.workforcePoolId,
* location: pool.location,
* providerId: "example-prvdr",
* attributeMapping: {
* "google.subject": "assertion.sub",
* },
* saml: {
* idpMetadataXml: "<?xml version=\"1.0\"?><md:EntityDescriptor xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\" entityID=\"https://test.com\"><md:IDPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\"> <md:KeyDescriptor use=\"signing\"><ds:KeyInfo xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:X509Data><ds:X509Certificate>MIIDpDCCAoygAwIBAgIGAX7/5qPhMA0GCSqGSIb3DQEBCwUAMIGSMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEUMB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ExkOpg9KstZzA63i3VcfYv</ds:X509Certificate></ds:X509Data></ds:KeyInfo></md:KeyDescriptor><md:SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"https://test.com/sso\"/></md:IDPSSODescriptor></md:EntityDescriptor>",
* },
* });
* const example = new gcp.iam.WorkforcePoolProviderKey("example", {
* workforcePoolId: pool.workforcePoolId,
* location: pool.location,
* providerId: provider.providerId,
* keyId: "example-key",
* keyData: {
* keySpec: "RSA_2048",
* },
* use: "ENCRYPTION",
* });
* ```
*
* ## Import
*
* WorkforcePoolProviderKey can be imported using any of these accepted formats:
*
* * `locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/keys/{{key_id}}`
*
* * `{{location}}/{{workforce_pool_id}}/{{provider_id}}/{{key_id}}`
*
* When using the `pulumi import` command, WorkforcePoolProviderKey can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:iam/workforcePoolProviderKey:WorkforcePoolProviderKey default locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/keys/{{key_id}}
* ```
*
* ```sh
* $ pulumi import gcp:iam/workforcePoolProviderKey:WorkforcePoolProviderKey default {{location}}/{{workforce_pool_id}}/{{provider_id}}/{{key_id}}
* ```
*/
export declare class WorkforcePoolProviderKey extends pulumi.CustomResource {
/**
* Get an existing WorkforcePoolProviderKey resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: WorkforcePoolProviderKeyState, opts?: pulumi.CustomResourceOptions): WorkforcePoolProviderKey;
/**
* Returns true if the given object is an instance of WorkforcePoolProviderKey. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is WorkforcePoolProviderKey;
/**
* The time after which the key will be permanently deleted and cannot be recovered.
* Note that the key may get purged before this time if the total limit of keys per provider is exceeded.
*/
readonly expireTime: pulumi.Output<string>;
/**
* Immutable. Public half of the asymmetric key.
* Structure is documented below.
*/
readonly keyData: pulumi.Output<outputs.iam.WorkforcePoolProviderKeyKeyData>;
/**
* The ID to use for the key, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters [a-z0-9-].
*/
readonly keyId: pulumi.Output<string>;
/**
* The location for the resource.
*/
readonly location: pulumi.Output<string>;
/**
* Identifier. The resource name of the key.
* Format: `locations/{location}/workforcePools/{workforcePoolId}/providers/{providerId}/keys/{keyId}`
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the provider.
*/
readonly providerId: pulumi.Output<string>;
/**
* The state of the key.
*/
readonly state: pulumi.Output<string>;
/**
* The purpose of the key.
* Possible values are: `ENCRYPTION`.
*/
readonly use: pulumi.Output<string>;
/**
* The ID of the workforce pool.
*/
readonly workforcePoolId: pulumi.Output<string>;
/**
* Create a WorkforcePoolProviderKey resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: WorkforcePoolProviderKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering WorkforcePoolProviderKey resources.
*/
export interface WorkforcePoolProviderKeyState {
/**
* The time after which the key will be permanently deleted and cannot be recovered.
* Note that the key may get purged before this time if the total limit of keys per provider is exceeded.
*/
expireTime?: pulumi.Input<string>;
/**
* Immutable. Public half of the asymmetric key.
* Structure is documented below.
*/
keyData?: pulumi.Input<inputs.iam.WorkforcePoolProviderKeyKeyData>;
/**
* The ID to use for the key, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters [a-z0-9-].
*/
keyId?: pulumi.Input<string>;
/**
* The location for the resource.
*/
location?: pulumi.Input<string>;
/**
* Identifier. The resource name of the key.
* Format: `locations/{location}/workforcePools/{workforcePoolId}/providers/{providerId}/keys/{keyId}`
*/
name?: pulumi.Input<string>;
/**
* The ID of the provider.
*/
providerId?: pulumi.Input<string>;
/**
* The state of the key.
*/
state?: pulumi.Input<string>;
/**
* The purpose of the key.
* Possible values are: `ENCRYPTION`.
*/
use?: pulumi.Input<string>;
/**
* The ID of the workforce pool.
*/
workforcePoolId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a WorkforcePoolProviderKey resource.
*/
export interface WorkforcePoolProviderKeyArgs {
/**
* Immutable. Public half of the asymmetric key.
* Structure is documented below.
*/
keyData: pulumi.Input<inputs.iam.WorkforcePoolProviderKeyKeyData>;
/**
* The ID to use for the key, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters [a-z0-9-].
*/
keyId: pulumi.Input<string>;
/**
* The location for the resource.
*/
location: pulumi.Input<string>;
/**
* The ID of the provider.
*/
providerId: pulumi.Input<string>;
/**
* The purpose of the key.
* Possible values are: `ENCRYPTION`.
*/
use: pulumi.Input<string>;
/**
* The ID of the workforce pool.
*/
workforcePoolId: pulumi.Input<string>;
}