gcp.folder.OrganizationPolicy

Explore with Pulumi AI

Allows management of Organization Policies for a Google Cloud Folder.

Warning: This resource has been superseded by gcp.orgpolicy.Policy. gcp.orgpolicy.Policy uses Organization Policy API V2 instead of Cloud Resource Manager API V1 and it supports additional features such as tags and conditions.

To get more information about Organization Policies, see:

Example Usage

To set policy with a

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var serialPortPolicy = new Gcp.Folder.OrganizationPolicy("serialPortPolicy", new()
    {
        BooleanPolicy = new Gcp.Folder.Inputs.OrganizationPolicyBooleanPolicyArgs
        {
            Enforced = true,
        },
        Constraint = "compute.disableSerialPortAccess",
        Folder = "folders/123456789",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewOrganizationPolicy(ctx, "serialPortPolicy", &folder.OrganizationPolicyArgs{
			BooleanPolicy: &folder.OrganizationPolicyBooleanPolicyArgs{
				Enforced: pulumi.Bool(true),
			},
			Constraint: pulumi.String("compute.disableSerialPortAccess"),
			Folder:     pulumi.String("folders/123456789"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.OrganizationPolicy;
import com.pulumi.gcp.folder.OrganizationPolicyArgs;
import com.pulumi.gcp.folder.inputs.OrganizationPolicyBooleanPolicyArgs;
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 serialPortPolicy = new OrganizationPolicy("serialPortPolicy", OrganizationPolicyArgs.builder()        
            .booleanPolicy(OrganizationPolicyBooleanPolicyArgs.builder()
                .enforced(true)
                .build())
            .constraint("compute.disableSerialPortAccess")
            .folder("folders/123456789")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

serial_port_policy = gcp.folder.OrganizationPolicy("serialPortPolicy",
    boolean_policy=gcp.folder.OrganizationPolicyBooleanPolicyArgs(
        enforced=True,
    ),
    constraint="compute.disableSerialPortAccess",
    folder="folders/123456789")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const serialPortPolicy = new gcp.folder.OrganizationPolicy("serialPortPolicy", {
    booleanPolicy: {
        enforced: true,
    },
    constraint: "compute.disableSerialPortAccess",
    folder: "folders/123456789",
});
resources:
  serialPortPolicy:
    type: gcp:folder:OrganizationPolicy
    properties:
      booleanPolicy:
        enforced: true
      constraint: compute.disableSerialPortAccess
      folder: folders/123456789
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var servicesPolicy = new Gcp.Folder.OrganizationPolicy("servicesPolicy", new()
    {
        Constraint = "serviceuser.services",
        Folder = "folders/123456789",
        ListPolicy = new Gcp.Folder.Inputs.OrganizationPolicyListPolicyArgs
        {
            Allow = new Gcp.Folder.Inputs.OrganizationPolicyListPolicyAllowArgs
            {
                All = true,
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewOrganizationPolicy(ctx, "servicesPolicy", &folder.OrganizationPolicyArgs{
			Constraint: pulumi.String("serviceuser.services"),
			Folder:     pulumi.String("folders/123456789"),
			ListPolicy: &folder.OrganizationPolicyListPolicyArgs{
				Allow: &folder.OrganizationPolicyListPolicyAllowArgs{
					All: pulumi.Bool(true),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.OrganizationPolicy;
import com.pulumi.gcp.folder.OrganizationPolicyArgs;
import com.pulumi.gcp.folder.inputs.OrganizationPolicyListPolicyArgs;
import com.pulumi.gcp.folder.inputs.OrganizationPolicyListPolicyAllowArgs;
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 servicesPolicy = new OrganizationPolicy("servicesPolicy", OrganizationPolicyArgs.builder()        
            .constraint("serviceuser.services")
            .folder("folders/123456789")
            .listPolicy(OrganizationPolicyListPolicyArgs.builder()
                .allow(OrganizationPolicyListPolicyAllowArgs.builder()
                    .all(true)
                    .build())
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

services_policy = gcp.folder.OrganizationPolicy("servicesPolicy",
    constraint="serviceuser.services",
    folder="folders/123456789",
    list_policy=gcp.folder.OrganizationPolicyListPolicyArgs(
        allow=gcp.folder.OrganizationPolicyListPolicyAllowArgs(
            all=True,
        ),
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const servicesPolicy = new gcp.folder.OrganizationPolicy("servicesPolicy", {
    constraint: "serviceuser.services",
    folder: "folders/123456789",
    listPolicy: {
        allow: {
            all: true,
        },
    },
});
resources:
  servicesPolicy:
    type: gcp:folder:OrganizationPolicy
    properties:
      constraint: serviceuser.services
      folder: folders/123456789
      listPolicy:
        allow:
          all: true

Or to deny some services, use the following instead

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var servicesPolicy = new Gcp.Folder.OrganizationPolicy("servicesPolicy", new()
    {
        Constraint = "serviceuser.services",
        Folder = "folders/123456789",
        ListPolicy = new Gcp.Folder.Inputs.OrganizationPolicyListPolicyArgs
        {
            Deny = new Gcp.Folder.Inputs.OrganizationPolicyListPolicyDenyArgs
            {
                Values = new[]
                {
                    "cloudresourcemanager.googleapis.com",
                },
            },
            SuggestedValue = "compute.googleapis.com",
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewOrganizationPolicy(ctx, "servicesPolicy", &folder.OrganizationPolicyArgs{
			Constraint: pulumi.String("serviceuser.services"),
			Folder:     pulumi.String("folders/123456789"),
			ListPolicy: &folder.OrganizationPolicyListPolicyArgs{
				Deny: &folder.OrganizationPolicyListPolicyDenyArgs{
					Values: pulumi.StringArray{
						pulumi.String("cloudresourcemanager.googleapis.com"),
					},
				},
				SuggestedValue: pulumi.String("compute.googleapis.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.OrganizationPolicy;
import com.pulumi.gcp.folder.OrganizationPolicyArgs;
import com.pulumi.gcp.folder.inputs.OrganizationPolicyListPolicyArgs;
import com.pulumi.gcp.folder.inputs.OrganizationPolicyListPolicyDenyArgs;
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 servicesPolicy = new OrganizationPolicy("servicesPolicy", OrganizationPolicyArgs.builder()        
            .constraint("serviceuser.services")
            .folder("folders/123456789")
            .listPolicy(OrganizationPolicyListPolicyArgs.builder()
                .deny(OrganizationPolicyListPolicyDenyArgs.builder()
                    .values("cloudresourcemanager.googleapis.com")
                    .build())
                .suggestedValue("compute.googleapis.com")
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

services_policy = gcp.folder.OrganizationPolicy("servicesPolicy",
    constraint="serviceuser.services",
    folder="folders/123456789",
    list_policy=gcp.folder.OrganizationPolicyListPolicyArgs(
        deny=gcp.folder.OrganizationPolicyListPolicyDenyArgs(
            values=["cloudresourcemanager.googleapis.com"],
        ),
        suggested_value="compute.googleapis.com",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const servicesPolicy = new gcp.folder.OrganizationPolicy("servicesPolicy", {
    constraint: "serviceuser.services",
    folder: "folders/123456789",
    listPolicy: {
        deny: {
            values: ["cloudresourcemanager.googleapis.com"],
        },
        suggestedValue: "compute.googleapis.com",
    },
});
resources:
  servicesPolicy:
    type: gcp:folder:OrganizationPolicy
    properties:
      constraint: serviceuser.services
      folder: folders/123456789
      listPolicy:
        deny:
          values:
            - cloudresourcemanager.googleapis.com
        suggestedValue: compute.googleapis.com

To restore the default folder organization policy, use the following instead

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var servicesPolicy = new Gcp.Folder.OrganizationPolicy("servicesPolicy", new()
    {
        Constraint = "serviceuser.services",
        Folder = "folders/123456789",
        RestorePolicy = new Gcp.Folder.Inputs.OrganizationPolicyRestorePolicyArgs
        {
            Default = true,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/folder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := folder.NewOrganizationPolicy(ctx, "servicesPolicy", &folder.OrganizationPolicyArgs{
			Constraint: pulumi.String("serviceuser.services"),
			Folder:     pulumi.String("folders/123456789"),
			RestorePolicy: &folder.OrganizationPolicyRestorePolicyArgs{
				Default: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.folder.OrganizationPolicy;
import com.pulumi.gcp.folder.OrganizationPolicyArgs;
import com.pulumi.gcp.folder.inputs.OrganizationPolicyRestorePolicyArgs;
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 servicesPolicy = new OrganizationPolicy("servicesPolicy", OrganizationPolicyArgs.builder()        
            .constraint("serviceuser.services")
            .folder("folders/123456789")
            .restorePolicy(OrganizationPolicyRestorePolicyArgs.builder()
                .default_(true)
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

services_policy = gcp.folder.OrganizationPolicy("servicesPolicy",
    constraint="serviceuser.services",
    folder="folders/123456789",
    restore_policy=gcp.folder.OrganizationPolicyRestorePolicyArgs(
        default=True,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const servicesPolicy = new gcp.folder.OrganizationPolicy("servicesPolicy", {
    constraint: "serviceuser.services",
    folder: "folders/123456789",
    restorePolicy: {
        "default": true,
    },
});
resources:
  servicesPolicy:
    type: gcp:folder:OrganizationPolicy
    properties:
      constraint: serviceuser.services
      folder: folders/123456789
      restorePolicy:
        default: true

Create OrganizationPolicy Resource

new OrganizationPolicy(name: string, args: OrganizationPolicyArgs, opts?: CustomResourceOptions);
@overload
def OrganizationPolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       boolean_policy: Optional[OrganizationPolicyBooleanPolicyArgs] = None,
                       constraint: Optional[str] = None,
                       folder: Optional[str] = None,
                       list_policy: Optional[OrganizationPolicyListPolicyArgs] = None,
                       restore_policy: Optional[OrganizationPolicyRestorePolicyArgs] = None,
                       version: Optional[int] = None)
@overload
def OrganizationPolicy(resource_name: str,
                       args: OrganizationPolicyArgs,
                       opts: Optional[ResourceOptions] = None)
func NewOrganizationPolicy(ctx *Context, name string, args OrganizationPolicyArgs, opts ...ResourceOption) (*OrganizationPolicy, error)
public OrganizationPolicy(string name, OrganizationPolicyArgs args, CustomResourceOptions? opts = null)
public OrganizationPolicy(String name, OrganizationPolicyArgs args)
public OrganizationPolicy(String name, OrganizationPolicyArgs args, CustomResourceOptions options)
type: gcp:folder:OrganizationPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args OrganizationPolicyArgs
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 OrganizationPolicyArgs
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 OrganizationPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args OrganizationPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args OrganizationPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

OrganizationPolicy 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 OrganizationPolicy resource accepts the following input properties:

Constraint string

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

Folder string

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

BooleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

ListPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

RestorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

Version int

Version of the Policy. Default version is 0.

Constraint string

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

Folder string

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

BooleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

ListPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

RestorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

Version int

Version of the Policy. Default version is 0.

constraint String

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

folder String

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

booleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

listPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

version Integer

Version of the Policy. Default version is 0.

constraint string

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

folder string

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

booleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

listPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

version number

Version of the Policy. Default version is 0.

constraint str

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

folder str

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

boolean_policy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

list_policy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restore_policy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

version int

Version of the Policy. Default version is 0.

constraint String

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

folder String

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

booleanPolicy Property Map

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

listPolicy Property Map

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restorePolicy Property Map

A restore policy is a constraint to restore the default policy. Structure is documented below.

version Number

Version of the Policy. Default version is 0.

Outputs

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

Etag string

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

Id string

The provider-assigned unique ID for this managed resource.

UpdateTime string

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

Etag string

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

Id string

The provider-assigned unique ID for this managed resource.

UpdateTime string

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

etag String

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

id String

The provider-assigned unique ID for this managed resource.

updateTime String

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

etag string

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

id string

The provider-assigned unique ID for this managed resource.

updateTime string

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

etag str

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

id str

The provider-assigned unique ID for this managed resource.

update_time str

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

etag String

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

id String

The provider-assigned unique ID for this managed resource.

updateTime String

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

Look up Existing OrganizationPolicy Resource

Get an existing OrganizationPolicy 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?: OrganizationPolicyState, opts?: CustomResourceOptions): OrganizationPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        boolean_policy: Optional[OrganizationPolicyBooleanPolicyArgs] = None,
        constraint: Optional[str] = None,
        etag: Optional[str] = None,
        folder: Optional[str] = None,
        list_policy: Optional[OrganizationPolicyListPolicyArgs] = None,
        restore_policy: Optional[OrganizationPolicyRestorePolicyArgs] = None,
        update_time: Optional[str] = None,
        version: Optional[int] = None) -> OrganizationPolicy
func GetOrganizationPolicy(ctx *Context, name string, id IDInput, state *OrganizationPolicyState, opts ...ResourceOption) (*OrganizationPolicy, error)
public static OrganizationPolicy Get(string name, Input<string> id, OrganizationPolicyState? state, CustomResourceOptions? opts = null)
public static OrganizationPolicy get(String name, Output<String> id, OrganizationPolicyState 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:
BooleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

Constraint string

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

Etag string

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

Folder string

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

ListPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

RestorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

UpdateTime string

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

Version int

Version of the Policy. Default version is 0.

BooleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

Constraint string

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

Etag string

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

Folder string

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

ListPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

RestorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

UpdateTime string

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

Version int

Version of the Policy. Default version is 0.

booleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

constraint String

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

etag String

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

folder String

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

listPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

updateTime String

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

version Integer

Version of the Policy. Default version is 0.

booleanPolicy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

constraint string

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

etag string

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

folder string

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

listPolicy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restorePolicy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

updateTime string

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

version number

Version of the Policy. Default version is 0.

boolean_policy OrganizationPolicyBooleanPolicyArgs

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

constraint str

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

etag str

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

folder str

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

list_policy OrganizationPolicyListPolicyArgs

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restore_policy OrganizationPolicyRestorePolicyArgs

A restore policy is a constraint to restore the default policy. Structure is documented below.

update_time str

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

version int

Version of the Policy. Default version is 0.

booleanPolicy Property Map

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

constraint String

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

etag String

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

folder String

The resource name of the folder to set the policy for. Its format is folders/{folder_id}.

listPolicy Property Map

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

restorePolicy Property Map

A restore policy is a constraint to restore the default policy. Structure is documented below.

updateTime String

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

version Number

Version of the Policy. Default version is 0.

Supporting Types

OrganizationPolicyBooleanPolicy

Enforced bool

If true, then the Policy is enforced. If false, then any configuration is acceptable.

Enforced bool

If true, then the Policy is enforced. If false, then any configuration is acceptable.

enforced Boolean

If true, then the Policy is enforced. If false, then any configuration is acceptable.

enforced boolean

If true, then the Policy is enforced. If false, then any configuration is acceptable.

enforced bool

If true, then the Policy is enforced. If false, then any configuration is acceptable.

enforced Boolean

If true, then the Policy is enforced. If false, then any configuration is acceptable.

OrganizationPolicyListPolicy

Allow OrganizationPolicyListPolicyAllow

or deny - (Optional) One or the other must be set.

Deny OrganizationPolicyListPolicyDeny
InheritFromParent bool

If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.

SuggestedValue string

The Google Cloud Console will try to default to a configuration that matches the value specified in this field.

Allow OrganizationPolicyListPolicyAllow

or deny - (Optional) One or the other must be set.

Deny OrganizationPolicyListPolicyDeny
InheritFromParent bool

If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.

SuggestedValue string

The Google Cloud Console will try to default to a configuration that matches the value specified in this field.

allow OrganizationPolicyListPolicyAllow

or deny - (Optional) One or the other must be set.

deny OrganizationPolicyListPolicyDeny
inheritFromParent Boolean

If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.

suggestedValue String

The Google Cloud Console will try to default to a configuration that matches the value specified in this field.

allow OrganizationPolicyListPolicyAllow

or deny - (Optional) One or the other must be set.

deny OrganizationPolicyListPolicyDeny
inheritFromParent boolean

If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.

suggestedValue string

The Google Cloud Console will try to default to a configuration that matches the value specified in this field.

allow OrganizationPolicyListPolicyAllow

or deny - (Optional) One or the other must be set.

deny OrganizationPolicyListPolicyDeny
inherit_from_parent bool

If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.

suggested_value str

The Google Cloud Console will try to default to a configuration that matches the value specified in this field.

allow Property Map

or deny - (Optional) One or the other must be set.

deny Property Map
inheritFromParent Boolean

If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.

suggestedValue String

The Google Cloud Console will try to default to a configuration that matches the value specified in this field.

OrganizationPolicyListPolicyAllow

All bool

The policy allows or denies all values.

Values List<string>

The policy can define specific values that are allowed or denied.

All bool

The policy allows or denies all values.

Values []string

The policy can define specific values that are allowed or denied.

all Boolean

The policy allows or denies all values.

values List<String>

The policy can define specific values that are allowed or denied.

all boolean

The policy allows or denies all values.

values string[]

The policy can define specific values that are allowed or denied.

all bool

The policy allows or denies all values.

values Sequence[str]

The policy can define specific values that are allowed or denied.

all Boolean

The policy allows or denies all values.

values List<String>

The policy can define specific values that are allowed or denied.

OrganizationPolicyListPolicyDeny

All bool

The policy allows or denies all values.

Values List<string>

The policy can define specific values that are allowed or denied.

All bool

The policy allows or denies all values.

Values []string

The policy can define specific values that are allowed or denied.

all Boolean

The policy allows or denies all values.

values List<String>

The policy can define specific values that are allowed or denied.

all boolean

The policy allows or denies all values.

values string[]

The policy can define specific values that are allowed or denied.

all bool

The policy allows or denies all values.

values Sequence[str]

The policy can define specific values that are allowed or denied.

all Boolean

The policy allows or denies all values.

values List<String>

The policy can define specific values that are allowed or denied.

OrganizationPolicyRestorePolicy

Default bool

May only be set to true. If set, then the default Policy is restored.

Default bool

May only be set to true. If set, then the default Policy is restored.

default_ Boolean

May only be set to true. If set, then the default Policy is restored.

default boolean

May only be set to true. If set, then the default Policy is restored.

default bool

May only be set to true. If set, then the default Policy is restored.

default Boolean

May only be set to true. If set, then the default Policy is restored.

Import

Folder organization policies can be imported using any of the follow formats

 $ pulumi import gcp:folder/organizationPolicy:OrganizationPolicy policy folders/folder-1234/constraints/serviceuser.services
 $ pulumi import gcp:folder/organizationPolicy:OrganizationPolicy policy folder-1234/serviceuser.services

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.