@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
102 lines (101 loc) • 3.72 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > **WARNING:** Multiple aws.iam.GroupMembership resources with the same group name will produce inconsistent behavior!
*
* Provides a top level resource to manage IAM Group membership for IAM Users. For
* more information on managing IAM Groups or IAM Users, see IAM Groups or
* IAM Users
*
* > **Note:** `aws.iam.GroupMembership` will conflict with itself if used more than once with the same group. To non-exclusively manage the users in a group, see the
* `aws.iam.UserGroupMembership` resource.
*
* ## 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 userOne = new aws.iam.User("user_one", {name: "test-user"});
* const userTwo = new aws.iam.User("user_two", {name: "test-user-two"});
* const team = new aws.iam.GroupMembership("team", {
* name: "tf-testing-group-membership",
* users: [
* userOne.name,
* userTwo.name,
* ],
* group: group.name,
* });
* ```
*/
export declare class GroupMembership extends pulumi.CustomResource {
/**
* Get an existing GroupMembership 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?: GroupMembershipState, opts?: pulumi.CustomResourceOptions): GroupMembership;
/**
* Returns true if the given object is an instance of GroupMembership. 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 GroupMembership;
/**
* The IAM Group name to attach the list of `users` to
*/
readonly group: pulumi.Output<string>;
/**
* The name to identify the Group Membership
*/
readonly name: pulumi.Output<string>;
/**
* A list of IAM User names to associate with the Group
*/
readonly users: pulumi.Output<string[]>;
/**
* Create a GroupMembership 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: GroupMembershipArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering GroupMembership resources.
*/
export interface GroupMembershipState {
/**
* The IAM Group name to attach the list of `users` to
*/
group?: pulumi.Input<string>;
/**
* The name to identify the Group Membership
*/
name?: pulumi.Input<string>;
/**
* A list of IAM User names to associate with the Group
*/
users?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a GroupMembership resource.
*/
export interface GroupMembershipArgs {
/**
* The IAM Group name to attach the list of `users` to
*/
group: pulumi.Input<string>;
/**
* The name to identify the Group Membership
*/
name?: pulumi.Input<string>;
/**
* A list of IAM User names to associate with the Group
*/
users: pulumi.Input<pulumi.Input<string>[]>;
}