scaleway.IamGroupMembership
Explore with Pulumi AI
Add members to an IAM group. For more information refer to the IAM API documentation.
Example Usage
Application Membership
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const group = new scaleway.IamGroup("group", {externalMembership: true});
const app = new scaleway.IamApplication("app", {});
const member = new scaleway.IamGroupMembership("member", {
groupId: group.id,
applicationId: app.id,
});
import pulumi
import pulumiverse_scaleway as scaleway
group = scaleway.IamGroup("group", external_membership=True)
app = scaleway.IamApplication("app")
member = scaleway.IamGroupMembership("member",
group_id=group.id,
application_id=app.id)
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 {
group, err := scaleway.NewIamGroup(ctx, "group", &scaleway.IamGroupArgs{
ExternalMembership: pulumi.Bool(true),
})
if err != nil {
return err
}
app, err := scaleway.NewIamApplication(ctx, "app", nil)
if err != nil {
return err
}
_, err = scaleway.NewIamGroupMembership(ctx, "member", &scaleway.IamGroupMembershipArgs{
GroupId: group.ID(),
ApplicationId: app.ID(),
})
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 @group = new Scaleway.IamGroup("group", new()
{
ExternalMembership = true,
});
var app = new Scaleway.IamApplication("app");
var member = new Scaleway.IamGroupMembership("member", new()
{
GroupId = @group.Id,
ApplicationId = app.Id,
});
});
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 com.pulumi.scaleway.IamApplication;
import com.pulumi.scaleway.IamGroupMembership;
import com.pulumi.scaleway.IamGroupMembershipArgs;
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 IamGroup("group", IamGroupArgs.builder()
.externalMembership(true)
.build());
var app = new IamApplication("app");
var member = new IamGroupMembership("member", IamGroupMembershipArgs.builder()
.groupId(group.id())
.applicationId(app.id())
.build());
}
}
resources:
group:
type: scaleway:IamGroup
properties:
externalMembership: true
app:
type: scaleway:IamApplication
member:
type: scaleway:IamGroupMembership
properties:
groupId: ${group.id}
applicationId: ${app.id}
Create IamGroupMembership Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamGroupMembership(name: string, args: IamGroupMembershipArgs, opts?: CustomResourceOptions);
@overload
def IamGroupMembership(resource_name: str,
args: IamGroupMembershipArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamGroupMembership(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
application_id: Optional[str] = None,
user_id: Optional[str] = None)
func NewIamGroupMembership(ctx *Context, name string, args IamGroupMembershipArgs, opts ...ResourceOption) (*IamGroupMembership, error)
public IamGroupMembership(string name, IamGroupMembershipArgs args, CustomResourceOptions? opts = null)
public IamGroupMembership(String name, IamGroupMembershipArgs args)
public IamGroupMembership(String name, IamGroupMembershipArgs args, CustomResourceOptions options)
type: scaleway:IamGroupMembership
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 IamGroupMembershipArgs
- 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 IamGroupMembershipArgs
- 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 IamGroupMembershipArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamGroupMembershipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamGroupMembershipArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var iamGroupMembershipResource = new Scaleway.IamGroupMembership("iamGroupMembershipResource", new()
{
GroupId = "string",
ApplicationId = "string",
UserId = "string",
});
example, err := scaleway.NewIamGroupMembership(ctx, "iamGroupMembershipResource", &scaleway.IamGroupMembershipArgs{
GroupId: pulumi.String("string"),
ApplicationId: pulumi.String("string"),
UserId: pulumi.String("string"),
})
var iamGroupMembershipResource = new IamGroupMembership("iamGroupMembershipResource", IamGroupMembershipArgs.builder()
.groupId("string")
.applicationId("string")
.userId("string")
.build());
iam_group_membership_resource = scaleway.IamGroupMembership("iamGroupMembershipResource",
group_id="string",
application_id="string",
user_id="string")
const iamGroupMembershipResource = new scaleway.IamGroupMembership("iamGroupMembershipResource", {
groupId: "string",
applicationId: "string",
userId: "string",
});
type: scaleway:IamGroupMembership
properties:
applicationId: string
groupId: string
userId: string
IamGroupMembership 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 IamGroupMembership resource accepts the following input properties:
- Group
Id string - ID of the group to add members to.
- Application
Id string - The ID of the application that will be added to the group.
- User
Id string The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- Group
Id string - ID of the group to add members to.
- Application
Id string - The ID of the application that will be added to the group.
- User
Id string The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- group
Id String - ID of the group to add members to.
- application
Id String - The ID of the application that will be added to the group.
- user
Id String The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- group
Id string - ID of the group to add members to.
- application
Id string - The ID of the application that will be added to the group.
- user
Id string The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- group_
id str - ID of the group to add members to.
- application_
id str - The ID of the application that will be added to the group.
- user_
id str The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- group
Id String - ID of the group to add members to.
- application
Id String - The ID of the application that will be added to the group.
- user
Id String The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamGroupMembership resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing IamGroupMembership Resource
Get an existing IamGroupMembership 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?: IamGroupMembershipState, opts?: CustomResourceOptions): IamGroupMembership
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
group_id: Optional[str] = None,
user_id: Optional[str] = None) -> IamGroupMembership
func GetIamGroupMembership(ctx *Context, name string, id IDInput, state *IamGroupMembershipState, opts ...ResourceOption) (*IamGroupMembership, error)
public static IamGroupMembership Get(string name, Input<string> id, IamGroupMembershipState? state, CustomResourceOptions? opts = null)
public static IamGroupMembership get(String name, Output<String> id, IamGroupMembershipState 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.
- Application
Id string - The ID of the application that will be added to the group.
- Group
Id string - ID of the group to add members to.
- User
Id string The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- Application
Id string - The ID of the application that will be added to the group.
- Group
Id string - ID of the group to add members to.
- User
Id string The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- application
Id String - The ID of the application that will be added to the group.
- group
Id String - ID of the group to add members to.
- user
Id String The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- application
Id string - The ID of the application that will be added to the group.
- group
Id string - ID of the group to add members to.
- user
Id string The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- application_
id str - The ID of the application that will be added to the group.
- group_
id str - ID of the group to add members to.
- user_
id str The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
- application
Id String - The ID of the application that will be added to the group.
- group
Id String - ID of the group to add members to.
- user
Id String The ID of the user that will be added to the group
Note You must specify at least one:
application_id
and/oruser_id
.
Import
IAM group memberships can be imported using two format:
For user:
{group_id}/user/{user_id}
For application:
{group_id}/app/{application_id}
bash
$ pulumi import scaleway:index/iamGroupMembership:IamGroupMembership app 11111111-1111-1111-1111-111111111111/app/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.