Show / Hide Table of Contents

Class WebTypeComputeIamBinding

Three different resources help you manage your IAM policy for Identity-Aware Proxy WebTypeCompute. Each of these resources serves a different use case:

  • gcp.iap.WebTypeComputeIamPolicy: Authoritative. Sets the IAM policy for the webtypecompute and replaces any existing policy already attached.
  • gcp.iap.WebTypeComputeIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the webtypecompute are preserved.
  • gcp.iap.WebTypeComputeIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the webtypecompute are preserved.

Note: gcp.iap.WebTypeComputeIamPolicy cannot be used in conjunction with gcp.iap.WebTypeComputeIamBinding and gcp.iap.WebTypeComputeIamMember or they will fight over what your policy should be.

Note: gcp.iap.WebTypeComputeIamBinding resources can be used in conjunction with gcp.iap.WebTypeComputeIamMember resources only if they do not grant privilege to the same role.

google_iap_web_type_compute_iam_policy

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/iap.httpsResourceAccessor" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
            },
        },
    }));
    var policy = new Gcp.Iap.WebTypeComputeIamPolicy("policy", new Gcp.Iap.WebTypeComputeIamPolicyArgs
    {
        Project = google_project_service.Project_service.Project,
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

With IAM Conditions:

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
    {
        Binding = 
        {

            {
                { "role", "roles/iap.httpsResourceAccessor" },
                { "members", 
                {
                    "user:jane@example.com",
                } },
                { "condition", 
                {
                    { "title", "expires_after_2019_12_31" },
                    { "description", "Expiring at midnight of 2019-12-31" },
                    { "expression", "request.time < timestamp(\"2020-01-01T00:00:00Z\")" },
                } },
            },
        },
    }));
    var policy = new Gcp.Iap.WebTypeComputeIamPolicy("policy", new Gcp.Iap.WebTypeComputeIamPolicyArgs
    {
        Project = google_project_service.Project_service.Project,
        PolicyData = admin.Apply(admin => admin.PolicyData),
    });
}

}

google_iap_web_type_compute_iam_binding

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.Iap.WebTypeComputeIamBinding("binding", new Gcp.Iap.WebTypeComputeIamBindingArgs
    {
        Project = google_project_service.Project_service.Project,
        Role = "roles/iap.httpsResourceAccessor",
        Members = 
        {
            "user:jane@example.com",
        },
    });
}

}

With IAM Conditions:

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var binding = new Gcp.Iap.WebTypeComputeIamBinding("binding", new Gcp.Iap.WebTypeComputeIamBindingArgs
    {
        Project = google_project_service.Project_service.Project,
        Role = "roles/iap.httpsResourceAccessor",
        Members = 
        {
            "user:jane@example.com",
        },
        Condition = new Gcp.Iap.Inputs.WebTypeComputeIamBindingConditionArgs
        {
            Title = "expires_after_2019_12_31",
            Description = "Expiring at midnight of 2019-12-31",
            Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
        },
    });
}

}

google_iap_web_type_compute_iam_member

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.Iap.WebTypeComputeIamMember("member", new Gcp.Iap.WebTypeComputeIamMemberArgs
    {
        Project = google_project_service.Project_service.Project,
        Role = "roles/iap.httpsResourceAccessor",
        Member = "user:jane@example.com",
    });
}

}

With IAM Conditions:

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var member = new Gcp.Iap.WebTypeComputeIamMember("member", new Gcp.Iap.WebTypeComputeIamMemberArgs
    {
        Project = google_project_service.Project_service.Project,
        Role = "roles/iap.httpsResourceAccessor",
        Member = "user:jane@example.com",
        Condition = new Gcp.Iap.Inputs.WebTypeComputeIamMemberConditionArgs
        {
            Title = "expires_after_2019_12_31",
            Description = "Expiring at midnight of 2019-12-31",
            Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
WebTypeComputeIamBinding
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Iap
Assembly: Pulumi.Gcp.dll
Syntax
public class WebTypeComputeIamBinding : CustomResource

Constructors

View Source

WebTypeComputeIamBinding(String, WebTypeComputeIamBindingArgs, CustomResourceOptions)

Create a WebTypeComputeIamBinding resource with the given unique name, arguments, and options.

Declaration
public WebTypeComputeIamBinding(string name, WebTypeComputeIamBindingArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

WebTypeComputeIamBindingArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Condition

) An IAM Condition for a given binding. Structure is documented below.

Declaration
public Output<WebTypeComputeIamBindingCondition> Condition { get; }
Property Value
Type Description
Output<WebTypeComputeIamBindingCondition>
View Source

Etag

(Computed) The etag of the IAM policy.

Declaration
public Output<string> Etag { get; }
Property Value
Type Description
Output<System.String>
View Source

Members

Declaration
public Output<ImmutableArray<string>> Members { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Project

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

Role

The role that should be applied. Only one gcp.iap.WebTypeComputeIamBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

Declaration
public Output<string> Role { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, WebTypeComputeIamBindingState, CustomResourceOptions)

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

Declaration
public static WebTypeComputeIamBinding Get(string name, Input<string> id, WebTypeComputeIamBindingState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

WebTypeComputeIamBindingState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
WebTypeComputeIamBinding
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.