1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. accesscontextmanager
  5. ServicePerimeterIngressPolicy
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

gcp.accesscontextmanager.ServicePerimeterIngressPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

    IngressPolicies match requests based on ingressFrom and ingressTo stanzas. For an ingress policy to match, both the ingressFrom and ingressTo stanzas must be matched. If an IngressPolicy matches a request, the request is allowed through the perimeter boundary from outside the perimeter. For example, access from the internet can be allowed either based on an AccessLevel or, for traffic hosted on Google Cloud, the project of the source network. For access from private networks, using the project of the hosting network is required. Individual ingress policies can be limited by restricting which services and/ or actions they match using the ingressTo field.

    Note: By default, updates to this resource will remove the IngressPolicy from the from the perimeter and add it back in a non-atomic manner. To ensure that the new IngressPolicy is added before the old one is removed, add a lifecycle block with create_before_destroy = true to this resource.

    To get more information about ServicePerimeterIngressPolicy, see:

    Example Usage

    Access Context Manager Service Perimeter Ingress Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const access_policy = new gcp.accesscontextmanager.AccessPolicy("access-policy", {
        parent: "organizations/123456789",
        title: "Storage Policy",
    });
    const storage_perimeter = new gcp.accesscontextmanager.ServicePerimeter("storage-perimeter", {
        parent: pulumi.interpolate`accesspolicies/${access_policy.name}`,
        name: pulumi.interpolate`accesspolicies/${access_policy.name}/serviceperimeters/storage-perimeter`,
        title: "Storage Perimeter",
        status: {
            restrictedServices: ["storage.googleapis.com"],
        },
    });
    const ingressPolicy = new gcp.accesscontextmanager.ServicePerimeterIngressPolicy("ingress_policy", {
        perimeter: storage_perimeter.name,
        ingressFrom: {
            identityType: "any_identity",
            sources: [{
                accessLevel: "*",
            }],
        },
        ingressTo: {
            resources: ["*"],
            operations: [{
                serviceName: "bigquery.googleapis.com",
                methodSelectors: [{
                    method: "*",
                }],
            }],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
        parent="organizations/123456789",
        title="Storage Policy")
    storage_perimeter = gcp.accesscontextmanager.ServicePerimeter("storage-perimeter",
        parent=access_policy.name.apply(lambda name: f"accesspolicies/{name}"),
        name=access_policy.name.apply(lambda name: f"accesspolicies/{name}/serviceperimeters/storage-perimeter"),
        title="Storage Perimeter",
        status=gcp.accesscontextmanager.ServicePerimeterStatusArgs(
            restricted_services=["storage.googleapis.com"],
        ))
    ingress_policy = gcp.accesscontextmanager.ServicePerimeterIngressPolicy("ingress_policy",
        perimeter=storage_perimeter.name,
        ingress_from=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromArgs(
            identity_type="any_identity",
            sources=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArgs(
                access_level="*",
            )],
        ),
        ingress_to=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToArgs(
            resources=["*"],
            operations=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArgs(
                service_name="bigquery.googleapis.com",
                method_selectors=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs(
                    method="*",
                )],
            )],
        ))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/accesscontextmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := accesscontextmanager.NewAccessPolicy(ctx, "access-policy", &accesscontextmanager.AccessPolicyArgs{
    			Parent: pulumi.String("organizations/123456789"),
    			Title:  pulumi.String("Storage Policy"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = accesscontextmanager.NewServicePerimeter(ctx, "storage-perimeter", &accesscontextmanager.ServicePerimeterArgs{
    			Parent: access_policy.Name.ApplyT(func(name string) (string, error) {
    				return fmt.Sprintf("accesspolicies/%v", name), nil
    			}).(pulumi.StringOutput),
    			Name: access_policy.Name.ApplyT(func(name string) (string, error) {
    				return fmt.Sprintf("accesspolicies/%v/serviceperimeters/storage-perimeter", name), nil
    			}).(pulumi.StringOutput),
    			Title: pulumi.String("Storage Perimeter"),
    			Status: &accesscontextmanager.ServicePerimeterStatusArgs{
    				RestrictedServices: pulumi.StringArray{
    					pulumi.String("storage.googleapis.com"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = accesscontextmanager.NewServicePerimeterIngressPolicy(ctx, "ingress_policy", &accesscontextmanager.ServicePerimeterIngressPolicyArgs{
    			Perimeter: storage_perimeter.Name,
    			IngressFrom: &accesscontextmanager.ServicePerimeterIngressPolicyIngressFromArgs{
    				IdentityType: pulumi.String("any_identity"),
    				Sources: accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArray{
    					&accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArgs{
    						AccessLevel: pulumi.String("*"),
    					},
    				},
    			},
    			IngressTo: &accesscontextmanager.ServicePerimeterIngressPolicyIngressToArgs{
    				Resources: pulumi.StringArray{
    					pulumi.String("*"),
    				},
    				Operations: accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArray{
    					&accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArgs{
    						ServiceName: pulumi.String("bigquery.googleapis.com"),
    						MethodSelectors: accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArray{
    							&accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs{
    								Method: pulumi.String("*"),
    							},
    						},
    					},
    				},
    			},
    		})
    		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 access_policy = new Gcp.AccessContextManager.AccessPolicy("access-policy", new()
        {
            Parent = "organizations/123456789",
            Title = "Storage Policy",
        });
    
        var storage_perimeter = new Gcp.AccessContextManager.ServicePerimeter("storage-perimeter", new()
        {
            Parent = access_policy.Name.Apply(name => $"accesspolicies/{name}"),
            Name = access_policy.Name.Apply(name => $"accesspolicies/{name}/serviceperimeters/storage-perimeter"),
            Title = "Storage Perimeter",
            Status = new Gcp.AccessContextManager.Inputs.ServicePerimeterStatusArgs
            {
                RestrictedServices = new[]
                {
                    "storage.googleapis.com",
                },
            },
        });
    
        var ingressPolicy = new Gcp.AccessContextManager.ServicePerimeterIngressPolicy("ingress_policy", new()
        {
            Perimeter = storage_perimeter.Name,
            IngressFrom = new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressFromArgs
            {
                IdentityType = "any_identity",
                Sources = new[]
                {
                    new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressFromSourceArgs
                    {
                        AccessLevel = "*",
                    },
                },
            },
            IngressTo = new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressToArgs
            {
                Resources = new[]
                {
                    "*",
                },
                Operations = new[]
                {
                    new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressToOperationArgs
                    {
                        ServiceName = "bigquery.googleapis.com",
                        MethodSelectors = new[]
                        {
                            new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs
                            {
                                Method = "*",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.accesscontextmanager.AccessPolicy;
    import com.pulumi.gcp.accesscontextmanager.AccessPolicyArgs;
    import com.pulumi.gcp.accesscontextmanager.ServicePerimeter;
    import com.pulumi.gcp.accesscontextmanager.ServicePerimeterArgs;
    import com.pulumi.gcp.accesscontextmanager.inputs.ServicePerimeterStatusArgs;
    import com.pulumi.gcp.accesscontextmanager.ServicePerimeterIngressPolicy;
    import com.pulumi.gcp.accesscontextmanager.ServicePerimeterIngressPolicyArgs;
    import com.pulumi.gcp.accesscontextmanager.inputs.ServicePerimeterIngressPolicyIngressFromArgs;
    import com.pulumi.gcp.accesscontextmanager.inputs.ServicePerimeterIngressPolicyIngressToArgs;
    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 access_policy = new AccessPolicy("access-policy", AccessPolicyArgs.builder()        
                .parent("organizations/123456789")
                .title("Storage Policy")
                .build());
    
            var storage_perimeter = new ServicePerimeter("storage-perimeter", ServicePerimeterArgs.builder()        
                .parent(access_policy.name().applyValue(name -> String.format("accesspolicies/%s", name)))
                .name(access_policy.name().applyValue(name -> String.format("accesspolicies/%s/serviceperimeters/storage-perimeter", name)))
                .title("Storage Perimeter")
                .status(ServicePerimeterStatusArgs.builder()
                    .restrictedServices("storage.googleapis.com")
                    .build())
                .build());
    
            var ingressPolicy = new ServicePerimeterIngressPolicy("ingressPolicy", ServicePerimeterIngressPolicyArgs.builder()        
                .perimeter(storage_perimeter.name())
                .ingressFrom(ServicePerimeterIngressPolicyIngressFromArgs.builder()
                    .identityType("any_identity")
                    .sources(ServicePerimeterIngressPolicyIngressFromSourceArgs.builder()
                        .accessLevel("*")
                        .build())
                    .build())
                .ingressTo(ServicePerimeterIngressPolicyIngressToArgs.builder()
                    .resources("*")
                    .operations(ServicePerimeterIngressPolicyIngressToOperationArgs.builder()
                        .serviceName("bigquery.googleapis.com")
                        .methodSelectors(ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs.builder()
                            .method("*")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      storage-perimeter:
        type: gcp:accesscontextmanager:ServicePerimeter
        properties:
          parent: accesspolicies/${["access-policy"].name}
          name: accesspolicies/${["access-policy"].name}/serviceperimeters/storage-perimeter
          title: Storage Perimeter
          status:
            restrictedServices:
              - storage.googleapis.com
      ingressPolicy:
        type: gcp:accesscontextmanager:ServicePerimeterIngressPolicy
        name: ingress_policy
        properties:
          perimeter: ${["storage-perimeter"].name}
          ingressFrom:
            identityType: any_identity
            sources:
              - accessLevel: '*'
          ingressTo:
            resources:
              - '*'
            operations:
              - serviceName: bigquery.googleapis.com
                methodSelectors:
                  - method: '*'
      access-policy:
        type: gcp:accesscontextmanager:AccessPolicy
        properties:
          parent: organizations/123456789
          title: Storage Policy
    

    Create ServicePerimeterIngressPolicy Resource

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

    Constructor syntax

    new ServicePerimeterIngressPolicy(name: string, args: ServicePerimeterIngressPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ServicePerimeterIngressPolicy(resource_name: str,
                                      args: ServicePerimeterIngressPolicyArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServicePerimeterIngressPolicy(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      perimeter: Optional[str] = None,
                                      ingress_from: Optional[ServicePerimeterIngressPolicyIngressFromArgs] = None,
                                      ingress_to: Optional[ServicePerimeterIngressPolicyIngressToArgs] = None)
    func NewServicePerimeterIngressPolicy(ctx *Context, name string, args ServicePerimeterIngressPolicyArgs, opts ...ResourceOption) (*ServicePerimeterIngressPolicy, error)
    public ServicePerimeterIngressPolicy(string name, ServicePerimeterIngressPolicyArgs args, CustomResourceOptions? opts = null)
    public ServicePerimeterIngressPolicy(String name, ServicePerimeterIngressPolicyArgs args)
    public ServicePerimeterIngressPolicy(String name, ServicePerimeterIngressPolicyArgs args, CustomResourceOptions options)
    
    type: gcp:accesscontextmanager:ServicePerimeterIngressPolicy
    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 ServicePerimeterIngressPolicyArgs
    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 ServicePerimeterIngressPolicyArgs
    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 ServicePerimeterIngressPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServicePerimeterIngressPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServicePerimeterIngressPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var servicePerimeterIngressPolicyResource = new Gcp.AccessContextManager.ServicePerimeterIngressPolicy("servicePerimeterIngressPolicyResource", new()
    {
        Perimeter = "string",
        IngressFrom = new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressFromArgs
        {
            Identities = new[]
            {
                "string",
            },
            IdentityType = "string",
            Sources = new[]
            {
                new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressFromSourceArgs
                {
                    AccessLevel = "string",
                    Resource = "string",
                },
            },
        },
        IngressTo = new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressToArgs
        {
            Operations = new[]
            {
                new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressToOperationArgs
                {
                    MethodSelectors = new[]
                    {
                        new Gcp.AccessContextManager.Inputs.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs
                        {
                            Method = "string",
                            Permission = "string",
                        },
                    },
                    ServiceName = "string",
                },
            },
            Resources = new[]
            {
                "string",
            },
        },
    });
    
    example, err := accesscontextmanager.NewServicePerimeterIngressPolicy(ctx, "servicePerimeterIngressPolicyResource", &accesscontextmanager.ServicePerimeterIngressPolicyArgs{
    	Perimeter: pulumi.String("string"),
    	IngressFrom: &accesscontextmanager.ServicePerimeterIngressPolicyIngressFromArgs{
    		Identities: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IdentityType: pulumi.String("string"),
    		Sources: accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArray{
    			&accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArgs{
    				AccessLevel: pulumi.String("string"),
    				Resource:    pulumi.String("string"),
    			},
    		},
    	},
    	IngressTo: &accesscontextmanager.ServicePerimeterIngressPolicyIngressToArgs{
    		Operations: accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArray{
    			&accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArgs{
    				MethodSelectors: accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArray{
    					&accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs{
    						Method:     pulumi.String("string"),
    						Permission: pulumi.String("string"),
    					},
    				},
    				ServiceName: pulumi.String("string"),
    			},
    		},
    		Resources: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    })
    
    var servicePerimeterIngressPolicyResource = new ServicePerimeterIngressPolicy("servicePerimeterIngressPolicyResource", ServicePerimeterIngressPolicyArgs.builder()        
        .perimeter("string")
        .ingressFrom(ServicePerimeterIngressPolicyIngressFromArgs.builder()
            .identities("string")
            .identityType("string")
            .sources(ServicePerimeterIngressPolicyIngressFromSourceArgs.builder()
                .accessLevel("string")
                .resource("string")
                .build())
            .build())
        .ingressTo(ServicePerimeterIngressPolicyIngressToArgs.builder()
            .operations(ServicePerimeterIngressPolicyIngressToOperationArgs.builder()
                .methodSelectors(ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs.builder()
                    .method("string")
                    .permission("string")
                    .build())
                .serviceName("string")
                .build())
            .resources("string")
            .build())
        .build());
    
    service_perimeter_ingress_policy_resource = gcp.accesscontextmanager.ServicePerimeterIngressPolicy("servicePerimeterIngressPolicyResource",
        perimeter="string",
        ingress_from=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromArgs(
            identities=["string"],
            identity_type="string",
            sources=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArgs(
                access_level="string",
                resource="string",
            )],
        ),
        ingress_to=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToArgs(
            operations=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArgs(
                method_selectors=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs(
                    method="string",
                    permission="string",
                )],
                service_name="string",
            )],
            resources=["string"],
        ))
    
    const servicePerimeterIngressPolicyResource = new gcp.accesscontextmanager.ServicePerimeterIngressPolicy("servicePerimeterIngressPolicyResource", {
        perimeter: "string",
        ingressFrom: {
            identities: ["string"],
            identityType: "string",
            sources: [{
                accessLevel: "string",
                resource: "string",
            }],
        },
        ingressTo: {
            operations: [{
                methodSelectors: [{
                    method: "string",
                    permission: "string",
                }],
                serviceName: "string",
            }],
            resources: ["string"],
        },
    });
    
    type: gcp:accesscontextmanager:ServicePerimeterIngressPolicy
    properties:
        ingressFrom:
            identities:
                - string
            identityType: string
            sources:
                - accessLevel: string
                  resource: string
        ingressTo:
            operations:
                - methodSelectors:
                    - method: string
                      permission: string
                  serviceName: string
            resources:
                - string
        perimeter: string
    

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

    Perimeter string
    The name of the Service Perimeter to add this resource to.


    IngressFrom ServicePerimeterIngressPolicyIngressFrom
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    IngressTo ServicePerimeterIngressPolicyIngressTo
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    Perimeter string
    The name of the Service Perimeter to add this resource to.


    IngressFrom ServicePerimeterIngressPolicyIngressFromArgs
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    IngressTo ServicePerimeterIngressPolicyIngressToArgs
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter String
    The name of the Service Perimeter to add this resource to.


    ingressFrom ServicePerimeterIngressPolicyIngressFrom
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingressTo ServicePerimeterIngressPolicyIngressTo
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter string
    The name of the Service Perimeter to add this resource to.


    ingressFrom ServicePerimeterIngressPolicyIngressFrom
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingressTo ServicePerimeterIngressPolicyIngressTo
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter str
    The name of the Service Perimeter to add this resource to.


    ingress_from ServicePerimeterIngressPolicyIngressFromArgs
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingress_to ServicePerimeterIngressPolicyIngressToArgs
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter String
    The name of the Service Perimeter to add this resource to.


    ingressFrom Property Map
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingressTo Property Map
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ServicePerimeterIngressPolicy Resource

    Get an existing ServicePerimeterIngressPolicy 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?: ServicePerimeterIngressPolicyState, opts?: CustomResourceOptions): ServicePerimeterIngressPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ingress_from: Optional[ServicePerimeterIngressPolicyIngressFromArgs] = None,
            ingress_to: Optional[ServicePerimeterIngressPolicyIngressToArgs] = None,
            perimeter: Optional[str] = None) -> ServicePerimeterIngressPolicy
    func GetServicePerimeterIngressPolicy(ctx *Context, name string, id IDInput, state *ServicePerimeterIngressPolicyState, opts ...ResourceOption) (*ServicePerimeterIngressPolicy, error)
    public static ServicePerimeterIngressPolicy Get(string name, Input<string> id, ServicePerimeterIngressPolicyState? state, CustomResourceOptions? opts = null)
    public static ServicePerimeterIngressPolicy get(String name, Output<String> id, ServicePerimeterIngressPolicyState 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:
    IngressFrom ServicePerimeterIngressPolicyIngressFrom
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    IngressTo ServicePerimeterIngressPolicyIngressTo
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    Perimeter string
    The name of the Service Perimeter to add this resource to.


    IngressFrom ServicePerimeterIngressPolicyIngressFromArgs
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    IngressTo ServicePerimeterIngressPolicyIngressToArgs
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    Perimeter string
    The name of the Service Perimeter to add this resource to.


    ingressFrom ServicePerimeterIngressPolicyIngressFrom
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingressTo ServicePerimeterIngressPolicyIngressTo
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter String
    The name of the Service Perimeter to add this resource to.


    ingressFrom ServicePerimeterIngressPolicyIngressFrom
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingressTo ServicePerimeterIngressPolicyIngressTo
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter string
    The name of the Service Perimeter to add this resource to.


    ingress_from ServicePerimeterIngressPolicyIngressFromArgs
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingress_to ServicePerimeterIngressPolicyIngressToArgs
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter str
    The name of the Service Perimeter to add this resource to.


    ingressFrom Property Map
    Defines the conditions on the source of a request causing this IngressPolicy to apply. Structure is documented below.
    ingressTo Property Map
    Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. Structure is documented below.
    perimeter String
    The name of the Service Perimeter to add this resource to.


    Supporting Types

    ServicePerimeterIngressPolicyIngressFrom, ServicePerimeterIngressPolicyIngressFromArgs

    Identities List<string>
    A list of identities that are allowed access through this IngressPolicy. Should be in the format of an email address. The email address should represent an individual user, service account, or Google group.
    IdentityType string
    Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of identities field will be allowed access. Possible values are: ANY_IDENTITY, ANY_USER_ACCOUNT, ANY_SERVICE_ACCOUNT.
    Sources List<ServicePerimeterIngressPolicyIngressFromSource>
    Sources that this IngressPolicy authorizes access from. Structure is documented below.
    Identities []string
    A list of identities that are allowed access through this IngressPolicy. Should be in the format of an email address. The email address should represent an individual user, service account, or Google group.
    IdentityType string
    Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of identities field will be allowed access. Possible values are: ANY_IDENTITY, ANY_USER_ACCOUNT, ANY_SERVICE_ACCOUNT.
    Sources []ServicePerimeterIngressPolicyIngressFromSource
    Sources that this IngressPolicy authorizes access from. Structure is documented below.
    identities List<String>
    A list of identities that are allowed access through this IngressPolicy. Should be in the format of an email address. The email address should represent an individual user, service account, or Google group.
    identityType String
    Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of identities field will be allowed access. Possible values are: ANY_IDENTITY, ANY_USER_ACCOUNT, ANY_SERVICE_ACCOUNT.
    sources List<ServicePerimeterIngressPolicyIngressFromSource>
    Sources that this IngressPolicy authorizes access from. Structure is documented below.
    identities string[]
    A list of identities that are allowed access through this IngressPolicy. Should be in the format of an email address. The email address should represent an individual user, service account, or Google group.
    identityType string
    Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of identities field will be allowed access. Possible values are: ANY_IDENTITY, ANY_USER_ACCOUNT, ANY_SERVICE_ACCOUNT.
    sources ServicePerimeterIngressPolicyIngressFromSource[]
    Sources that this IngressPolicy authorizes access from. Structure is documented below.
    identities Sequence[str]
    A list of identities that are allowed access through this IngressPolicy. Should be in the format of an email address. The email address should represent an individual user, service account, or Google group.
    identity_type str
    Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of identities field will be allowed access. Possible values are: ANY_IDENTITY, ANY_USER_ACCOUNT, ANY_SERVICE_ACCOUNT.
    sources Sequence[ServicePerimeterIngressPolicyIngressFromSource]
    Sources that this IngressPolicy authorizes access from. Structure is documented below.
    identities List<String>
    A list of identities that are allowed access through this IngressPolicy. Should be in the format of an email address. The email address should represent an individual user, service account, or Google group.
    identityType String
    Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of identities field will be allowed access. Possible values are: ANY_IDENTITY, ANY_USER_ACCOUNT, ANY_SERVICE_ACCOUNT.
    sources List<Property Map>
    Sources that this IngressPolicy authorizes access from. Structure is documented below.

    ServicePerimeterIngressPolicyIngressFromSource, ServicePerimeterIngressPolicyIngressFromSourceArgs

    AccessLevel string
    An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example accessPolicies/MY_POLICY/accessLevels/MY_LEVEL. If * is specified, then all IngressSources will be allowed.
    Resource string
    A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format projects/{project_number} The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. * is not allowed, the case of allowing all Google Cloud resources only is not supported.
    AccessLevel string
    An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example accessPolicies/MY_POLICY/accessLevels/MY_LEVEL. If * is specified, then all IngressSources will be allowed.
    Resource string
    A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format projects/{project_number} The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. * is not allowed, the case of allowing all Google Cloud resources only is not supported.
    accessLevel String
    An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example accessPolicies/MY_POLICY/accessLevels/MY_LEVEL. If * is specified, then all IngressSources will be allowed.
    resource String
    A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format projects/{project_number} The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. * is not allowed, the case of allowing all Google Cloud resources only is not supported.
    accessLevel string
    An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example accessPolicies/MY_POLICY/accessLevels/MY_LEVEL. If * is specified, then all IngressSources will be allowed.
    resource string
    A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format projects/{project_number} The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. * is not allowed, the case of allowing all Google Cloud resources only is not supported.
    access_level str
    An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example accessPolicies/MY_POLICY/accessLevels/MY_LEVEL. If * is specified, then all IngressSources will be allowed.
    resource str
    A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format projects/{project_number} The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. * is not allowed, the case of allowing all Google Cloud resources only is not supported.
    accessLevel String
    An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example accessPolicies/MY_POLICY/accessLevels/MY_LEVEL. If * is specified, then all IngressSources will be allowed.
    resource String
    A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed. Format projects/{project_number} The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. * is not allowed, the case of allowing all Google Cloud resources only is not supported.

    ServicePerimeterIngressPolicyIngressTo, ServicePerimeterIngressPolicyIngressToArgs

    Operations List<ServicePerimeterIngressPolicyIngressToOperation>
    A list of ApiOperations the sources specified in corresponding IngressFrom are allowed to perform in this ServicePerimeter. Structure is documented below.
    Resources List<string>
    A list of resources, currently only projects in the form projects/<projectnumber>, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. A request matches if it contains a resource in this list. If * is specified for resources, then this IngressTo rule will authorize access to all resources inside the perimeter, provided that the request also matches the operations field.
    Operations []ServicePerimeterIngressPolicyIngressToOperation
    A list of ApiOperations the sources specified in corresponding IngressFrom are allowed to perform in this ServicePerimeter. Structure is documented below.
    Resources []string
    A list of resources, currently only projects in the form projects/<projectnumber>, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. A request matches if it contains a resource in this list. If * is specified for resources, then this IngressTo rule will authorize access to all resources inside the perimeter, provided that the request also matches the operations field.
    operations List<ServicePerimeterIngressPolicyIngressToOperation>
    A list of ApiOperations the sources specified in corresponding IngressFrom are allowed to perform in this ServicePerimeter. Structure is documented below.
    resources List<String>
    A list of resources, currently only projects in the form projects/<projectnumber>, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. A request matches if it contains a resource in this list. If * is specified for resources, then this IngressTo rule will authorize access to all resources inside the perimeter, provided that the request also matches the operations field.
    operations ServicePerimeterIngressPolicyIngressToOperation[]
    A list of ApiOperations the sources specified in corresponding IngressFrom are allowed to perform in this ServicePerimeter. Structure is documented below.
    resources string[]
    A list of resources, currently only projects in the form projects/<projectnumber>, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. A request matches if it contains a resource in this list. If * is specified for resources, then this IngressTo rule will authorize access to all resources inside the perimeter, provided that the request also matches the operations field.
    operations Sequence[ServicePerimeterIngressPolicyIngressToOperation]
    A list of ApiOperations the sources specified in corresponding IngressFrom are allowed to perform in this ServicePerimeter. Structure is documented below.
    resources Sequence[str]
    A list of resources, currently only projects in the form projects/<projectnumber>, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. A request matches if it contains a resource in this list. If * is specified for resources, then this IngressTo rule will authorize access to all resources inside the perimeter, provided that the request also matches the operations field.
    operations List<Property Map>
    A list of ApiOperations the sources specified in corresponding IngressFrom are allowed to perform in this ServicePerimeter. Structure is documented below.
    resources List<String>
    A list of resources, currently only projects in the form projects/<projectnumber>, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. A request matches if it contains a resource in this list. If * is specified for resources, then this IngressTo rule will authorize access to all resources inside the perimeter, provided that the request also matches the operations field.

    ServicePerimeterIngressPolicyIngressToOperation, ServicePerimeterIngressPolicyIngressToOperationArgs

    MethodSelectors List<ServicePerimeterIngressPolicyIngressToOperationMethodSelector>
    API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single MethodSelector entry with * specified for the method field will allow all methods AND permissions for the service specified in serviceName. Structure is documented below.
    ServiceName string
    The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with serviceName field set to * will allow all methods AND permissions for all services.
    MethodSelectors []ServicePerimeterIngressPolicyIngressToOperationMethodSelector
    API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single MethodSelector entry with * specified for the method field will allow all methods AND permissions for the service specified in serviceName. Structure is documented below.
    ServiceName string
    The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with serviceName field set to * will allow all methods AND permissions for all services.
    methodSelectors List<ServicePerimeterIngressPolicyIngressToOperationMethodSelector>
    API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single MethodSelector entry with * specified for the method field will allow all methods AND permissions for the service specified in serviceName. Structure is documented below.
    serviceName String
    The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with serviceName field set to * will allow all methods AND permissions for all services.
    methodSelectors ServicePerimeterIngressPolicyIngressToOperationMethodSelector[]
    API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single MethodSelector entry with * specified for the method field will allow all methods AND permissions for the service specified in serviceName. Structure is documented below.
    serviceName string
    The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with serviceName field set to * will allow all methods AND permissions for all services.
    method_selectors Sequence[ServicePerimeterIngressPolicyIngressToOperationMethodSelector]
    API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single MethodSelector entry with * specified for the method field will allow all methods AND permissions for the service specified in serviceName. Structure is documented below.
    service_name str
    The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with serviceName field set to * will allow all methods AND permissions for all services.
    methodSelectors List<Property Map>
    API methods or permissions to allow. Method or permission must belong to the service specified by serviceName field. A single MethodSelector entry with * specified for the method field will allow all methods AND permissions for the service specified in serviceName. Structure is documented below.
    serviceName String
    The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with serviceName field set to * will allow all methods AND permissions for all services.

    ServicePerimeterIngressPolicyIngressToOperationMethodSelector, ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs

    Method string
    Value for method should be a valid method name for the corresponding serviceName in ApiOperation. If * used as value for method, then ALL methods and permissions are allowed.
    Permission string
    Value for permission should be a valid Cloud IAM permission for the corresponding serviceName in ApiOperation.
    Method string
    Value for method should be a valid method name for the corresponding serviceName in ApiOperation. If * used as value for method, then ALL methods and permissions are allowed.
    Permission string
    Value for permission should be a valid Cloud IAM permission for the corresponding serviceName in ApiOperation.
    method String
    Value for method should be a valid method name for the corresponding serviceName in ApiOperation. If * used as value for method, then ALL methods and permissions are allowed.
    permission String
    Value for permission should be a valid Cloud IAM permission for the corresponding serviceName in ApiOperation.
    method string
    Value for method should be a valid method name for the corresponding serviceName in ApiOperation. If * used as value for method, then ALL methods and permissions are allowed.
    permission string
    Value for permission should be a valid Cloud IAM permission for the corresponding serviceName in ApiOperation.
    method str
    Value for method should be a valid method name for the corresponding serviceName in ApiOperation. If * used as value for method, then ALL methods and permissions are allowed.
    permission str
    Value for permission should be a valid Cloud IAM permission for the corresponding serviceName in ApiOperation.
    method String
    Value for method should be a valid method name for the corresponding serviceName in ApiOperation. If * used as value for method, then ALL methods and permissions are allowed.
    permission String
    Value for permission should be a valid Cloud IAM permission for the corresponding serviceName in ApiOperation.

    Import

    ServicePerimeterIngressPolicy can be imported using any of these accepted formats:

    • {{perimeter}}

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

    $ pulumi import gcp:accesscontextmanager/servicePerimeterIngressPolicy:ServicePerimeterIngressPolicy default {{perimeter}}
    

    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.20.0 published on Wednesday, Apr 24, 2024 by Pulumi