1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. securityposture
  5. PostureDeployment
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.securityposture.PostureDeployment

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Represents a deployment of a security posture on a resource. A posture contains user curated policy sets. A posture can be deployed on a project or on a folder or on an organization. To deploy a posture we need to populate the posture’s name and its revision_id in the posture deployment configuration. Every update to a deployed posture generates a new revision_id. Thus, the updated revision_id should be used in the respective posture deployment’s configuration to deploy that posture on a resource.

    To get more information about PostureDeployment, see:

    Example Usage

    Securityposture Posture Deployment Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const posture1 = new gcp.securityposture.Posture("posture_1", {
        postureId: "posture_1",
        parent: "organizations/123456789",
        location: "global",
        state: "ACTIVE",
        description: "a new posture",
        policySets: [{
            policySetId: "org_policy_set",
            description: "set of org policies",
            policies: [{
                policyId: "policy_1",
                constraint: {
                    orgPolicyConstraint: {
                        cannedConstraintId: "storage.uniformBucketLevelAccess",
                        policyRules: [{
                            enforce: true,
                        }],
                    },
                },
            }],
        }],
    });
    const postureDeployment = new gcp.securityposture.PostureDeployment("postureDeployment", {
        postureDeploymentId: "posture_deployment_1",
        parent: "organizations/123456789",
        location: "global",
        description: "a new posture deployment",
        targetResource: "projects/1111111111111",
        postureId: posture1.name,
        postureRevisionId: posture1.revisionId,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    posture1 = gcp.securityposture.Posture("posture_1",
        posture_id="posture_1",
        parent="organizations/123456789",
        location="global",
        state="ACTIVE",
        description="a new posture",
        policy_sets=[gcp.securityposture.PosturePolicySetArgs(
            policy_set_id="org_policy_set",
            description="set of org policies",
            policies=[gcp.securityposture.PosturePolicySetPolicyArgs(
                policy_id="policy_1",
                constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
                    org_policy_constraint=gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintArgs(
                        canned_constraint_id="storage.uniformBucketLevelAccess",
                        policy_rules=[gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintPolicyRuleArgs(
                            enforce=True,
                        )],
                    ),
                ),
            )],
        )])
    posture_deployment = gcp.securityposture.PostureDeployment("postureDeployment",
        posture_deployment_id="posture_deployment_1",
        parent="organizations/123456789",
        location="global",
        description="a new posture deployment",
        target_resource="projects/1111111111111",
        posture_id=posture1.name,
        posture_revision_id=posture1.revision_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/securityposture"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		posture1, err := securityposture.NewPosture(ctx, "posture_1", &securityposture.PostureArgs{
    			PostureId:   pulumi.String("posture_1"),
    			Parent:      pulumi.String("organizations/123456789"),
    			Location:    pulumi.String("global"),
    			State:       pulumi.String("ACTIVE"),
    			Description: pulumi.String("a new posture"),
    			PolicySets: securityposture.PosturePolicySetArray{
    				&securityposture.PosturePolicySetArgs{
    					PolicySetId: pulumi.String("org_policy_set"),
    					Description: pulumi.String("set of org policies"),
    					Policies: securityposture.PosturePolicySetPolicyArray{
    						&securityposture.PosturePolicySetPolicyArgs{
    							PolicyId: pulumi.String("policy_1"),
    							Constraint: &securityposture.PosturePolicySetPolicyConstraintArgs{
    								OrgPolicyConstraint: &securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintArgs{
    									CannedConstraintId: pulumi.String("storage.uniformBucketLevelAccess"),
    									PolicyRules: securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintPolicyRuleArray{
    										&securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintPolicyRuleArgs{
    											Enforce: pulumi.Bool(true),
    										},
    									},
    								},
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = securityposture.NewPostureDeployment(ctx, "postureDeployment", &securityposture.PostureDeploymentArgs{
    			PostureDeploymentId: pulumi.String("posture_deployment_1"),
    			Parent:              pulumi.String("organizations/123456789"),
    			Location:            pulumi.String("global"),
    			Description:         pulumi.String("a new posture deployment"),
    			TargetResource:      pulumi.String("projects/1111111111111"),
    			PostureId:           posture1.Name,
    			PostureRevisionId:   posture1.RevisionId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var posture1 = new Gcp.SecurityPosture.Posture("posture_1", new()
        {
            PostureId = "posture_1",
            Parent = "organizations/123456789",
            Location = "global",
            State = "ACTIVE",
            Description = "a new posture",
            PolicySets = new[]
            {
                new Gcp.SecurityPosture.Inputs.PosturePolicySetArgs
                {
                    PolicySetId = "org_policy_set",
                    Description = "set of org policies",
                    Policies = new[]
                    {
                        new Gcp.SecurityPosture.Inputs.PosturePolicySetPolicyArgs
                        {
                            PolicyId = "policy_1",
                            Constraint = new Gcp.SecurityPosture.Inputs.PosturePolicySetPolicyConstraintArgs
                            {
                                OrgPolicyConstraint = new Gcp.SecurityPosture.Inputs.PosturePolicySetPolicyConstraintOrgPolicyConstraintArgs
                                {
                                    CannedConstraintId = "storage.uniformBucketLevelAccess",
                                    PolicyRules = new[]
                                    {
                                        new Gcp.SecurityPosture.Inputs.PosturePolicySetPolicyConstraintOrgPolicyConstraintPolicyRuleArgs
                                        {
                                            Enforce = true,
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
            },
        });
    
        var postureDeployment = new Gcp.SecurityPosture.PostureDeployment("postureDeployment", new()
        {
            PostureDeploymentId = "posture_deployment_1",
            Parent = "organizations/123456789",
            Location = "global",
            Description = "a new posture deployment",
            TargetResource = "projects/1111111111111",
            PostureId = posture1.Name,
            PostureRevisionId = posture1.RevisionId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.securityposture.Posture;
    import com.pulumi.gcp.securityposture.PostureArgs;
    import com.pulumi.gcp.securityposture.inputs.PosturePolicySetArgs;
    import com.pulumi.gcp.securityposture.PostureDeployment;
    import com.pulumi.gcp.securityposture.PostureDeploymentArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var posture1 = new Posture("posture1", PostureArgs.builder()
                .postureId("posture_1")
                .parent("organizations/123456789")
                .location("global")
                .state("ACTIVE")
                .description("a new posture")
                .policySets(PosturePolicySetArgs.builder()
                    .policySetId("org_policy_set")
                    .description("set of org policies")
                    .policies(PosturePolicySetPolicyArgs.builder()
                        .policyId("policy_1")
                        .constraint(PosturePolicySetPolicyConstraintArgs.builder()
                            .orgPolicyConstraint(PosturePolicySetPolicyConstraintOrgPolicyConstraintArgs.builder()
                                .cannedConstraintId("storage.uniformBucketLevelAccess")
                                .policyRules(PosturePolicySetPolicyConstraintOrgPolicyConstraintPolicyRuleArgs.builder()
                                    .enforce(true)
                                    .build())
                                .build())
                            .build())
                        .build())
                    .build())
                .build());
    
            var postureDeployment = new PostureDeployment("postureDeployment", PostureDeploymentArgs.builder()
                .postureDeploymentId("posture_deployment_1")
                .parent("organizations/123456789")
                .location("global")
                .description("a new posture deployment")
                .targetResource("projects/1111111111111")
                .postureId(posture1.name())
                .postureRevisionId(posture1.revisionId())
                .build());
    
        }
    }
    
    resources:
      posture1:
        type: gcp:securityposture:Posture
        name: posture_1
        properties:
          postureId: posture_1
          parent: organizations/123456789
          location: global
          state: ACTIVE
          description: a new posture
          policySets:
            - policySetId: org_policy_set
              description: set of org policies
              policies:
                - policyId: policy_1
                  constraint:
                    orgPolicyConstraint:
                      cannedConstraintId: storage.uniformBucketLevelAccess
                      policyRules:
                        - enforce: true
      postureDeployment:
        type: gcp:securityposture:PostureDeployment
        properties:
          postureDeploymentId: posture_deployment_1
          parent: organizations/123456789
          location: global
          description: a new posture deployment
          targetResource: projects/1111111111111
          postureId: ${posture1.name}
          postureRevisionId: ${posture1.revisionId}
    

    Create PostureDeployment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PostureDeployment(name: string, args: PostureDeploymentArgs, opts?: CustomResourceOptions);
    @overload
    def PostureDeployment(resource_name: str,
                          args: PostureDeploymentArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostureDeployment(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          location: Optional[str] = None,
                          parent: Optional[str] = None,
                          posture_deployment_id: Optional[str] = None,
                          posture_id: Optional[str] = None,
                          posture_revision_id: Optional[str] = None,
                          target_resource: Optional[str] = None,
                          description: Optional[str] = None)
    func NewPostureDeployment(ctx *Context, name string, args PostureDeploymentArgs, opts ...ResourceOption) (*PostureDeployment, error)
    public PostureDeployment(string name, PostureDeploymentArgs args, CustomResourceOptions? opts = null)
    public PostureDeployment(String name, PostureDeploymentArgs args)
    public PostureDeployment(String name, PostureDeploymentArgs args, CustomResourceOptions options)
    
    type: gcp:securityposture:PostureDeployment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PostureDeploymentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PostureDeploymentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PostureDeploymentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostureDeploymentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostureDeploymentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var postureDeploymentResource = new Gcp.SecurityPosture.PostureDeployment("postureDeploymentResource", new()
    {
        Location = "string",
        Parent = "string",
        PostureDeploymentId = "string",
        PostureId = "string",
        PostureRevisionId = "string",
        TargetResource = "string",
        Description = "string",
    });
    
    example, err := securityposture.NewPostureDeployment(ctx, "postureDeploymentResource", &securityposture.PostureDeploymentArgs{
    	Location:            pulumi.String("string"),
    	Parent:              pulumi.String("string"),
    	PostureDeploymentId: pulumi.String("string"),
    	PostureId:           pulumi.String("string"),
    	PostureRevisionId:   pulumi.String("string"),
    	TargetResource:      pulumi.String("string"),
    	Description:         pulumi.String("string"),
    })
    
    var postureDeploymentResource = new PostureDeployment("postureDeploymentResource", PostureDeploymentArgs.builder()
        .location("string")
        .parent("string")
        .postureDeploymentId("string")
        .postureId("string")
        .postureRevisionId("string")
        .targetResource("string")
        .description("string")
        .build());
    
    posture_deployment_resource = gcp.securityposture.PostureDeployment("postureDeploymentResource",
        location="string",
        parent="string",
        posture_deployment_id="string",
        posture_id="string",
        posture_revision_id="string",
        target_resource="string",
        description="string")
    
    const postureDeploymentResource = new gcp.securityposture.PostureDeployment("postureDeploymentResource", {
        location: "string",
        parent: "string",
        postureDeploymentId: "string",
        postureId: "string",
        postureRevisionId: "string",
        targetResource: "string",
        description: "string",
    });
    
    type: gcp:securityposture:PostureDeployment
    properties:
        description: string
        location: string
        parent: string
        postureDeploymentId: string
        postureId: string
        postureRevisionId: string
        targetResource: string
    

    PostureDeployment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PostureDeployment resource accepts the following input properties:

    Location string
    The location of the resource, eg. global`.
    Parent string
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    PostureDeploymentId string
    ID of the posture deployment.


    PostureId string
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    PostureRevisionId string
    Revision_id the posture which needs to be deployed.
    TargetResource string
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    Description string
    Description of the posture deployment.
    Location string
    The location of the resource, eg. global`.
    Parent string
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    PostureDeploymentId string
    ID of the posture deployment.


    PostureId string
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    PostureRevisionId string
    Revision_id the posture which needs to be deployed.
    TargetResource string
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    Description string
    Description of the posture deployment.
    location String
    The location of the resource, eg. global`.
    parent String
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    postureDeploymentId String
    ID of the posture deployment.


    postureId String
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    postureRevisionId String
    Revision_id the posture which needs to be deployed.
    targetResource String
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    description String
    Description of the posture deployment.
    location string
    The location of the resource, eg. global`.
    parent string
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    postureDeploymentId string
    ID of the posture deployment.


    postureId string
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    postureRevisionId string
    Revision_id the posture which needs to be deployed.
    targetResource string
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    description string
    Description of the posture deployment.
    location str
    The location of the resource, eg. global`.
    parent str
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    posture_deployment_id str
    ID of the posture deployment.


    posture_id str
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    posture_revision_id str
    Revision_id the posture which needs to be deployed.
    target_resource str
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    description str
    Description of the posture deployment.
    location String
    The location of the resource, eg. global`.
    parent String
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    postureDeploymentId String
    ID of the posture deployment.


    postureId String
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    postureRevisionId String
    Revision_id the posture which needs to be deployed.
    targetResource String
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    description String
    Description of the posture deployment.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PostureDeployment resource produces the following output properties:

    CreateTime string
    Time the posture deployment was created in UTC.
    DesiredPostureId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    DesiredPostureRevisionId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    Etag string
    For Resource freshness validation (https://google.aip.dev/154)
    FailureMessage string
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the posture deployment instance.
    Reconciling bool
    If set, there are currently changes in flight to the posture deployment.
    State string
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    UpdateTime string
    Time the posture deployment was updated in UTC.
    CreateTime string
    Time the posture deployment was created in UTC.
    DesiredPostureId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    DesiredPostureRevisionId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    Etag string
    For Resource freshness validation (https://google.aip.dev/154)
    FailureMessage string
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the posture deployment instance.
    Reconciling bool
    If set, there are currently changes in flight to the posture deployment.
    State string
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    UpdateTime string
    Time the posture deployment was updated in UTC.
    createTime String
    Time the posture deployment was created in UTC.
    desiredPostureId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desiredPostureRevisionId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag String
    For Resource freshness validation (https://google.aip.dev/154)
    failureMessage String
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the posture deployment instance.
    reconciling Boolean
    If set, there are currently changes in flight to the posture deployment.
    state String
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    updateTime String
    Time the posture deployment was updated in UTC.
    createTime string
    Time the posture deployment was created in UTC.
    desiredPostureId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desiredPostureRevisionId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag string
    For Resource freshness validation (https://google.aip.dev/154)
    failureMessage string
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the posture deployment instance.
    reconciling boolean
    If set, there are currently changes in flight to the posture deployment.
    state string
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    updateTime string
    Time the posture deployment was updated in UTC.
    create_time str
    Time the posture deployment was created in UTC.
    desired_posture_id str
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desired_posture_revision_id str
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag str
    For Resource freshness validation (https://google.aip.dev/154)
    failure_message str
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the posture deployment instance.
    reconciling bool
    If set, there are currently changes in flight to the posture deployment.
    state str
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    update_time str
    Time the posture deployment was updated in UTC.
    createTime String
    Time the posture deployment was created in UTC.
    desiredPostureId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desiredPostureRevisionId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag String
    For Resource freshness validation (https://google.aip.dev/154)
    failureMessage String
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the posture deployment instance.
    reconciling Boolean
    If set, there are currently changes in flight to the posture deployment.
    state String
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    updateTime String
    Time the posture deployment was updated in UTC.

    Look up Existing PostureDeployment Resource

    Get an existing PostureDeployment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PostureDeploymentState, opts?: CustomResourceOptions): PostureDeployment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            desired_posture_id: Optional[str] = None,
            desired_posture_revision_id: Optional[str] = None,
            etag: Optional[str] = None,
            failure_message: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            parent: Optional[str] = None,
            posture_deployment_id: Optional[str] = None,
            posture_id: Optional[str] = None,
            posture_revision_id: Optional[str] = None,
            reconciling: Optional[bool] = None,
            state: Optional[str] = None,
            target_resource: Optional[str] = None,
            update_time: Optional[str] = None) -> PostureDeployment
    func GetPostureDeployment(ctx *Context, name string, id IDInput, state *PostureDeploymentState, opts ...ResourceOption) (*PostureDeployment, error)
    public static PostureDeployment Get(string name, Input<string> id, PostureDeploymentState? state, CustomResourceOptions? opts = null)
    public static PostureDeployment get(String name, Output<String> id, PostureDeploymentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreateTime string
    Time the posture deployment was created in UTC.
    Description string
    Description of the posture deployment.
    DesiredPostureId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    DesiredPostureRevisionId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    Etag string
    For Resource freshness validation (https://google.aip.dev/154)
    FailureMessage string
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    Location string
    The location of the resource, eg. global`.
    Name string
    Name of the posture deployment instance.
    Parent string
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    PostureDeploymentId string
    ID of the posture deployment.


    PostureId string
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    PostureRevisionId string
    Revision_id the posture which needs to be deployed.
    Reconciling bool
    If set, there are currently changes in flight to the posture deployment.
    State string
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    TargetResource string
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    UpdateTime string
    Time the posture deployment was updated in UTC.
    CreateTime string
    Time the posture deployment was created in UTC.
    Description string
    Description of the posture deployment.
    DesiredPostureId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    DesiredPostureRevisionId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    Etag string
    For Resource freshness validation (https://google.aip.dev/154)
    FailureMessage string
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    Location string
    The location of the resource, eg. global`.
    Name string
    Name of the posture deployment instance.
    Parent string
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    PostureDeploymentId string
    ID of the posture deployment.


    PostureId string
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    PostureRevisionId string
    Revision_id the posture which needs to be deployed.
    Reconciling bool
    If set, there are currently changes in flight to the posture deployment.
    State string
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    TargetResource string
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    UpdateTime string
    Time the posture deployment was updated in UTC.
    createTime String
    Time the posture deployment was created in UTC.
    description String
    Description of the posture deployment.
    desiredPostureId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desiredPostureRevisionId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag String
    For Resource freshness validation (https://google.aip.dev/154)
    failureMessage String
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    location String
    The location of the resource, eg. global`.
    name String
    Name of the posture deployment instance.
    parent String
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    postureDeploymentId String
    ID of the posture deployment.


    postureId String
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    postureRevisionId String
    Revision_id the posture which needs to be deployed.
    reconciling Boolean
    If set, there are currently changes in flight to the posture deployment.
    state String
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    targetResource String
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    updateTime String
    Time the posture deployment was updated in UTC.
    createTime string
    Time the posture deployment was created in UTC.
    description string
    Description of the posture deployment.
    desiredPostureId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desiredPostureRevisionId string
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag string
    For Resource freshness validation (https://google.aip.dev/154)
    failureMessage string
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    location string
    The location of the resource, eg. global`.
    name string
    Name of the posture deployment instance.
    parent string
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    postureDeploymentId string
    ID of the posture deployment.


    postureId string
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    postureRevisionId string
    Revision_id the posture which needs to be deployed.
    reconciling boolean
    If set, there are currently changes in flight to the posture deployment.
    state string
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    targetResource string
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    updateTime string
    Time the posture deployment was updated in UTC.
    create_time str
    Time the posture deployment was created in UTC.
    description str
    Description of the posture deployment.
    desired_posture_id str
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desired_posture_revision_id str
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag str
    For Resource freshness validation (https://google.aip.dev/154)
    failure_message str
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    location str
    The location of the resource, eg. global`.
    name str
    Name of the posture deployment instance.
    parent str
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    posture_deployment_id str
    ID of the posture deployment.


    posture_id str
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    posture_revision_id str
    Revision_id the posture which needs to be deployed.
    reconciling bool
    If set, there are currently changes in flight to the posture deployment.
    state str
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    target_resource str
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    update_time str
    Time the posture deployment was updated in UTC.
    createTime String
    Time the posture deployment was created in UTC.
    description String
    Description of the posture deployment.
    desiredPostureId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture to be deployed.
    desiredPostureRevisionId String
    This is an output only optional field which will be filled in case when PostureDeployment state is UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It denotes the desired posture revision_id to be deployed.
    etag String
    For Resource freshness validation (https://google.aip.dev/154)
    failureMessage String
    This is a output only optional field which will be filled in case where PostureDeployment enters a failure state like UPDATE_FAILED or CREATE_FAILED or DELETE_FAILED. It will have the failure message for posture deployment's CREATE/UPDATE/DELETE methods.
    location String
    The location of the resource, eg. global`.
    name String
    Name of the posture deployment instance.
    parent String
    The parent of the resource, an organization. Format should be organizations/{organization_id}.
    postureDeploymentId String
    ID of the posture deployment.


    postureId String
    Relative name of the posture which needs to be deployed. It should be in the format: organizations/{organization_id}/locations/{location}/postures/{posture_id}
    postureRevisionId String
    Revision_id the posture which needs to be deployed.
    reconciling Boolean
    If set, there are currently changes in flight to the posture deployment.
    state String
    State of the posture deployment. A posture deployment can be in the following terminal states: ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED.
    targetResource String
    The resource on which the posture should be deployed. This can be in one of the following formats: projects/{project_number}, folders/{folder_number}, organizations/{organization_id}
    updateTime String
    Time the posture deployment was updated in UTC.

    Import

    PostureDeployment can be imported using any of these accepted formats:

    • {{parent}}/locations/{{location}}/postureDeployments/{{posture_deployment_id}}

    When using the pulumi import command, PostureDeployment can be imported using one of the formats above. For example:

    $ pulumi import gcp:securityposture/postureDeployment:PostureDeployment default {{parent}}/locations/{{location}}/postureDeployments/{{posture_deployment_id}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi