1. Packages
  2. CTFd Provider
  3. API Docs
  4. User
CTFd v1.0.0 published on Monday, Jun 3, 2024 by CTFer.io

ctfd.User

Explore with Pulumi AI

ctfd logo
CTFd v1.0.0 published on Monday, Jun 3, 2024 by CTFer.io

    CTFd defines a User as someone who will either play or administrate the Capture The Flag event.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ctfd from "@ctfer-io/pulumi-ctfd";
    
    const ctfer = new ctfd.User("ctfer", {
        email: "ctfer-io@protonmail.com",
        hidden: true,
        password: "password",
        type: "admin",
        verified: true,
    });
    
    import pulumi
    import ctfer-io_pulumi-ctfd as ctfd
    
    ctfer = ctfd.User("ctfer",
        email="ctfer-io@protonmail.com",
        hidden=True,
        password="password",
        type="admin",
        verified=True)
    
    package main
    
    import (
    	"github.com/ctfer-io/pulumi-ctfd/sdk/go/ctfd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ctfd.NewUser(ctx, "ctfer", &ctfd.UserArgs{
    			Email:    pulumi.String("ctfer-io@protonmail.com"),
    			Hidden:   pulumi.Bool(true),
    			Password: pulumi.String("password"),
    			Type:     pulumi.String("admin"),
    			Verified: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ctfd = CTFerio.Ctfd;
    
    return await Deployment.RunAsync(() => 
    {
        var ctfer = new Ctfd.User("ctfer", new()
        {
            Email = "ctfer-io@protonmail.com",
            Hidden = true,
            Password = "password",
            Type = "admin",
            Verified = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ctfd.User;
    import com.pulumi.ctfd.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 ctfer = new User("ctfer", UserArgs.builder()
                .email("ctfer-io@protonmail.com")
                .hidden(true)
                .password("password")
                .type("admin")
                .verified(true)
                .build());
    
        }
    }
    
    resources:
      ctfer:
        type: ctfd:User
        properties:
          email: ctfer-io@protonmail.com
          hidden: true
          password: password
          # Make the user administrator of the CTFd instance
          type: admin
          verified: true
    

    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,
             password: Optional[str] = None,
             affiliation: Optional[str] = None,
             banned: Optional[bool] = None,
             country: Optional[str] = None,
             hidden: Optional[bool] = None,
             language: Optional[str] = None,
             name: Optional[str] = None,
             type: Optional[str] = None,
             verified: Optional[bool] = None,
             website: Optional[str] = None)
    func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
    public User(string name, UserArgs args, CustomResourceOptions? opts = null)
    public User(String name, UserArgs args)
    public User(String name, UserArgs args, CustomResourceOptions options)
    
    type: ctfd: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.

    Example

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

    var userResource = new Ctfd.User("userResource", new()
    {
        Email = "string",
        Password = "string",
        Affiliation = "string",
        Banned = false,
        Country = "string",
        Hidden = false,
        Language = "string",
        Name = "string",
        Type = "string",
        Verified = false,
        Website = "string",
    });
    
    example, err := ctfd.NewUser(ctx, "userResource", &ctfd.UserArgs{
    	Email:       pulumi.String("string"),
    	Password:    pulumi.String("string"),
    	Affiliation: pulumi.String("string"),
    	Banned:      pulumi.Bool(false),
    	Country:     pulumi.String("string"),
    	Hidden:      pulumi.Bool(false),
    	Language:    pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	Verified:    pulumi.Bool(false),
    	Website:     pulumi.String("string"),
    })
    
    var userResource = new User("userResource", UserArgs.builder()
        .email("string")
        .password("string")
        .affiliation("string")
        .banned(false)
        .country("string")
        .hidden(false)
        .language("string")
        .name("string")
        .type("string")
        .verified(false)
        .website("string")
        .build());
    
    user_resource = ctfd.User("userResource",
        email="string",
        password="string",
        affiliation="string",
        banned=False,
        country="string",
        hidden=False,
        language="string",
        name="string",
        type="string",
        verified=False,
        website="string")
    
    const userResource = new ctfd.User("userResource", {
        email: "string",
        password: "string",
        affiliation: "string",
        banned: false,
        country: "string",
        hidden: false,
        language: "string",
        name: "string",
        type: "string",
        verified: false,
        website: "string",
    });
    
    type: ctfd:User
    properties:
        affiliation: string
        banned: false
        country: string
        email: string
        hidden: false
        language: string
        name: string
        password: string
        type: string
        verified: false
        website: 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
    Email of the user, may be used to verify the account.
    Password string
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    Affiliation string
    Affiliation to a team, company or agency.
    Banned bool
    Is true if the user is banned from the CTF.
    Country string
    Country the user represent or is native from.
    Hidden bool
    Is true if the user is hidden to the participants.
    Language string
    Language the user is fluent in.
    Name string
    Name or pseudo of the user.
    Type string
    Generic type for RBAC purposes.
    Verified bool
    Is true if the user has verified its account by email, or if set by an admin.
    Website string
    Website, blog, or anything similar (displayed to other participants).
    Email string
    Email of the user, may be used to verify the account.
    Password string
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    Affiliation string
    Affiliation to a team, company or agency.
    Banned bool
    Is true if the user is banned from the CTF.
    Country string
    Country the user represent or is native from.
    Hidden bool
    Is true if the user is hidden to the participants.
    Language string
    Language the user is fluent in.
    Name string
    Name or pseudo of the user.
    Type string
    Generic type for RBAC purposes.
    Verified bool
    Is true if the user has verified its account by email, or if set by an admin.
    Website string
    Website, blog, or anything similar (displayed to other participants).
    email String
    Email of the user, may be used to verify the account.
    password String
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    affiliation String
    Affiliation to a team, company or agency.
    banned Boolean
    Is true if the user is banned from the CTF.
    country String
    Country the user represent or is native from.
    hidden Boolean
    Is true if the user is hidden to the participants.
    language String
    Language the user is fluent in.
    name String
    Name or pseudo of the user.
    type String
    Generic type for RBAC purposes.
    verified Boolean
    Is true if the user has verified its account by email, or if set by an admin.
    website String
    Website, blog, or anything similar (displayed to other participants).
    email string
    Email of the user, may be used to verify the account.
    password string
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    affiliation string
    Affiliation to a team, company or agency.
    banned boolean
    Is true if the user is banned from the CTF.
    country string
    Country the user represent or is native from.
    hidden boolean
    Is true if the user is hidden to the participants.
    language string
    Language the user is fluent in.
    name string
    Name or pseudo of the user.
    type string
    Generic type for RBAC purposes.
    verified boolean
    Is true if the user has verified its account by email, or if set by an admin.
    website string
    Website, blog, or anything similar (displayed to other participants).
    email str
    Email of the user, may be used to verify the account.
    password str
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    affiliation str
    Affiliation to a team, company or agency.
    banned bool
    Is true if the user is banned from the CTF.
    country str
    Country the user represent or is native from.
    hidden bool
    Is true if the user is hidden to the participants.
    language str
    Language the user is fluent in.
    name str
    Name or pseudo of the user.
    type str
    Generic type for RBAC purposes.
    verified bool
    Is true if the user has verified its account by email, or if set by an admin.
    website str
    Website, blog, or anything similar (displayed to other participants).
    email String
    Email of the user, may be used to verify the account.
    password String
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    affiliation String
    Affiliation to a team, company or agency.
    banned Boolean
    Is true if the user is banned from the CTF.
    country String
    Country the user represent or is native from.
    hidden Boolean
    Is true if the user is hidden to the participants.
    language String
    Language the user is fluent in.
    name String
    Name or pseudo of the user.
    type String
    Generic type for RBAC purposes.
    verified Boolean
    Is true if the user has verified its account by email, or if set by an admin.
    website String
    Website, blog, or anything similar (displayed to other participants).

    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,
            affiliation: Optional[str] = None,
            banned: Optional[bool] = None,
            country: Optional[str] = None,
            email: Optional[str] = None,
            hidden: Optional[bool] = None,
            language: Optional[str] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            type: Optional[str] = None,
            verified: Optional[bool] = None,
            website: 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.
    The following state arguments are supported:
    Affiliation string
    Affiliation to a team, company or agency.
    Banned bool
    Is true if the user is banned from the CTF.
    Country string
    Country the user represent or is native from.
    Email string
    Email of the user, may be used to verify the account.
    Hidden bool
    Is true if the user is hidden to the participants.
    Language string
    Language the user is fluent in.
    Name string
    Name or pseudo of the user.
    Password string
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    Type string
    Generic type for RBAC purposes.
    Verified bool
    Is true if the user has verified its account by email, or if set by an admin.
    Website string
    Website, blog, or anything similar (displayed to other participants).
    Affiliation string
    Affiliation to a team, company or agency.
    Banned bool
    Is true if the user is banned from the CTF.
    Country string
    Country the user represent or is native from.
    Email string
    Email of the user, may be used to verify the account.
    Hidden bool
    Is true if the user is hidden to the participants.
    Language string
    Language the user is fluent in.
    Name string
    Name or pseudo of the user.
    Password string
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    Type string
    Generic type for RBAC purposes.
    Verified bool
    Is true if the user has verified its account by email, or if set by an admin.
    Website string
    Website, blog, or anything similar (displayed to other participants).
    affiliation String
    Affiliation to a team, company or agency.
    banned Boolean
    Is true if the user is banned from the CTF.
    country String
    Country the user represent or is native from.
    email String
    Email of the user, may be used to verify the account.
    hidden Boolean
    Is true if the user is hidden to the participants.
    language String
    Language the user is fluent in.
    name String
    Name or pseudo of the user.
    password String
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    type String
    Generic type for RBAC purposes.
    verified Boolean
    Is true if the user has verified its account by email, or if set by an admin.
    website String
    Website, blog, or anything similar (displayed to other participants).
    affiliation string
    Affiliation to a team, company or agency.
    banned boolean
    Is true if the user is banned from the CTF.
    country string
    Country the user represent or is native from.
    email string
    Email of the user, may be used to verify the account.
    hidden boolean
    Is true if the user is hidden to the participants.
    language string
    Language the user is fluent in.
    name string
    Name or pseudo of the user.
    password string
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    type string
    Generic type for RBAC purposes.
    verified boolean
    Is true if the user has verified its account by email, or if set by an admin.
    website string
    Website, blog, or anything similar (displayed to other participants).
    affiliation str
    Affiliation to a team, company or agency.
    banned bool
    Is true if the user is banned from the CTF.
    country str
    Country the user represent or is native from.
    email str
    Email of the user, may be used to verify the account.
    hidden bool
    Is true if the user is hidden to the participants.
    language str
    Language the user is fluent in.
    name str
    Name or pseudo of the user.
    password str
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    type str
    Generic type for RBAC purposes.
    verified bool
    Is true if the user has verified its account by email, or if set by an admin.
    website str
    Website, blog, or anything similar (displayed to other participants).
    affiliation String
    Affiliation to a team, company or agency.
    banned Boolean
    Is true if the user is banned from the CTF.
    country String
    Country the user represent or is native from.
    email String
    Email of the user, may be used to verify the account.
    hidden Boolean
    Is true if the user is hidden to the participants.
    language String
    Language the user is fluent in.
    name String
    Name or pseudo of the user.
    password String
    Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
    type String
    Generic type for RBAC purposes.
    verified Boolean
    Is true if the user has verified its account by email, or if set by an admin.
    website String
    Website, blog, or anything similar (displayed to other participants).

    Package Details

    Repository
    ctfd ctfer-io/pulumi-ctfd
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ctfd Terraform Provider.
    ctfd logo
    CTFd v1.0.0 published on Monday, Jun 3, 2024 by CTFer.io