GroupPolicyAttachment

class GroupPolicyAttachment : KotlinCustomResource

Attaches a Managed IAM Policy to an IAM group

NOTE: The usage of this resource conflicts with the aws.iam.PolicyAttachment resource and will permanently show a difference if both are defined.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.Group;
import com.pulumi.aws.iam.Policy;
import com.pulumi.aws.iam.PolicyArgs;
import com.pulumi.aws.iam.GroupPolicyAttachment;
import com.pulumi.aws.iam.GroupPolicyAttachmentArgs;
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 group = new Group("group");
var policy = new Policy("policy", PolicyArgs.builder()
.description("A test policy")
.policy("{ ... policy JSON ... }")
.build());
var test_attach = new GroupPolicyAttachment("test-attach", GroupPolicyAttachmentArgs.builder()
.group(group.name())
.policyArn(policy.arn())
.build());
}
}

Import

IAM group policy attachments can be imported using the group name and policy arn separated by /.

$ pulumi import aws:iam/groupPolicyAttachment:GroupPolicyAttachment test-attach test-group/arn:aws:iam::xxxxxxxxxxxx:policy/test-policy

Properties

Link copied to clipboard
val group: Output<String>

The group the policy should be applied to

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val policyArn: Output<String>

The ARN of the policy you want to apply

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>