Class IAMPolicy
Allows creation and management of the IAM policy for an existing Google Cloud Platform folder.
Example Usage
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var department1 = new Gcp.Organizations.Folder("department1", new Gcp.Organizations.FolderArgs
{
DisplayName = "Department 1",
Parent = "organizations/1234567",
});
var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
{
Binding =
{
{
{ "role", "roles/editor" },
{ "members",
{
"user:jane@example.com",
} },
},
},
}));
var folderAdminPolicy = new Gcp.Folder.IAMPolicy("folderAdminPolicy", new Gcp.Folder.IAMPolicyArgs
{
Folder = department1.Name,
PolicyData = admin.Apply(admin => admin.PolicyData),
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Folder
Assembly: Pulumi.Gcp.dll
Syntax
public class IAMPolicy : CustomResource
Constructors
View SourceIAMPolicy(String, IAMPolicyArgs, CustomResourceOptions)
Create a IAMPolicy resource with the given unique name, arguments, and options.
Declaration
public IAMPolicy(string name, IAMPolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| IAMPolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEtag
(Computed) The etag of the folder's IAM policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Folder
The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
Declaration
public Output<string> Folder { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyData
The gcp.organizations.getIAMPolicy data source that represents
the IAM policy that will be applied to the folder. This policy overrides any existing
policy applied to the folder.
Declaration
public Output<string> PolicyData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, IAMPolicyState, CustomResourceOptions)
Get an existing IAMPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static IAMPolicy Get(string name, Input<string> id, IAMPolicyState 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. |
| IAMPolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| IAMPolicy |