sonarqube.GroupMember
Explore with Pulumi AI
Provides a Sonarqube Group Member resource. This can be used to add or remove user to or from Sonarqube Groups.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sonarqube from "@pulumi/sonarqube";
const user = new sonarqube.User("user", {
loginName: "terraform-test",
password: "secret-sauce37!",
});
const projectUsers = new sonarqube.Group("projectUsers", {description: "This is a group"});
const projectUsersMember = new sonarqube.GroupMember("projectUsersMember", {loginName: user.loginName});
import pulumi
import pulumi_sonarqube as sonarqube
user = sonarqube.User("user",
login_name="terraform-test",
password="secret-sauce37!")
project_users = sonarqube.Group("projectUsers", description="This is a group")
project_users_member = sonarqube.GroupMember("projectUsersMember", login_name=user.login_name)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sonarqube/sonarqube"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
user, err := sonarqube.NewUser(ctx, "user", &sonarqube.UserArgs{
LoginName: pulumi.String("terraform-test"),
Password: pulumi.String("secret-sauce37!"),
})
if err != nil {
return err
}
_, err = sonarqube.NewGroup(ctx, "projectUsers", &sonarqube.GroupArgs{
Description: pulumi.String("This is a group"),
})
if err != nil {
return err
}
_, err = sonarqube.NewGroupMember(ctx, "projectUsersMember", &sonarqube.GroupMemberArgs{
LoginName: user.LoginName,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sonarqube = Pulumi.Sonarqube;
return await Deployment.RunAsync(() =>
{
var user = new Sonarqube.User("user", new()
{
LoginName = "terraform-test",
Password = "secret-sauce37!",
});
var projectUsers = new Sonarqube.Group("projectUsers", new()
{
Description = "This is a group",
});
var projectUsersMember = new Sonarqube.GroupMember("projectUsersMember", new()
{
LoginName = user.LoginName,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sonarqube.User;
import com.pulumi.sonarqube.UserArgs;
import com.pulumi.sonarqube.Group;
import com.pulumi.sonarqube.GroupArgs;
import com.pulumi.sonarqube.GroupMember;
import com.pulumi.sonarqube.GroupMemberArgs;
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 user = new User("user", UserArgs.builder()
.loginName("terraform-test")
.password("secret-sauce37!")
.build());
var projectUsers = new Group("projectUsers", GroupArgs.builder()
.description("This is a group")
.build());
var projectUsersMember = new GroupMember("projectUsersMember", GroupMemberArgs.builder()
.loginName(user.loginName())
.build());
}
}
resources:
user:
type: sonarqube:User
properties:
loginName: terraform-test
password: secret-sauce37!
projectUsers:
type: sonarqube:Group
properties:
description: This is a group
projectUsersMember:
type: sonarqube:GroupMember
properties:
loginName: ${user.loginName}
Create GroupMember Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GroupMember(name: string, args: GroupMemberArgs, opts?: CustomResourceOptions);
@overload
def GroupMember(resource_name: str,
args: GroupMemberArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GroupMember(resource_name: str,
opts: Optional[ResourceOptions] = None,
login_name: Optional[str] = None,
group_member_id: Optional[str] = None,
name: Optional[str] = None)
func NewGroupMember(ctx *Context, name string, args GroupMemberArgs, opts ...ResourceOption) (*GroupMember, error)
public GroupMember(string name, GroupMemberArgs args, CustomResourceOptions? opts = null)
public GroupMember(String name, GroupMemberArgs args)
public GroupMember(String name, GroupMemberArgs args, CustomResourceOptions options)
type: sonarqube:GroupMember
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 GroupMemberArgs
- 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 GroupMemberArgs
- 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 GroupMemberArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupMemberArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupMemberArgs
- 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 groupMemberResource = new Sonarqube.GroupMember("groupMemberResource", new()
{
LoginName = "string",
GroupMemberId = "string",
Name = "string",
});
example, err := sonarqube.NewGroupMember(ctx, "groupMemberResource", &sonarqube.GroupMemberArgs{
LoginName: pulumi.String("string"),
GroupMemberId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var groupMemberResource = new GroupMember("groupMemberResource", GroupMemberArgs.builder()
.loginName("string")
.groupMemberId("string")
.name("string")
.build());
group_member_resource = sonarqube.GroupMember("groupMemberResource",
login_name="string",
group_member_id="string",
name="string")
const groupMemberResource = new sonarqube.GroupMember("groupMemberResource", {
loginName: "string",
groupMemberId: "string",
name: "string",
});
type: sonarqube:GroupMember
properties:
groupMemberId: string
loginName: string
name: string
GroupMember Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GroupMember resource accepts the following input properties:
- Login
Name string - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - Group
Member stringId - The ID of this resource.
- Name string
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- Login
Name string - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - Group
Member stringId - The ID of this resource.
- Name string
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- login
Name String - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - group
Member StringId - The ID of this resource.
- name String
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- login
Name string - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - group
Member stringId - The ID of this resource.
- name string
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- login_
name str - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - group_
member_ strid - The ID of this resource.
- name str
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- login
Name String - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - group
Member StringId - The ID of this resource.
- name String
- The name of the Group to add a member to. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the GroupMember 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 GroupMember Resource
Get an existing GroupMember 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?: GroupMemberState, opts?: CustomResourceOptions): GroupMember
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
group_member_id: Optional[str] = None,
login_name: Optional[str] = None,
name: Optional[str] = None) -> GroupMember
func GetGroupMember(ctx *Context, name string, id IDInput, state *GroupMemberState, opts ...ResourceOption) (*GroupMember, error)
public static GroupMember Get(string name, Input<string> id, GroupMemberState? state, CustomResourceOptions? opts = null)
public static GroupMember get(String name, Output<String> id, GroupMemberState state, CustomResourceOptions options)
resources: _: type: sonarqube:GroupMember get: id: ${id}
- 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.
- Group
Member stringId - The ID of this resource.
- Login
Name string - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - Name string
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- Group
Member stringId - The ID of this resource.
- Login
Name string - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - Name string
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- group
Member StringId - The ID of this resource.
- login
Name String - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - name String
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- group
Member stringId - The ID of this resource.
- login
Name string - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - name string
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- group_
member_ strid - The ID of this resource.
- login_
name str - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - name str
- The name of the Group to add a member to. Changing this forces a new resource to be created.
- group
Member StringId - The ID of this resource.
- login
Name String - The
login_name
of the User to add as a member. Changing this forces a new resource to be created. - name String
- The name of the Group to add a member to. Changing this forces a new resource to be created.
Package Details
- Repository
- sonarqube jdamata/terraform-provider-sonarqube
- License
- Notes
- This Pulumi package is based on the
sonarqube
Terraform Provider.