@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
202 lines • 6.73 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Creates and manages Scaleway IAM Groups.
* For more information refer to the [IAM API documentation](https://www.scaleway.com/en/developers/api/iam/#groups-f592eb).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const basic = new scaleway.iam.Group("basic", {
* name: "iam_group_basic",
* description: "basic description",
* applicationIds: [],
* userIds: [],
* });
* ```
*
* ### With applications
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const app = new scaleway.iam.Application("app", {});
* const withApp = new scaleway.iam.Group("with_app", {
* name: "iam_group_with_app",
* applicationIds: [app.id],
* userIds: [],
* });
* ```
*
* ### With users
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
* import * as std from "@pulumi/std";
*
* const users = std.toset({
* input: [
* "user1@mail.com",
* "user2@mail.com",
* ],
* }).result;
* const usersGetUser = .reduce((__obj, [__key, __value]) => ({ ...__obj, [String(__key)]: scaleway.iam.getUser({
* email: __value,
* }) }), {});
* const withUsers = new scaleway.iam.Group("with_users", {
* name: "iam_group_with_app",
* applicationIds: [],
* userIds: Object.values(usersGetUser).map(user => (user.id)),
* });
* ```
*
* ## Import
*
* IAM groups can be imported using the `{id}`, e.g.
*
* ```sh
* $ pulumi import scaleway:iam/group:Group basic 11111111-1111-1111-1111-111111111111
* ```
*/
export declare class Group extends pulumi.CustomResource {
/**
* Get an existing Group 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?: GroupState, opts?: pulumi.CustomResourceOptions): Group;
/**
* Returns true if the given object is an instance of Group. 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 Group;
/**
* The list of IDs of the applications attached to the group.
*/
readonly applicationIds: pulumi.Output<string[] | undefined>;
/**
* The date and time of the creation of the group
*/
readonly createdAt: pulumi.Output<string>;
/**
* The description of the IAM group.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Manage membership externally. This make the resource ignore userIds and application_ids. Should be used when using iam_group_membership
*/
readonly externalMembership: pulumi.Output<boolean | undefined>;
/**
* The name of the IAM group.
*/
readonly name: pulumi.Output<string>;
/**
* `organizationId`) The ID of the organization the group is associated with.
*/
readonly organizationId: pulumi.Output<string>;
/**
* The tags associated with the group.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The date and time of the last update of the group
*/
readonly updatedAt: pulumi.Output<string>;
/**
* The list of IDs of the users attached to the group.
*/
readonly userIds: pulumi.Output<string[] | undefined>;
/**
* Create a Group 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?: GroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Group resources.
*/
export interface GroupState {
/**
* The list of IDs of the applications attached to the group.
*/
applicationIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The date and time of the creation of the group
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* The description of the IAM group.
*/
description?: pulumi.Input<string | undefined>;
/**
* Manage membership externally. This make the resource ignore userIds and application_ids. Should be used when using iam_group_membership
*/
externalMembership?: pulumi.Input<boolean | undefined>;
/**
* The name of the IAM group.
*/
name?: pulumi.Input<string | undefined>;
/**
* `organizationId`) The ID of the organization the group is associated with.
*/
organizationId?: pulumi.Input<string | undefined>;
/**
* The tags associated with the group.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The date and time of the last update of the group
*/
updatedAt?: pulumi.Input<string | undefined>;
/**
* The list of IDs of the users attached to the group.
*/
userIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
}
/**
* The set of arguments for constructing a Group resource.
*/
export interface GroupArgs {
/**
* The list of IDs of the applications attached to the group.
*/
applicationIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The description of the IAM group.
*/
description?: pulumi.Input<string | undefined>;
/**
* Manage membership externally. This make the resource ignore userIds and application_ids. Should be used when using iam_group_membership
*/
externalMembership?: pulumi.Input<boolean | undefined>;
/**
* The name of the IAM group.
*/
name?: pulumi.Input<string | undefined>;
/**
* `organizationId`) The ID of the organization the group is associated with.
*/
organizationId?: pulumi.Input<string | undefined>;
/**
* The tags associated with the group.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The list of IDs of the users attached to the group.
*/
userIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
}
//# sourceMappingURL=group.d.ts.map