Class GroupPolicyAttachment
Attaches a Managed IAM Policy to an IAM group
NOTE: The usage of this resource conflicts with the
aws.iam.PolicyAttachmentresource and will permanently show a difference if both are defined.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var @group = new Aws.Iam.Group("group", new Aws.Iam.GroupArgs
{
});
var policy = new Aws.Iam.Policy("policy", new Aws.Iam.PolicyArgs
{
Description = "A test policy",
Policy = "",
});
// insert policy here
var test_attach = new Aws.Iam.GroupPolicyAttachment("test-attach", new Aws.Iam.GroupPolicyAttachmentArgs
{
Group = @group.Name,
PolicyArn = policy.Arn,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Iam
Assembly: Pulumi.Aws.dll
Syntax
public class GroupPolicyAttachment : CustomResource
Constructors
View SourceGroupPolicyAttachment(String, GroupPolicyAttachmentArgs, CustomResourceOptions)
Create a GroupPolicyAttachment resource with the given unique name, arguments, and options.
Declaration
public GroupPolicyAttachment(string name, GroupPolicyAttachmentArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| GroupPolicyAttachmentArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceGroup
The group the policy should be applied to
Declaration
public Output<string> Group { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyArn
The ARN of the policy you want to apply
Declaration
public Output<string> PolicyArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, GroupPolicyAttachmentState, CustomResourceOptions)
Get an existing GroupPolicyAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static GroupPolicyAttachment Get(string name, Input<string> id, GroupPolicyAttachmentState 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. |
| GroupPolicyAttachmentState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| GroupPolicyAttachment |