sonarqube.User
Explore with Pulumi AI
Provides a Sonarqube User resource. This can be used to manage Sonarqube Users.
Example Usage
Example: create a local user
import * as pulumi from "@pulumi/pulumi";
import * as sonarqube from "@pulumi/sonarqube";
const user = new sonarqube.User("user", {
loginName: "terraform-test",
password: "secret-sauce37!",
});
import pulumi
import pulumi_sonarqube as sonarqube
user = sonarqube.User("user",
login_name="terraform-test",
password="secret-sauce37!")
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 {
_, err := sonarqube.NewUser(ctx, "user", &sonarqube.UserArgs{
LoginName: pulumi.String("terraform-test"),
Password: pulumi.String("secret-sauce37!"),
})
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!",
});
});
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 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());
}
}
resources:
user:
type: sonarqube:User
properties:
loginName: terraform-test
password: secret-sauce37!
Example: create a remote user
import * as pulumi from "@pulumi/pulumi";
import * as sonarqube from "@pulumi/sonarqube";
const remoteUser = new sonarqube.User("remoteUser", {
email: "terraform-test@sonarqube.com",
isLocal: false,
loginName: "terraform-test",
});
import pulumi
import pulumi_sonarqube as sonarqube
remote_user = sonarqube.User("remoteUser",
email="terraform-test@sonarqube.com",
is_local=False,
login_name="terraform-test")
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 {
_, err := sonarqube.NewUser(ctx, "remoteUser", &sonarqube.UserArgs{
Email: pulumi.String("terraform-test@sonarqube.com"),
IsLocal: pulumi.Bool(false),
LoginName: pulumi.String("terraform-test"),
})
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 remoteUser = new Sonarqube.User("remoteUser", new()
{
Email = "terraform-test@sonarqube.com",
IsLocal = false,
LoginName = "terraform-test",
});
});
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 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 remoteUser = new User("remoteUser", UserArgs.builder()
.email("terraform-test@sonarqube.com")
.isLocal(false)
.loginName("terraform-test")
.build());
}
}
resources:
remoteUser:
type: sonarqube:User
properties:
email: terraform-test@sonarqube.com
isLocal: false
loginName: terraform-test
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
args: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
login_name: Optional[str] = None,
email: Optional[str] = None,
is_local: Optional[bool] = None,
name: Optional[str] = None,
password: Optional[str] = None,
user_id: Optional[str] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
type: sonarqube:User
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 UserArgs
- 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 UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- 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 userResource = new Sonarqube.User("userResource", new()
{
LoginName = "string",
Email = "string",
IsLocal = false,
Name = "string",
Password = "string",
UserId = "string",
});
example, err := sonarqube.NewUser(ctx, "userResource", &sonarqube.UserArgs{
LoginName: pulumi.String("string"),
Email: pulumi.String("string"),
IsLocal: pulumi.Bool(false),
Name: pulumi.String("string"),
Password: pulumi.String("string"),
UserId: pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
.loginName("string")
.email("string")
.isLocal(false)
.name("string")
.password("string")
.userId("string")
.build());
user_resource = sonarqube.User("userResource",
login_name="string",
email="string",
is_local=False,
name="string",
password="string",
user_id="string")
const userResource = new sonarqube.User("userResource", {
loginName: "string",
email: "string",
isLocal: false,
name: "string",
password: "string",
userId: "string",
});
type: sonarqube:User
properties:
email: string
isLocal: false
loginName: string
name: string
password: string
userId: string
User 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 User resource accepts the following input properties:
- Login
Name string - The login name of the User to create. Changing this forces a new resource to be created.
- Email string
- The email of the User to create.
- Is
Local bool True
if the User should be of typelocal
. Defaults totrue
.- Name string
- The name of the User to create. Changing this forces a new resource to be created.
- Password string
- The password of User to create. This is only used if the user is of type
local
. - User
Id string - The ID of this resource.
- Login
Name string - The login name of the User to create. Changing this forces a new resource to be created.
- Email string
- The email of the User to create.
- Is
Local bool True
if the User should be of typelocal
. Defaults totrue
.- Name string
- The name of the User to create. Changing this forces a new resource to be created.
- Password string
- The password of User to create. This is only used if the user is of type
local
. - User
Id string - The ID of this resource.
- login
Name String - The login name of the User to create. Changing this forces a new resource to be created.
- email String
- The email of the User to create.
- is
Local Boolean True
if the User should be of typelocal
. Defaults totrue
.- name String
- The name of the User to create. Changing this forces a new resource to be created.
- password String
- The password of User to create. This is only used if the user is of type
local
. - user
Id String - The ID of this resource.
- login
Name string - The login name of the User to create. Changing this forces a new resource to be created.
- email string
- The email of the User to create.
- is
Local boolean True
if the User should be of typelocal
. Defaults totrue
.- name string
- The name of the User to create. Changing this forces a new resource to be created.
- password string
- The password of User to create. This is only used if the user is of type
local
. - user
Id string - The ID of this resource.
- login_
name str - The login name of the User to create. Changing this forces a new resource to be created.
- email str
- The email of the User to create.
- is_
local bool True
if the User should be of typelocal
. Defaults totrue
.- name str
- The name of the User to create. Changing this forces a new resource to be created.
- password str
- The password of User to create. This is only used if the user is of type
local
. - user_
id str - The ID of this resource.
- login
Name String - The login name of the User to create. Changing this forces a new resource to be created.
- email String
- The email of the User to create.
- is
Local Boolean True
if the User should be of typelocal
. Defaults totrue
.- name String
- The name of the User to create. Changing this forces a new resource to be created.
- password String
- The password of User to create. This is only used if the user is of type
local
. - user
Id String - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the User 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 User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
email: Optional[str] = None,
is_local: Optional[bool] = None,
login_name: Optional[str] = None,
name: Optional[str] = None,
password: Optional[str] = None,
user_id: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
resources: _: type: sonarqube:User 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.
- Email string
- The email of the User to create.
- Is
Local bool True
if the User should be of typelocal
. Defaults totrue
.- Login
Name string - The login name of the User to create. Changing this forces a new resource to be created.
- Name string
- The name of the User to create. Changing this forces a new resource to be created.
- Password string
- The password of User to create. This is only used if the user is of type
local
. - User
Id string - The ID of this resource.
- Email string
- The email of the User to create.
- Is
Local bool True
if the User should be of typelocal
. Defaults totrue
.- Login
Name string - The login name of the User to create. Changing this forces a new resource to be created.
- Name string
- The name of the User to create. Changing this forces a new resource to be created.
- Password string
- The password of User to create. This is only used if the user is of type
local
. - User
Id string - The ID of this resource.
- email String
- The email of the User to create.
- is
Local Boolean True
if the User should be of typelocal
. Defaults totrue
.- login
Name String - The login name of the User to create. Changing this forces a new resource to be created.
- name String
- The name of the User to create. Changing this forces a new resource to be created.
- password String
- The password of User to create. This is only used if the user is of type
local
. - user
Id String - The ID of this resource.
- email string
- The email of the User to create.
- is
Local boolean True
if the User should be of typelocal
. Defaults totrue
.- login
Name string - The login name of the User to create. Changing this forces a new resource to be created.
- name string
- The name of the User to create. Changing this forces a new resource to be created.
- password string
- The password of User to create. This is only used if the user is of type
local
. - user
Id string - The ID of this resource.
- email str
- The email of the User to create.
- is_
local bool True
if the User should be of typelocal
. Defaults totrue
.- login_
name str - The login name of the User to create. Changing this forces a new resource to be created.
- name str
- The name of the User to create. Changing this forces a new resource to be created.
- password str
- The password of User to create. This is only used if the user is of type
local
. - user_
id str - The ID of this resource.
- email String
- The email of the User to create.
- is
Local Boolean True
if the User should be of typelocal
. Defaults totrue
.- login
Name String - The login name of the User to create. Changing this forces a new resource to be created.
- name String
- The name of the User to create. Changing this forces a new resource to be created.
- password String
- The password of User to create. This is only used if the user is of type
local
. - user
Id String - The ID of this resource.
Package Details
- Repository
- sonarqube jdamata/terraform-provider-sonarqube
- License
- Notes
- This Pulumi package is based on the
sonarqube
Terraform Provider.