1. Packages
  2. Scaleway
  3. API Docs
  4. IamGroup
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.IamGroup

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

    Creates and manages Scaleway IAM Groups. For more information, see the documentation.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const basic = new scaleway.IamGroup("basic", {
        applicationIds: [],
        description: "basic description",
        userIds: [],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    basic = scaleway.IamGroup("basic",
        application_ids=[],
        description="basic description",
        user_ids=[])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewIamGroup(ctx, "basic", &scaleway.IamGroupArgs{
    			ApplicationIds: pulumi.StringArray{},
    			Description:    pulumi.String("basic description"),
    			UserIds:        pulumi.StringArray{},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var basic = new Scaleway.IamGroup("basic", new()
        {
            ApplicationIds = new[] {},
            Description = "basic description",
            UserIds = new[] {},
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.IamGroup;
    import com.pulumi.scaleway.IamGroupArgs;
    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 basic = new IamGroup("basic", IamGroupArgs.builder()        
                .applicationIds()
                .description("basic description")
                .userIds()
                .build());
    
        }
    }
    
    resources:
      basic:
        type: scaleway:IamGroup
        properties:
          applicationIds: []
          description: basic description
          userIds: []
    

    With applications

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const app = new scaleway.IamApplication("app", {});
    const withApp = new scaleway.IamGroup("withApp", {
        applicationIds: [app.id],
        userIds: [],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    app = scaleway.IamApplication("app")
    with_app = scaleway.IamGroup("withApp",
        application_ids=[app.id],
        user_ids=[])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		app, err := scaleway.NewIamApplication(ctx, "app", nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewIamGroup(ctx, "withApp", &scaleway.IamGroupArgs{
    			ApplicationIds: pulumi.StringArray{
    				app.ID(),
    			},
    			UserIds: pulumi.StringArray{},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var app = new Scaleway.IamApplication("app");
    
        var withApp = new Scaleway.IamGroup("withApp", new()
        {
            ApplicationIds = new[]
            {
                app.Id,
            },
            UserIds = new[] {},
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.IamApplication;
    import com.pulumi.scaleway.IamGroup;
    import com.pulumi.scaleway.IamGroupArgs;
    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 app = new IamApplication("app");
    
            var withApp = new IamGroup("withApp", IamGroupArgs.builder()        
                .applicationIds(app.id())
                .userIds()
                .build());
    
        }
    }
    
    resources:
      app:
        type: scaleway:IamApplication
      withApp:
        type: scaleway:IamGroup
        properties:
          applicationIds:
            - ${app.id}
          userIds: []
    

    Create IamGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IamGroup(name: string, args?: IamGroupArgs, opts?: CustomResourceOptions);
    @overload
    def IamGroup(resource_name: str,
                 args: Optional[IamGroupArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamGroup(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 application_ids: Optional[Sequence[str]] = None,
                 description: Optional[str] = None,
                 external_membership: Optional[bool] = None,
                 name: Optional[str] = None,
                 organization_id: Optional[str] = None,
                 tags: Optional[Sequence[str]] = None,
                 user_ids: Optional[Sequence[str]] = None)
    func NewIamGroup(ctx *Context, name string, args *IamGroupArgs, opts ...ResourceOption) (*IamGroup, error)
    public IamGroup(string name, IamGroupArgs? args = null, CustomResourceOptions? opts = null)
    public IamGroup(String name, IamGroupArgs args)
    public IamGroup(String name, IamGroupArgs args, CustomResourceOptions options)
    
    type: scaleway:IamGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var iamGroupResource = new Scaleway.IamGroup("iamGroupResource", new()
    {
        ApplicationIds = new[]
        {
            "string",
        },
        Description = "string",
        ExternalMembership = false,
        Name = "string",
        OrganizationId = "string",
        Tags = new[]
        {
            "string",
        },
        UserIds = new[]
        {
            "string",
        },
    });
    
    example, err := scaleway.NewIamGroup(ctx, "iamGroupResource", &scaleway.IamGroupArgs{
    	ApplicationIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description:        pulumi.String("string"),
    	ExternalMembership: pulumi.Bool(false),
    	Name:               pulumi.String("string"),
    	OrganizationId:     pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	UserIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var iamGroupResource = new IamGroup("iamGroupResource", IamGroupArgs.builder()
        .applicationIds("string")
        .description("string")
        .externalMembership(false)
        .name("string")
        .organizationId("string")
        .tags("string")
        .userIds("string")
        .build());
    
    iam_group_resource = scaleway.IamGroup("iamGroupResource",
        application_ids=["string"],
        description="string",
        external_membership=False,
        name="string",
        organization_id="string",
        tags=["string"],
        user_ids=["string"])
    
    const iamGroupResource = new scaleway.IamGroup("iamGroupResource", {
        applicationIds: ["string"],
        description: "string",
        externalMembership: false,
        name: "string",
        organizationId: "string",
        tags: ["string"],
        userIds: ["string"],
    });
    
    type: scaleway:IamGroup
    properties:
        applicationIds:
            - string
        description: string
        externalMembership: false
        name: string
        organizationId: string
        tags:
            - string
        userIds:
            - string
    

    IamGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IamGroup resource accepts the following input properties:

    ApplicationIds List<string>
    The list of IDs of the applications attached to the group.
    Description string
    The description of the IAM group.
    ExternalMembership bool
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    Name string
    The name of the IAM group.
    OrganizationId string
    organization_id) The ID of the organization the group is associated with.
    Tags List<string>
    The tags associated with the group.
    UserIds List<string>
    The list of IDs of the users attached to the group.
    ApplicationIds []string
    The list of IDs of the applications attached to the group.
    Description string
    The description of the IAM group.
    ExternalMembership bool
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    Name string
    The name of the IAM group.
    OrganizationId string
    organization_id) The ID of the organization the group is associated with.
    Tags []string
    The tags associated with the group.
    UserIds []string
    The list of IDs of the users attached to the group.
    applicationIds List<String>
    The list of IDs of the applications attached to the group.
    description String
    The description of the IAM group.
    externalMembership Boolean
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name String
    The name of the IAM group.
    organizationId String
    organization_id) The ID of the organization the group is associated with.
    tags List<String>
    The tags associated with the group.
    userIds List<String>
    The list of IDs of the users attached to the group.
    applicationIds string[]
    The list of IDs of the applications attached to the group.
    description string
    The description of the IAM group.
    externalMembership boolean
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name string
    The name of the IAM group.
    organizationId string
    organization_id) The ID of the organization the group is associated with.
    tags string[]
    The tags associated with the group.
    userIds string[]
    The list of IDs of the users attached to the group.
    application_ids Sequence[str]
    The list of IDs of the applications attached to the group.
    description str
    The description of the IAM group.
    external_membership bool
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name str
    The name of the IAM group.
    organization_id str
    organization_id) The ID of the organization the group is associated with.
    tags Sequence[str]
    The tags associated with the group.
    user_ids Sequence[str]
    The list of IDs of the users attached to the group.
    applicationIds List<String>
    The list of IDs of the applications attached to the group.
    description String
    The description of the IAM group.
    externalMembership Boolean
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name String
    The name of the IAM group.
    organizationId String
    organization_id) The ID of the organization the group is associated with.
    tags List<String>
    The tags associated with the group.
    userIds List<String>
    The list of IDs of the users attached to the group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IamGroup resource produces the following output properties:

    CreatedAt string
    The date and time of the creation of the group
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    The date and time of the last update of the group
    CreatedAt string
    The date and time of the creation of the group
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    The date and time of the last update of the group
    createdAt String
    The date and time of the creation of the group
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    The date and time of the last update of the group
    createdAt string
    The date and time of the creation of the group
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    The date and time of the last update of the group
    created_at str
    The date and time of the creation of the group
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    The date and time of the last update of the group
    createdAt String
    The date and time of the creation of the group
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    The date and time of the last update of the group

    Look up Existing IamGroup Resource

    Get an existing IamGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IamGroupState, opts?: CustomResourceOptions): IamGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_ids: Optional[Sequence[str]] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            external_membership: Optional[bool] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            updated_at: Optional[str] = None,
            user_ids: Optional[Sequence[str]] = None) -> IamGroup
    func GetIamGroup(ctx *Context, name string, id IDInput, state *IamGroupState, opts ...ResourceOption) (*IamGroup, error)
    public static IamGroup Get(string name, Input<string> id, IamGroupState? state, CustomResourceOptions? opts = null)
    public static IamGroup get(String name, Output<String> id, IamGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplicationIds List<string>
    The list of IDs of the applications attached to the group.
    CreatedAt string
    The date and time of the creation of the group
    Description string
    The description of the IAM group.
    ExternalMembership bool
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    Name string
    The name of the IAM group.
    OrganizationId string
    organization_id) The ID of the organization the group is associated with.
    Tags List<string>
    The tags associated with the group.
    UpdatedAt string
    The date and time of the last update of the group
    UserIds List<string>
    The list of IDs of the users attached to the group.
    ApplicationIds []string
    The list of IDs of the applications attached to the group.
    CreatedAt string
    The date and time of the creation of the group
    Description string
    The description of the IAM group.
    ExternalMembership bool
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    Name string
    The name of the IAM group.
    OrganizationId string
    organization_id) The ID of the organization the group is associated with.
    Tags []string
    The tags associated with the group.
    UpdatedAt string
    The date and time of the last update of the group
    UserIds []string
    The list of IDs of the users attached to the group.
    applicationIds List<String>
    The list of IDs of the applications attached to the group.
    createdAt String
    The date and time of the creation of the group
    description String
    The description of the IAM group.
    externalMembership Boolean
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name String
    The name of the IAM group.
    organizationId String
    organization_id) The ID of the organization the group is associated with.
    tags List<String>
    The tags associated with the group.
    updatedAt String
    The date and time of the last update of the group
    userIds List<String>
    The list of IDs of the users attached to the group.
    applicationIds string[]
    The list of IDs of the applications attached to the group.
    createdAt string
    The date and time of the creation of the group
    description string
    The description of the IAM group.
    externalMembership boolean
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name string
    The name of the IAM group.
    organizationId string
    organization_id) The ID of the organization the group is associated with.
    tags string[]
    The tags associated with the group.
    updatedAt string
    The date and time of the last update of the group
    userIds string[]
    The list of IDs of the users attached to the group.
    application_ids Sequence[str]
    The list of IDs of the applications attached to the group.
    created_at str
    The date and time of the creation of the group
    description str
    The description of the IAM group.
    external_membership bool
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name str
    The name of the IAM group.
    organization_id str
    organization_id) The ID of the organization the group is associated with.
    tags Sequence[str]
    The tags associated with the group.
    updated_at str
    The date and time of the last update of the group
    user_ids Sequence[str]
    The list of IDs of the users attached to the group.
    applicationIds List<String>
    The list of IDs of the applications attached to the group.
    createdAt String
    The date and time of the creation of the group
    description String
    The description of the IAM group.
    externalMembership Boolean
    Manage membership externally. This make the resource ignore user_ids and application_ids. Should be used when using iam_group_membership
    name String
    The name of the IAM group.
    organizationId String
    organization_id) The ID of the organization the group is associated with.
    tags List<String>
    The tags associated with the group.
    updatedAt String
    The date and time of the last update of the group
    userIds List<String>
    The list of IDs of the users attached to the group.

    Import

    IAM groups can be imported using the {id}, e.g.

    bash

    $ pulumi import scaleway:index/iamGroup:IamGroup basic 11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse