Class AppEngineVersionIamBinding
Three different resources help you manage your IAM policy for Identity-Aware Proxy AppEngineVersion. Each of these resources serves a different use case:
gcp.iap.AppEngineVersionIamPolicy: Authoritative. Sets the IAM policy for the appengineversion and replaces any existing policy already attached.gcp.iap.AppEngineVersionIamBinding: 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 appengineversion are preserved.gcp.iap.AppEngineVersionIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the appengineversion are preserved.
Note:
gcp.iap.AppEngineVersionIamPolicycannot be used in conjunction withgcp.iap.AppEngineVersionIamBindingandgcp.iap.AppEngineVersionIamMemberor they will fight over what your policy should be.
Note:
gcp.iap.AppEngineVersionIamBindingresources can be used in conjunction withgcp.iap.AppEngineVersionIamMemberresources only if they do not grant privilege to the same role.
google_iap_app_engine_version_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.AppEngineVersionIamPolicy("policy", new Gcp.Iap.AppEngineVersionIamPolicyArgs
{
Project = google_app_engine_standard_app_version.Version.Project,
AppId = google_app_engine_standard_app_version.Version.Project,
Service = google_app_engine_standard_app_version.Version.Service,
VersionId = google_app_engine_standard_app_version.Version.Version_id,
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.AppEngineVersionIamPolicy("policy", new Gcp.Iap.AppEngineVersionIamPolicyArgs
{
Project = google_app_engine_standard_app_version.Version.Project,
AppId = google_app_engine_standard_app_version.Version.Project,
Service = google_app_engine_standard_app_version.Version.Service,
VersionId = google_app_engine_standard_app_version.Version.Version_id,
PolicyData = admin.Apply(admin => admin.PolicyData),
});
}
}
google_iap_app_engine_version_iam_binding
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var binding = new Gcp.Iap.AppEngineVersionIamBinding("binding", new Gcp.Iap.AppEngineVersionIamBindingArgs
{
AppId = google_app_engine_standard_app_version.Version.Project,
Members =
{
"user:jane@example.com",
},
Project = google_app_engine_standard_app_version.Version.Project,
Role = "roles/iap.httpsResourceAccessor",
Service = google_app_engine_standard_app_version.Version.Service,
VersionId = google_app_engine_standard_app_version.Version.Version_id,
});
}
}
With IAM Conditions:
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var binding = new Gcp.Iap.AppEngineVersionIamBinding("binding", new Gcp.Iap.AppEngineVersionIamBindingArgs
{
AppId = google_app_engine_standard_app_version.Version.Project,
Condition = new Gcp.Iap.Inputs.AppEngineVersionIamBindingConditionArgs
{
Description = "Expiring at midnight of 2019-12-31",
Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
Title = "expires_after_2019_12_31",
},
Members =
{
"user:jane@example.com",
},
Project = google_app_engine_standard_app_version.Version.Project,
Role = "roles/iap.httpsResourceAccessor",
Service = google_app_engine_standard_app_version.Version.Service,
VersionId = google_app_engine_standard_app_version.Version.Version_id,
});
}
}
google_iap_app_engine_version_iam_member
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var member = new Gcp.Iap.AppEngineVersionIamMember("member", new Gcp.Iap.AppEngineVersionIamMemberArgs
{
AppId = google_app_engine_standard_app_version.Version.Project,
Member = "user:jane@example.com",
Project = google_app_engine_standard_app_version.Version.Project,
Role = "roles/iap.httpsResourceAccessor",
Service = google_app_engine_standard_app_version.Version.Service,
VersionId = google_app_engine_standard_app_version.Version.Version_id,
});
}
}
With IAM Conditions:
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var member = new Gcp.Iap.AppEngineVersionIamMember("member", new Gcp.Iap.AppEngineVersionIamMemberArgs
{
AppId = google_app_engine_standard_app_version.Version.Project,
Condition = new Gcp.Iap.Inputs.AppEngineVersionIamMemberConditionArgs
{
Description = "Expiring at midnight of 2019-12-31",
Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
Title = "expires_after_2019_12_31",
},
Member = "user:jane@example.com",
Project = google_app_engine_standard_app_version.Version.Project,
Role = "roles/iap.httpsResourceAccessor",
Service = google_app_engine_standard_app_version.Version.Service,
VersionId = google_app_engine_standard_app_version.Version.Version_id,
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Iap
Assembly: Pulumi.Gcp.dll
Syntax
public class AppEngineVersionIamBinding : CustomResource
Constructors
View SourceAppEngineVersionIamBinding(String, AppEngineVersionIamBindingArgs, CustomResourceOptions)
Create a AppEngineVersionIamBinding resource with the given unique name, arguments, and options.
Declaration
public AppEngineVersionIamBinding(string name, AppEngineVersionIamBindingArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AppEngineVersionIamBindingArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAppId
Id of the App Engine application. Used to find the parent resource to bind the IAM policy to
Declaration
public Output<string> AppId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Condition
An IAM Condition for a given binding. Structure is documented below.
Declaration
public Output<AppEngineVersionIamBindingCondition> Condition { get; }
Property Value
| Type | Description |
|---|---|
| Output<AppEngineVersionIamBindingCondition> |
Etag
(Computed) The etag of the IAM policy.
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Members
Declaration
public Output<ImmutableArray<string>> Members { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
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> |
Role
The role that should be applied. Only one
gcp.iap.AppEngineVersionIamBinding 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> |
Service
Service id of the App Engine application Used to find the parent resource to bind the IAM policy to
Declaration
public Output<string> Service { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VersionId
Version id of the App Engine application Used to find the parent resource to bind the IAM policy to
Declaration
public Output<string> VersionId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AppEngineVersionIamBindingState, CustomResourceOptions)
Get an existing AppEngineVersionIamBinding resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AppEngineVersionIamBinding Get(string name, Input<string> id, AppEngineVersionIamBindingState 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. |
| AppEngineVersionIamBindingState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AppEngineVersionIamBinding |