@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
257 lines (256 loc) • 10.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* ## Example Usage
*
* ### Iam Principal Access Boundary Policy
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const pab_policy_for_org = new gcp.iam.PrincipalAccessBoundaryPolicy("pab-policy-for-org", {
* organization: "123456789",
* location: "global",
* displayName: "PAB policy for Organization",
* principalAccessBoundaryPolicyId: "pab-policy-for-org",
* });
* ```
* ### Iam Organizations Policy Binding
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* import * as time from "@pulumi/time";
*
* const pabPolicy = new gcp.iam.PrincipalAccessBoundaryPolicy("pab_policy", {
* organization: "123456789",
* location: "global",
* displayName: "Binding for all principals in the Organization",
* principalAccessBoundaryPolicyId: "my-pab-policy",
* });
* const wait60Seconds = new time.index.Sleep("wait_60_seconds", {createDuration: "60s"}, {
* dependsOn: [pabPolicy],
* });
* const my_pab_policy = new gcp.iam.OrganizationsPolicyBinding("my-pab-policy", {
* organization: "123456789",
* location: "global",
* displayName: "Binding for all principals in the Organization",
* policyKind: "PRINCIPAL_ACCESS_BOUNDARY",
* policyBindingId: "binding-for-all-org-principals",
* policy: pulumi.interpolate`organizations/123456789/locations/global/principalAccessBoundaryPolicies/${pabPolicy.principalAccessBoundaryPolicyId}`,
* target: {
* principalSet: "//cloudresourcemanager.googleapis.com/organizations/123456789",
* },
* }, {
* dependsOn: [wait60Seconds],
* });
* ```
*
* ## Import
*
* PrincipalAccessBoundaryPolicy can be imported using any of these accepted formats:
*
* * `organizations/{{organization}}/locations/{{location}}/principalAccessBoundaryPolicies/{{principal_access_boundary_policy_id}}`
*
* * `{{organization}}/{{location}}/{{principal_access_boundary_policy_id}}`
*
* When using the `pulumi import` command, PrincipalAccessBoundaryPolicy can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:iam/principalAccessBoundaryPolicy:PrincipalAccessBoundaryPolicy default organizations/{{organization}}/locations/{{location}}/principalAccessBoundaryPolicies/{{principal_access_boundary_policy_id}}
* ```
*
* ```sh
* $ pulumi import gcp:iam/principalAccessBoundaryPolicy:PrincipalAccessBoundaryPolicy default {{organization}}/{{location}}/{{principal_access_boundary_policy_id}}
* ```
*/
export declare class PrincipalAccessBoundaryPolicy extends pulumi.CustomResource {
/**
* Get an existing PrincipalAccessBoundaryPolicy 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?: PrincipalAccessBoundaryPolicyState, opts?: pulumi.CustomResourceOptions): PrincipalAccessBoundaryPolicy;
/**
* Returns true if the given object is an instance of PrincipalAccessBoundaryPolicy. 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 PrincipalAccessBoundaryPolicy;
/**
* User defined annotations. See https://google.aip.dev/148#annotations
* for more details such as format and size limitations
*
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
readonly annotations: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Output only. The time when the principal access boundary policy was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Principal access boundary policy details
* Structure is documented below.
*/
readonly details: pulumi.Output<outputs.iam.PrincipalAccessBoundaryPolicyDetails>;
/**
* The description of the principal access boundary policy. Must be less than or equal to 63 characters.
*/
readonly displayName: pulumi.Output<string | undefined>;
readonly effectiveAnnotations: pulumi.Output<{
[key: string]: string;
}>;
/**
* The etag for the principal access boundary. If this is provided on update, it must match the server's etag.
*/
readonly etag: pulumi.Output<string>;
/**
* The location the principal access boundary policy is in.
*/
readonly location: pulumi.Output<string>;
/**
* Identifier. The resource name of the principal access boundary policy. The following format is supported:
* `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
*/
readonly name: pulumi.Output<string>;
/**
* The parent organization of the principal access boundary policy.
*/
readonly organization: pulumi.Output<string>;
/**
* The ID to use to create the principal access boundary policy.
* This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /a-z{2,62}/.
*
*
* - - -
*/
readonly principalAccessBoundaryPolicyId: pulumi.Output<string>;
/**
* Output only. The globally unique ID of the principal access boundary policy.
*/
readonly uid: pulumi.Output<string>;
/**
* Output only. The time when the principal access boundary policy was most recently updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a PrincipalAccessBoundaryPolicy 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: PrincipalAccessBoundaryPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PrincipalAccessBoundaryPolicy resources.
*/
export interface PrincipalAccessBoundaryPolicyState {
/**
* User defined annotations. See https://google.aip.dev/148#annotations
* for more details such as format and size limitations
*
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Output only. The time when the principal access boundary policy was created.
*/
createTime?: pulumi.Input<string>;
/**
* Principal access boundary policy details
* Structure is documented below.
*/
details?: pulumi.Input<inputs.iam.PrincipalAccessBoundaryPolicyDetails>;
/**
* The description of the principal access boundary policy. Must be less than or equal to 63 characters.
*/
displayName?: pulumi.Input<string>;
effectiveAnnotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The etag for the principal access boundary. If this is provided on update, it must match the server's etag.
*/
etag?: pulumi.Input<string>;
/**
* The location the principal access boundary policy is in.
*/
location?: pulumi.Input<string>;
/**
* Identifier. The resource name of the principal access boundary policy. The following format is supported:
* `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
*/
name?: pulumi.Input<string>;
/**
* The parent organization of the principal access boundary policy.
*/
organization?: pulumi.Input<string>;
/**
* The ID to use to create the principal access boundary policy.
* This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /a-z{2,62}/.
*
*
* - - -
*/
principalAccessBoundaryPolicyId?: pulumi.Input<string>;
/**
* Output only. The globally unique ID of the principal access boundary policy.
*/
uid?: pulumi.Input<string>;
/**
* Output only. The time when the principal access boundary policy was most recently updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a PrincipalAccessBoundaryPolicy resource.
*/
export interface PrincipalAccessBoundaryPolicyArgs {
/**
* User defined annotations. See https://google.aip.dev/148#annotations
* for more details such as format and size limitations
*
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Principal access boundary policy details
* Structure is documented below.
*/
details?: pulumi.Input<inputs.iam.PrincipalAccessBoundaryPolicyDetails>;
/**
* The description of the principal access boundary policy. Must be less than or equal to 63 characters.
*/
displayName?: pulumi.Input<string>;
/**
* The location the principal access boundary policy is in.
*/
location: pulumi.Input<string>;
/**
* The parent organization of the principal access boundary policy.
*/
organization: pulumi.Input<string>;
/**
* The ID to use to create the principal access boundary policy.
* This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /a-z{2,62}/.
*
*
* - - -
*/
principalAccessBoundaryPolicyId: pulumi.Input<string>;
}