harness.User
Explore with Pulumi AI
Resource for creating a Harness user
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;
return await Deployment.RunAsync(() =>
{
var johnDoe = new Harness.User("johnDoe", new()
{
Email = "john.doe@example.com",
});
});
package main
import (
"github.com/lbrlabs/pulumi-harness/sdk/go/harness"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := harness.NewUser(ctx, "johnDoe", &harness.UserArgs{
Email: pulumi.String("john.doe@example.com"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.User;
import com.pulumi.harness.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 johnDoe = new User("johnDoe", UserArgs.builder()
.email("john.doe@example.com")
.build());
}
}
import pulumi
import lbrlabs_pulumi_harness as harness
john_doe = harness.User("johnDoe", email="john.doe@example.com")
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@lbrlabs/pulumi-harness";
const johnDoe = new harness.User("johnDoe", {email: "john.doe@example.com"});
resources:
johnDoe:
type: harness:User
properties:
email: john.doe@example.com
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,
email: Optional[str] = None,
group_ids: Optional[Sequence[str]] = None,
name: 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: harness: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 Harness.User("userResource", new()
{
Email = "string",
GroupIds = new[]
{
"string",
},
Name = "string",
});
example, err := harness.NewUser(ctx, "userResource", &harness.UserArgs{
Email: pulumi.String("string"),
GroupIds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
.email("string")
.groupIds("string")
.name("string")
.build());
user_resource = harness.User("userResource",
email="string",
group_ids=["string"],
name="string")
const userResource = new harness.User("userResource", {
email: "string",
groupIds: ["string"],
name: "string",
});
type: harness:User
properties:
email: string
groupIds:
- string
name: 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
The User resource accepts the following input properties:
- Email string
- The email of the user.
- Group
Ids List<string> - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - Name string
- The name of the user.
- Email string
- The email of the user.
- Group
Ids []string - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - Name string
- The name of the user.
- email String
- The email of the user.
- group
Ids List<String> - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - name String
- The name of the user.
- email string
- The email of the user.
- group
Ids string[] - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - name string
- The name of the user.
- email str
- The email of the user.
- group_
ids Sequence[str] - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - name str
- The name of the user.
- email String
- The email of the user.
- group
Ids List<String> - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - name String
- The name of the user.
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.
- Is
Email boolVerified - Flag indicating whether or not the users email has been verified.
- Is
Imported boolFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- Is
Password boolExpired - Flag indicating whether or not the users password has expired.
- Is
Two boolFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- Is
User boolLocked - Flag indicating whether or not the user is locked out.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Email boolVerified - Flag indicating whether or not the users email has been verified.
- Is
Imported boolFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- Is
Password boolExpired - Flag indicating whether or not the users password has expired.
- Is
Two boolFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- Is
User boolLocked - Flag indicating whether or not the user is locked out.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Email BooleanVerified - Flag indicating whether or not the users email has been verified.
- is
Imported BooleanFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- is
Password BooleanExpired - Flag indicating whether or not the users password has expired.
- is
Two BooleanFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is
User BooleanLocked - Flag indicating whether or not the user is locked out.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Email booleanVerified - Flag indicating whether or not the users email has been verified.
- is
Imported booleanFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- is
Password booleanExpired - Flag indicating whether or not the users password has expired.
- is
Two booleanFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is
User booleanLocked - Flag indicating whether or not the user is locked out.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
email_ boolverified - Flag indicating whether or not the users email has been verified.
- is_
imported_ boolfrom_ identity_ provider - Flag indicating whether or not the user was imported from an identity provider.
- is_
password_ boolexpired - Flag indicating whether or not the users password has expired.
- is_
two_ boolfactor_ auth_ enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is_
user_ boollocked - Flag indicating whether or not the user is locked out.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Email BooleanVerified - Flag indicating whether or not the users email has been verified.
- is
Imported BooleanFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- is
Password BooleanExpired - Flag indicating whether or not the users password has expired.
- is
Two BooleanFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is
User BooleanLocked - Flag indicating whether or not the user is locked out.
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,
group_ids: Optional[Sequence[str]] = None,
is_email_verified: Optional[bool] = None,
is_imported_from_identity_provider: Optional[bool] = None,
is_password_expired: Optional[bool] = None,
is_two_factor_auth_enabled: Optional[bool] = None,
is_user_locked: Optional[bool] = None,
name: 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)
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.
- Email string
- The email of the user.
- Group
Ids List<string> - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - Is
Email boolVerified - Flag indicating whether or not the users email has been verified.
- Is
Imported boolFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- Is
Password boolExpired - Flag indicating whether or not the users password has expired.
- Is
Two boolFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- Is
User boolLocked - Flag indicating whether or not the user is locked out.
- Name string
- The name of the user.
- Email string
- The email of the user.
- Group
Ids []string - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - Is
Email boolVerified - Flag indicating whether or not the users email has been verified.
- Is
Imported boolFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- Is
Password boolExpired - Flag indicating whether or not the users password has expired.
- Is
Two boolFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- Is
User boolLocked - Flag indicating whether or not the user is locked out.
- Name string
- The name of the user.
- email String
- The email of the user.
- group
Ids List<String> - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - is
Email BooleanVerified - Flag indicating whether or not the users email has been verified.
- is
Imported BooleanFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- is
Password BooleanExpired - Flag indicating whether or not the users password has expired.
- is
Two BooleanFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is
User BooleanLocked - Flag indicating whether or not the user is locked out.
- name String
- The name of the user.
- email string
- The email of the user.
- group
Ids string[] - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - is
Email booleanVerified - Flag indicating whether or not the users email has been verified.
- is
Imported booleanFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- is
Password booleanExpired - Flag indicating whether or not the users password has expired.
- is
Two booleanFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is
User booleanLocked - Flag indicating whether or not the user is locked out.
- name string
- The name of the user.
- email str
- The email of the user.
- group_
ids Sequence[str] - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - is_
email_ boolverified - Flag indicating whether or not the users email has been verified.
- is_
imported_ boolfrom_ identity_ provider - Flag indicating whether or not the user was imported from an identity provider.
- is_
password_ boolexpired - Flag indicating whether or not the users password has expired.
- is_
two_ boolfactor_ auth_ enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is_
user_ boollocked - Flag indicating whether or not the user is locked out.
- name str
- The name of the user.
- email String
- The email of the user.
- group
Ids List<String> - The groups the user belongs to. This is only used during the creation of the user. The groups are not updated after the user is created. When using this option you should also set
lifecycle = { ignore_changes = ["group_ids"] }
. - is
Email BooleanVerified - Flag indicating whether or not the users email has been verified.
- is
Imported BooleanFrom Identity Provider - Flag indicating whether or not the user was imported from an identity provider.
- is
Password BooleanExpired - Flag indicating whether or not the users password has expired.
- is
Two BooleanFactor Auth Enabled - Flag indicating whether or not two-factor authentication is enabled for the user.
- is
User BooleanLocked - Flag indicating whether or not the user is locked out.
- name String
- The name of the user.
Import
Import using the email address of the user
$ pulumi import harness:index/user:User john_doe john.doe@example.com
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness lbrlabs/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.