@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
93 lines (92 loc) • 3.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { Group } from "./index";
/**
* 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
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const group = new aws.iam.Group("group", {name: "test-group"});
* const policy = new aws.iam.Policy("policy", {
* name: "test-policy",
* description: "A test policy",
* policy: "{ ... policy JSON ... }",
* });
* const test_attach = new aws.iam.GroupPolicyAttachment("test-attach", {
* group: group.name,
* policyArn: policy.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import IAM group policy attachments using the group name and policy arn separated by `/`. For example:
*
* ```sh
* $ pulumi import aws:iam/groupPolicyAttachment:GroupPolicyAttachment test-attach test-group/arn:aws:iam::xxxxxxxxxxxx:policy/test-policy
* ```
*/
export declare class GroupPolicyAttachment extends pulumi.CustomResource {
/**
* Get an existing GroupPolicyAttachment resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GroupPolicyAttachmentState, opts?: pulumi.CustomResourceOptions): GroupPolicyAttachment;
/**
* Returns true if the given object is an instance of GroupPolicyAttachment. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is GroupPolicyAttachment;
/**
* The group the policy should be applied to
*/
readonly group: pulumi.Output<string>;
/**
* The ARN of the policy you want to apply
*/
readonly policyArn: pulumi.Output<string>;
/**
* Create a GroupPolicyAttachment resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: GroupPolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering GroupPolicyAttachment resources.
*/
export interface GroupPolicyAttachmentState {
/**
* The group the policy should be applied to
*/
group?: pulumi.Input<string | Group>;
/**
* The ARN of the policy you want to apply
*/
policyArn?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a GroupPolicyAttachment resource.
*/
export interface GroupPolicyAttachmentArgs {
/**
* The group the policy should be applied to
*/
group: pulumi.Input<string | Group>;
/**
* The ARN of the policy you want to apply
*/
policyArn: pulumi.Input<string>;
}