Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ChallengeDynamicIaCResourceAttributes = utils.BlindMerge(tfctfd.ChallengeDynamicResourceAttributes, map[string]schema.Attribute{ "shared": schema.BoolAttribute{ MarkdownDescription: "Whether the instance will be shared between all players.", Optional: true, Computed: true, Default: defaults.Bool(booldefault.StaticBool(false)), }, "destroy_on_flag": schema.BoolAttribute{ MarkdownDescription: "Whether to destroy the instance once flagged.", Optional: true, Computed: true, Default: defaults.Bool(booldefault.StaticBool(false)), }, "mana_cost": schema.Int64Attribute{ MarkdownDescription: "The cost (in mana) of the challenge once an instance is deployed.", Optional: true, Computed: true, Default: defaults.Int64(int64default.StaticInt64(0)), }, "scenario_id": schema.StringAttribute{ MarkdownDescription: "The file's ID of the scenario.", Required: true, }, "timeout": schema.Int64Attribute{ MarkdownDescription: "The timeout (in seconds) after which the instance will be janitored.", Optional: true, Computed: true, Default: nil, }, "until": schema.StringAttribute{ MarkdownDescription: "The date until the instance could run before being janitored.", Optional: true, Computed: true, Default: nil, }, }) )
Functions ¶
Types ¶
type CTFdCMProvider ¶
type CTFdCMProvider struct { *tfctfd.CTFdProvider // contains filtered or unexported fields }
func (*CTFdCMProvider) DataSources ¶
func (p *CTFdCMProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*CTFdCMProvider) Metadata ¶
func (p *CTFdCMProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
type ChallengeDynamicIaCResourceModel ¶
type ChallengeDynamicIaCResourceModel struct { tfctfd.ChallengeDynamicResourceModel DestroyOnFlag types.Bool `tfsdk:"destroy_on_flag"` ManaCost types.Int64 `tfsdk:"mana_cost"` ScenarioID types.String `tfsdk:"scenario_id"` Timeout types.Int64 `tfsdk:"timeout"` Until types.String `tfsdk:"until"` }
func (*ChallengeDynamicIaCResourceModel) Read ¶
func (chall *ChallengeDynamicIaCResourceModel) Read(ctx context.Context, client *ctfd.Client, diags diag.Diagnostics)
Click to show internal directories.
Click to hide internal directories.