ctfd.Team
Explore with Pulumi AI
CTFd defines a Team as a group of Users who will attend 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",
password: "password",
});
const cybercombattants = new ctfd.Team("cybercombattants", {
email: "lucastesson@protonmail.com",
password: "password",
members: [ctfer.id],
captain: ctfer.id,
});
import pulumi
import ctfer-io_pulumi-ctfd as ctfd
ctfer = ctfd.User("ctfer",
email="ctfer-io@protonmail.com",
password="password")
cybercombattants = ctfd.Team("cybercombattants",
email="lucastesson@protonmail.com",
password="password",
members=[ctfer.id],
captain=ctfer.id)
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 {
ctfer, err := ctfd.NewUser(ctx, "ctfer", &ctfd.UserArgs{
Email: pulumi.String("ctfer-io@protonmail.com"),
Password: pulumi.String("password"),
})
if err != nil {
return err
}
_, err = ctfd.NewTeam(ctx, "cybercombattants", &ctfd.TeamArgs{
Email: pulumi.String("lucastesson@protonmail.com"),
Password: pulumi.String("password"),
Members: pulumi.StringArray{
ctfer.ID(),
},
Captain: ctfer.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 ctfer = new Ctfd.User("ctfer", new()
{
Email = "ctfer-io@protonmail.com",
Password = "password",
});
var cybercombattants = new Ctfd.Team("cybercombattants", new()
{
Email = "lucastesson@protonmail.com",
Password = "password",
Members = new[]
{
ctfer.Id,
},
Captain = ctfer.Id,
});
});
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 com.pulumi.ctfd.Team;
import com.pulumi.ctfd.TeamArgs;
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")
.password("password")
.build());
var cybercombattants = new Team("cybercombattants", TeamArgs.builder()
.email("lucastesson@protonmail.com")
.password("password")
.members(ctfer.id())
.captain(ctfer.id())
.build());
}
}
resources:
ctfer:
type: ctfd:User
properties:
email: ctfer-io@protonmail.com
password: password
cybercombattants:
type: ctfd:Team
properties:
email: lucastesson@protonmail.com
password: password
members:
- ${ctfer.id}
captain: ${ctfer.id}
Create Team Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
args: TeamArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Team(resource_name: str,
opts: Optional[ResourceOptions] = None,
captain: Optional[str] = None,
email: Optional[str] = None,
members: Optional[Sequence[str]] = None,
password: Optional[str] = None,
affiliation: Optional[str] = None,
banned: Optional[bool] = None,
country: Optional[str] = None,
hidden: Optional[bool] = None,
name: Optional[str] = None,
website: Optional[str] = None)
func NewTeam(ctx *Context, name string, args TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs args, CustomResourceOptions? opts = null)
type: ctfd:Team
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 TeamArgs
- 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 TeamArgs
- 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 TeamArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeamArgs
- 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 teamResource = new Ctfd.Team("teamResource", new()
{
Captain = "string",
Email = "string",
Members = new[]
{
"string",
},
Password = "string",
Affiliation = "string",
Banned = false,
Country = "string",
Hidden = false,
Name = "string",
Website = "string",
});
example, err := ctfd.NewTeam(ctx, "teamResource", &ctfd.TeamArgs{
Captain: pulumi.String("string"),
Email: pulumi.String("string"),
Members: pulumi.StringArray{
pulumi.String("string"),
},
Password: pulumi.String("string"),
Affiliation: pulumi.String("string"),
Banned: pulumi.Bool(false),
Country: pulumi.String("string"),
Hidden: pulumi.Bool(false),
Name: pulumi.String("string"),
Website: pulumi.String("string"),
})
var teamResource = new Team("teamResource", TeamArgs.builder()
.captain("string")
.email("string")
.members("string")
.password("string")
.affiliation("string")
.banned(false)
.country("string")
.hidden(false)
.name("string")
.website("string")
.build());
team_resource = ctfd.Team("teamResource",
captain="string",
email="string",
members=["string"],
password="string",
affiliation="string",
banned=False,
country="string",
hidden=False,
name="string",
website="string")
const teamResource = new ctfd.Team("teamResource", {
captain: "string",
email: "string",
members: ["string"],
password: "string",
affiliation: "string",
banned: false,
country: "string",
hidden: false,
name: "string",
website: "string",
});
type: ctfd:Team
properties:
affiliation: string
banned: false
captain: string
country: string
email: string
hidden: false
members:
- string
name: string
password: string
website: string
Team 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 Team resource accepts the following input properties:
- Captain string
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- Email string
- Email of the team.
- Members List<string>
- List of members (User), defined by their IDs.
- Password string
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- Affiliation string
- Affiliation to a company or agency.
- Banned bool
- Is true if the team is banned from the CTF.
- Country string
- Country the team represent or is hail from.
- bool
- Is true if the team is hidden to the participants.
- Name string
- Name of the team.
- Website string
- Website, blog, or anything similar (displayed to other participants).
- Captain string
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- Email string
- Email of the team.
- Members []string
- List of members (User), defined by their IDs.
- Password string
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- Affiliation string
- Affiliation to a company or agency.
- Banned bool
- Is true if the team is banned from the CTF.
- Country string
- Country the team represent or is hail from.
- bool
- Is true if the team is hidden to the participants.
- Name string
- Name of the team.
- Website string
- Website, blog, or anything similar (displayed to other participants).
- captain String
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- email String
- Email of the team.
- members List<String>
- List of members (User), defined by their IDs.
- password String
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- affiliation String
- Affiliation to a company or agency.
- banned Boolean
- Is true if the team is banned from the CTF.
- country String
- Country the team represent or is hail from.
- Boolean
- Is true if the team is hidden to the participants.
- name String
- Name of the team.
- website String
- Website, blog, or anything similar (displayed to other participants).
- captain string
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- email string
- Email of the team.
- members string[]
- List of members (User), defined by their IDs.
- password string
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- affiliation string
- Affiliation to a company or agency.
- banned boolean
- Is true if the team is banned from the CTF.
- country string
- Country the team represent or is hail from.
- boolean
- Is true if the team is hidden to the participants.
- name string
- Name of the team.
- website string
- Website, blog, or anything similar (displayed to other participants).
- captain str
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- email str
- Email of the team.
- members Sequence[str]
- List of members (User), defined by their IDs.
- password str
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- affiliation str
- Affiliation to a company or agency.
- banned bool
- Is true if the team is banned from the CTF.
- country str
- Country the team represent or is hail from.
- bool
- Is true if the team is hidden to the participants.
- name str
- Name of the team.
- website str
- Website, blog, or anything similar (displayed to other participants).
- captain String
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- email String
- Email of the team.
- members List<String>
- List of members (User), defined by their IDs.
- password String
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- affiliation String
- Affiliation to a company or agency.
- banned Boolean
- Is true if the team is banned from the CTF.
- country String
- Country the team represent or is hail from.
- Boolean
- Is true if the team is hidden to the participants.
- name String
- Name of the team.
- website String
- Website, blog, or anything similar (displayed to other participants).
Outputs
All input properties are implicitly available as output properties. Additionally, the Team 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 Team Resource
Get an existing Team 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?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
affiliation: Optional[str] = None,
banned: Optional[bool] = None,
captain: Optional[str] = None,
country: Optional[str] = None,
email: Optional[str] = None,
hidden: Optional[bool] = None,
members: Optional[Sequence[str]] = None,
name: Optional[str] = None,
password: Optional[str] = None,
website: Optional[str] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState 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.
- Affiliation string
- Affiliation to a company or agency.
- Banned bool
- Is true if the team is banned from the CTF.
- Captain string
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- Country string
- Country the team represent or is hail from.
- Email string
- Email of the team.
- bool
- Is true if the team is hidden to the participants.
- Members List<string>
- List of members (User), defined by their IDs.
- Name string
- Name of the team.
- Password string
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- Website string
- Website, blog, or anything similar (displayed to other participants).
- Affiliation string
- Affiliation to a company or agency.
- Banned bool
- Is true if the team is banned from the CTF.
- Captain string
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- Country string
- Country the team represent or is hail from.
- Email string
- Email of the team.
- bool
- Is true if the team is hidden to the participants.
- Members []string
- List of members (User), defined by their IDs.
- Name string
- Name of the team.
- Password string
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- Website string
- Website, blog, or anything similar (displayed to other participants).
- affiliation String
- Affiliation to a company or agency.
- banned Boolean
- Is true if the team is banned from the CTF.
- captain String
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- country String
- Country the team represent or is hail from.
- email String
- Email of the team.
- Boolean
- Is true if the team is hidden to the participants.
- members List<String>
- List of members (User), defined by their IDs.
- name String
- Name of the team.
- password String
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- website String
- Website, blog, or anything similar (displayed to other participants).
- affiliation string
- Affiliation to a company or agency.
- banned boolean
- Is true if the team is banned from the CTF.
- captain string
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- country string
- Country the team represent or is hail from.
- email string
- Email of the team.
- boolean
- Is true if the team is hidden to the participants.
- members string[]
- List of members (User), defined by their IDs.
- name string
- Name of the team.
- password string
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- website string
- Website, blog, or anything similar (displayed to other participants).
- affiliation str
- Affiliation to a company or agency.
- banned bool
- Is true if the team is banned from the CTF.
- captain str
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- country str
- Country the team represent or is hail from.
- email str
- Email of the team.
- bool
- Is true if the team is hidden to the participants.
- members Sequence[str]
- List of members (User), defined by their IDs.
- name str
- Name of the team.
- password str
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- website str
- Website, blog, or anything similar (displayed to other participants).
- affiliation String
- Affiliation to a company or agency.
- banned Boolean
- Is true if the team is banned from the CTF.
- captain String
- Member who is captain of the team. Must be part of the members too. Note it could cause a fatal error in case of resource import with an inconsistent CTFd configuration i.e. if a team has no captain yet (should not be possible).
- country String
- Country the team represent or is hail from.
- email String
- Email of the team.
- Boolean
- Is true if the team is hidden to the participants.
- members List<String>
- List of members (User), defined by their IDs.
- name String
- Name of the team.
- password String
- Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- 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.