1. Packages
  2. CTFd Provider
  3. API Docs
  4. Bracket
CTFd v2.2.0 published on Sunday, May 4, 2025 by CTFer.io

ctfd.Bracket

Explore with Pulumi AI

ctfd logo
CTFd v2.2.0 published on Sunday, May 4, 2025 by CTFer.io

    A bracket for users or teams to compete in parallel.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ctfd from "@ctfer-io/pulumi-ctfd";
    
    const juniors = new ctfd.Bracket("juniors", {
        description: "Bracket for 14-25 years old players.",
        type: "users",
    });
    const player1 = new ctfd.User("player1", {
        email: "player1@ctfer.io",
        password: "password",
        bracketId: juniors.id,
    });
    
    import pulumi
    import ctfer-io_pulumi-ctfd as ctfd
    
    juniors = ctfd.Bracket("juniors",
        description="Bracket for 14-25 years old players.",
        type="users")
    player1 = ctfd.User("player1",
        email="player1@ctfer.io",
        password="password",
        bracket_id=juniors.id)
    
    package main
    
    import (
    	"github.com/ctfer-io/pulumi-ctfd/sdk/v2/go/ctfd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		juniors, err := ctfd.NewBracket(ctx, "juniors", &ctfd.BracketArgs{
    			Description: pulumi.String("Bracket for 14-25 years old players."),
    			Type:        pulumi.String("users"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ctfd.NewUser(ctx, "player1", &ctfd.UserArgs{
    			Email:     pulumi.String("player1@ctfer.io"),
    			Password:  pulumi.String("password"),
    			BracketId: juniors.ID(),
    		})
    		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 juniors = new Ctfd.Bracket("juniors", new()
        {
            Description = "Bracket for 14-25 years old players.",
            Type = "users",
        });
    
        var player1 = new Ctfd.User("player1", new()
        {
            Email = "player1@ctfer.io",
            Password = "password",
            BracketId = juniors.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ctfd.Bracket;
    import com.pulumi.ctfd.BracketArgs;
    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 juniors = new Bracket("juniors", BracketArgs.builder()
                .description("Bracket for 14-25 years old players.")
                .type("users")
                .build());
    
            var player1 = new User("player1", UserArgs.builder()
                .email("player1@ctfer.io")
                .password("password")
                .bracketId(juniors.id())
                .build());
    
        }
    }
    
    resources:
      juniors:
        type: ctfd:Bracket
        properties:
          description: Bracket for 14-25 years old players.
          type: users
      player1:
        type: ctfd:User
        properties:
          email: player1@ctfer.io
          password: password
          bracketId: ${juniors.id}
    

    Create Bracket Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Bracket(name: string, args?: BracketArgs, opts?: CustomResourceOptions);
    @overload
    def Bracket(resource_name: str,
                args: Optional[BracketArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Bracket(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                name: Optional[str] = None,
                type: Optional[str] = None)
    func NewBracket(ctx *Context, name string, args *BracketArgs, opts ...ResourceOption) (*Bracket, error)
    public Bracket(string name, BracketArgs? args = null, CustomResourceOptions? opts = null)
    public Bracket(String name, BracketArgs args)
    public Bracket(String name, BracketArgs args, CustomResourceOptions options)
    
    type: ctfd:Bracket
    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 BracketArgs
    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 BracketArgs
    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 BracketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BracketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BracketArgs
    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 bracketResource = new Ctfd.Bracket("bracketResource", new()
    {
        Description = "string",
        Name = "string",
        Type = "string",
    });
    
    example, err := ctfd.NewBracket(ctx, "bracketResource", &ctfd.BracketArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Type:        pulumi.String("string"),
    })
    
    var bracketResource = new Bracket("bracketResource", BracketArgs.builder()
        .description("string")
        .name("string")
        .type("string")
        .build());
    
    bracket_resource = ctfd.Bracket("bracketResource",
        description="string",
        name="string",
        type="string")
    
    const bracketResource = new ctfd.Bracket("bracketResource", {
        description: "string",
        name: "string",
        type: "string",
    });
    
    type: ctfd:Bracket
    properties:
        description: string
        name: string
        type: string
    

    Bracket 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 Bracket resource accepts the following input properties:

    Description string
    Description that explains the goal of this bracket.
    Name string
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    Type string
    Type of the bracket, either "users" or "teams".
    Description string
    Description that explains the goal of this bracket.
    Name string
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    Type string
    Type of the bracket, either "users" or "teams".
    description String
    Description that explains the goal of this bracket.
    name String
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type String
    Type of the bracket, either "users" or "teams".
    description string
    Description that explains the goal of this bracket.
    name string
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type string
    Type of the bracket, either "users" or "teams".
    description str
    Description that explains the goal of this bracket.
    name str
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type str
    Type of the bracket, either "users" or "teams".
    description String
    Description that explains the goal of this bracket.
    name String
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type String
    Type of the bracket, either "users" or "teams".

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Bracket 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 Bracket Resource

    Get an existing Bracket 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?: BracketState, opts?: CustomResourceOptions): Bracket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            type: Optional[str] = None) -> Bracket
    func GetBracket(ctx *Context, name string, id IDInput, state *BracketState, opts ...ResourceOption) (*Bracket, error)
    public static Bracket Get(string name, Input<string> id, BracketState? state, CustomResourceOptions? opts = null)
    public static Bracket get(String name, Output<String> id, BracketState state, CustomResourceOptions options)
    resources:  _:    type: ctfd:Bracket    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.
    The following state arguments are supported:
    Description string
    Description that explains the goal of this bracket.
    Name string
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    Type string
    Type of the bracket, either "users" or "teams".
    Description string
    Description that explains the goal of this bracket.
    Name string
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    Type string
    Type of the bracket, either "users" or "teams".
    description String
    Description that explains the goal of this bracket.
    name String
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type String
    Type of the bracket, either "users" or "teams".
    description string
    Description that explains the goal of this bracket.
    name string
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type string
    Type of the bracket, either "users" or "teams".
    description str
    Description that explains the goal of this bracket.
    name str
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type str
    Type of the bracket, either "users" or "teams".
    description String
    Description that explains the goal of this bracket.
    name String
    Name displayed to end-users (e.g. "Students", "Interns", "Engineers").
    type String
    Type of the bracket, either "users" or "teams".

    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 v2.2.0 published on Sunday, May 4, 2025 by CTFer.io