# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['ChallengeDynamicIaCArgs', 'ChallengeDynamicIaC']

@pulumi.input_type
class ChallengeDynamicIaCArgs:
    def __init__(__self__, *,
                 category: pulumi.Input[str],
                 decay: pulumi.Input[int],
                 description: pulumi.Input[str],
                 minimum: pulumi.Input[int],
                 scenario_id: pulumi.Input[str],
                 value: pulumi.Input[int],
                 attribution: Optional[pulumi.Input[str]] = None,
                 connection_info: Optional[pulumi.Input[str]] = None,
                 destroy_on_flag: Optional[pulumi.Input[bool]] = None,
                 function: Optional[pulumi.Input[str]] = None,
                 mana_cost: Optional[pulumi.Input[int]] = None,
                 max_attempts: Optional[pulumi.Input[int]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 next: Optional[pulumi.Input[int]] = None,
                 requirements: Optional[pulumi.Input['ChallengeDynamicIaCRequirementsArgs']] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 timeout: Optional[pulumi.Input[int]] = None,
                 topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 until: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a ChallengeDynamicIaC resource.
        :param pulumi.Input[str] category: Category of the challenge that CTFd groups by on the web UI.
        :param pulumi.Input[int] decay: The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`.
        :param pulumi.Input[str] description: Description of the challenge, consider using multiline descriptions for better style.
        :param pulumi.Input[int] minimum: The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
        :param pulumi.Input[str] scenario_id: The file's ID of the scenario.
        :param pulumi.Input[int] value: The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge.
        :param pulumi.Input[str] attribution: Attribution to the creator(s) of the challenge.
        :param pulumi.Input[str] connection_info: Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
        :param pulumi.Input[bool] destroy_on_flag: Whether to destroy the instance once flagged.
        :param pulumi.Input[str] function: Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
        :param pulumi.Input[int] mana_cost: The cost (in mana) of the challenge once an instance is deployed.
        :param pulumi.Input[int] max_attempts: Maximum amount of attempts before being unable to flag the challenge.
        :param pulumi.Input[str] name: Name of the challenge, displayed as it.
        :param pulumi.Input[int] next: Suggestion for the end-user as next challenge to work on.
        :param pulumi.Input['ChallengeDynamicIaCRequirementsArgs'] requirements: List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF.
        :param pulumi.Input[bool] shared: Whether the instance will be shared between all players.
        :param pulumi.Input[str] state: State of the challenge, either hidden or visible.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves.
        :param pulumi.Input[int] timeout: The timeout (in seconds) after which the instance will be janitored.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: List of challenge topics that are displayed to the administrators for maintenance and planification.
        :param pulumi.Input[str] until: The date until the instance could run before being janitored.
        """
        pulumi.set(__self__, "category", category)
        pulumi.set(__self__, "decay", decay)
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "minimum", minimum)
        pulumi.set(__self__, "scenario_id", scenario_id)
        pulumi.set(__self__, "value", value)
        if attribution is not None:
            pulumi.set(__self__, "attribution", attribution)
        if connection_info is not None:
            pulumi.set(__self__, "connection_info", connection_info)
        if destroy_on_flag is not None:
            pulumi.set(__self__, "destroy_on_flag", destroy_on_flag)
        if function is not None:
            pulumi.set(__self__, "function", function)
        if mana_cost is not None:
            pulumi.set(__self__, "mana_cost", mana_cost)
        if max_attempts is not None:
            pulumi.set(__self__, "max_attempts", max_attempts)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if next is not None:
            pulumi.set(__self__, "next", next)
        if requirements is not None:
            pulumi.set(__self__, "requirements", requirements)
        if shared is not None:
            pulumi.set(__self__, "shared", shared)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if timeout is not None:
            pulumi.set(__self__, "timeout", timeout)
        if topics is not None:
            pulumi.set(__self__, "topics", topics)
        if until is not None:
            pulumi.set(__self__, "until", until)

    @property
    @pulumi.getter
    def category(self) -> pulumi.Input[str]:
        """
        Category of the challenge that CTFd groups by on the web UI.
        """
        return pulumi.get(self, "category")

    @category.setter
    def category(self, value: pulumi.Input[str]):
        pulumi.set(self, "category", value)

    @property
    @pulumi.getter
    def decay(self) -> pulumi.Input[int]:
        """
        The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`.
        """
        return pulumi.get(self, "decay")

    @decay.setter
    def decay(self, value: pulumi.Input[int]):
        pulumi.set(self, "decay", value)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Input[str]:
        """
        Description of the challenge, consider using multiline descriptions for better style.
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: pulumi.Input[str]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def minimum(self) -> pulumi.Input[int]:
        """
        The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
        """
        return pulumi.get(self, "minimum")

    @minimum.setter
    def minimum(self, value: pulumi.Input[int]):
        pulumi.set(self, "minimum", value)

    @property
    @pulumi.getter(name="scenarioId")
    def scenario_id(self) -> pulumi.Input[str]:
        """
        The file's ID of the scenario.
        """
        return pulumi.get(self, "scenario_id")

    @scenario_id.setter
    def scenario_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "scenario_id", value)

    @property
    @pulumi.getter
    def value(self) -> pulumi.Input[int]:
        """
        The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge.
        """
        return pulumi.get(self, "value")

    @value.setter
    def value(self, value: pulumi.Input[int]):
        pulumi.set(self, "value", value)

    @property
    @pulumi.getter
    def attribution(self) -> Optional[pulumi.Input[str]]:
        """
        Attribution to the creator(s) of the challenge.
        """
        return pulumi.get(self, "attribution")

    @attribution.setter
    def attribution(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "attribution", value)

    @property
    @pulumi.getter(name="connectionInfo")
    def connection_info(self) -> Optional[pulumi.Input[str]]:
        """
        Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
        """
        return pulumi.get(self, "connection_info")

    @connection_info.setter
    def connection_info(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "connection_info", value)

    @property
    @pulumi.getter(name="destroyOnFlag")
    def destroy_on_flag(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to destroy the instance once flagged.
        """
        return pulumi.get(self, "destroy_on_flag")

    @destroy_on_flag.setter
    def destroy_on_flag(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "destroy_on_flag", value)

    @property
    @pulumi.getter
    def function(self) -> Optional[pulumi.Input[str]]:
        """
        Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
        """
        return pulumi.get(self, "function")

    @function.setter
    def function(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "function", value)

    @property
    @pulumi.getter(name="manaCost")
    def mana_cost(self) -> Optional[pulumi.Input[int]]:
        """
        The cost (in mana) of the challenge once an instance is deployed.
        """
        return pulumi.get(self, "mana_cost")

    @mana_cost.setter
    def mana_cost(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "mana_cost", value)

    @property
    @pulumi.getter(name="maxAttempts")
    def max_attempts(self) -> Optional[pulumi.Input[int]]:
        """
        Maximum amount of attempts before being unable to flag the challenge.
        """
        return pulumi.get(self, "max_attempts")

    @max_attempts.setter
    def max_attempts(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "max_attempts", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        Name of the challenge, displayed as it.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def next(self) -> Optional[pulumi.Input[int]]:
        """
        Suggestion for the end-user as next challenge to work on.
        """
        return pulumi.get(self, "next")

    @next.setter
    def next(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "next", value)

    @property
    @pulumi.getter
    def requirements(self) -> Optional[pulumi.Input['ChallengeDynamicIaCRequirementsArgs']]:
        """
        List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF.
        """
        return pulumi.get(self, "requirements")

    @requirements.setter
    def requirements(self, value: Optional[pulumi.Input['ChallengeDynamicIaCRequirementsArgs']]):
        pulumi.set(self, "requirements", value)

    @property
    @pulumi.getter
    def shared(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the instance will be shared between all players.
        """
        return pulumi.get(self, "shared")

    @shared.setter
    def shared(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "shared", value)

    @property
    @pulumi.getter
    def state(self) -> Optional[pulumi.Input[str]]:
        """
        State of the challenge, either hidden or visible.
        """
        return pulumi.get(self, "state")

    @state.setter
    def state(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "state", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter
    def timeout(self) -> Optional[pulumi.Input[int]]:
        """
        The timeout (in seconds) after which the instance will be janitored.
        """
        return pulumi.get(self, "timeout")

    @timeout.setter
    def timeout(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "timeout", value)

    @property
    @pulumi.getter
    def topics(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of challenge topics that are displayed to the administrators for maintenance and planification.
        """
        return pulumi.get(self, "topics")

    @topics.setter
    def topics(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "topics", value)

    @property
    @pulumi.getter
    def until(self) -> Optional[pulumi.Input[str]]:
        """
        The date until the instance could run before being janitored.
        """
        return pulumi.get(self, "until")

    @until.setter
    def until(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "until", value)


@pulumi.input_type
class _ChallengeDynamicIaCState:
    def __init__(__self__, *,
                 attribution: Optional[pulumi.Input[str]] = None,
                 category: Optional[pulumi.Input[str]] = None,
                 connection_info: Optional[pulumi.Input[str]] = None,
                 decay: Optional[pulumi.Input[int]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 destroy_on_flag: Optional[pulumi.Input[bool]] = None,
                 function: Optional[pulumi.Input[str]] = None,
                 mana_cost: Optional[pulumi.Input[int]] = None,
                 max_attempts: Optional[pulumi.Input[int]] = None,
                 minimum: Optional[pulumi.Input[int]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 next: Optional[pulumi.Input[int]] = None,
                 requirements: Optional[pulumi.Input['ChallengeDynamicIaCRequirementsArgs']] = None,
                 scenario_id: Optional[pulumi.Input[str]] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 timeout: Optional[pulumi.Input[int]] = None,
                 topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 until: Optional[pulumi.Input[str]] = None,
                 value: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering ChallengeDynamicIaC resources.
        :param pulumi.Input[str] attribution: Attribution to the creator(s) of the challenge.
        :param pulumi.Input[str] category: Category of the challenge that CTFd groups by on the web UI.
        :param pulumi.Input[str] connection_info: Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
        :param pulumi.Input[int] decay: The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`.
        :param pulumi.Input[str] description: Description of the challenge, consider using multiline descriptions for better style.
        :param pulumi.Input[bool] destroy_on_flag: Whether to destroy the instance once flagged.
        :param pulumi.Input[str] function: Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
        :param pulumi.Input[int] mana_cost: The cost (in mana) of the challenge once an instance is deployed.
        :param pulumi.Input[int] max_attempts: Maximum amount of attempts before being unable to flag the challenge.
        :param pulumi.Input[int] minimum: The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
        :param pulumi.Input[str] name: Name of the challenge, displayed as it.
        :param pulumi.Input[int] next: Suggestion for the end-user as next challenge to work on.
        :param pulumi.Input['ChallengeDynamicIaCRequirementsArgs'] requirements: List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF.
        :param pulumi.Input[str] scenario_id: The file's ID of the scenario.
        :param pulumi.Input[bool] shared: Whether the instance will be shared between all players.
        :param pulumi.Input[str] state: State of the challenge, either hidden or visible.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves.
        :param pulumi.Input[int] timeout: The timeout (in seconds) after which the instance will be janitored.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: List of challenge topics that are displayed to the administrators for maintenance and planification.
        :param pulumi.Input[str] until: The date until the instance could run before being janitored.
        :param pulumi.Input[int] value: The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge.
        """
        if attribution is not None:
            pulumi.set(__self__, "attribution", attribution)
        if category is not None:
            pulumi.set(__self__, "category", category)
        if connection_info is not None:
            pulumi.set(__self__, "connection_info", connection_info)
        if decay is not None:
            pulumi.set(__self__, "decay", decay)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if destroy_on_flag is not None:
            pulumi.set(__self__, "destroy_on_flag", destroy_on_flag)
        if function is not None:
            pulumi.set(__self__, "function", function)
        if mana_cost is not None:
            pulumi.set(__self__, "mana_cost", mana_cost)
        if max_attempts is not None:
            pulumi.set(__self__, "max_attempts", max_attempts)
        if minimum is not None:
            pulumi.set(__self__, "minimum", minimum)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if next is not None:
            pulumi.set(__self__, "next", next)
        if requirements is not None:
            pulumi.set(__self__, "requirements", requirements)
        if scenario_id is not None:
            pulumi.set(__self__, "scenario_id", scenario_id)
        if shared is not None:
            pulumi.set(__self__, "shared", shared)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if timeout is not None:
            pulumi.set(__self__, "timeout", timeout)
        if topics is not None:
            pulumi.set(__self__, "topics", topics)
        if until is not None:
            pulumi.set(__self__, "until", until)
        if value is not None:
            pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def attribution(self) -> Optional[pulumi.Input[str]]:
        """
        Attribution to the creator(s) of the challenge.
        """
        return pulumi.get(self, "attribution")

    @attribution.setter
    def attribution(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "attribution", value)

    @property
    @pulumi.getter
    def category(self) -> Optional[pulumi.Input[str]]:
        """
        Category of the challenge that CTFd groups by on the web UI.
        """
        return pulumi.get(self, "category")

    @category.setter
    def category(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "category", value)

    @property
    @pulumi.getter(name="connectionInfo")
    def connection_info(self) -> Optional[pulumi.Input[str]]:
        """
        Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
        """
        return pulumi.get(self, "connection_info")

    @connection_info.setter
    def connection_info(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "connection_info", value)

    @property
    @pulumi.getter
    def decay(self) -> Optional[pulumi.Input[int]]:
        """
        The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`.
        """
        return pulumi.get(self, "decay")

    @decay.setter
    def decay(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "decay", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        Description of the challenge, consider using multiline descriptions for better style.
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="destroyOnFlag")
    def destroy_on_flag(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to destroy the instance once flagged.
        """
        return pulumi.get(self, "destroy_on_flag")

    @destroy_on_flag.setter
    def destroy_on_flag(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "destroy_on_flag", value)

    @property
    @pulumi.getter
    def function(self) -> Optional[pulumi.Input[str]]:
        """
        Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
        """
        return pulumi.get(self, "function")

    @function.setter
    def function(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "function", value)

    @property
    @pulumi.getter(name="manaCost")
    def mana_cost(self) -> Optional[pulumi.Input[int]]:
        """
        The cost (in mana) of the challenge once an instance is deployed.
        """
        return pulumi.get(self, "mana_cost")

    @mana_cost.setter
    def mana_cost(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "mana_cost", value)

    @property
    @pulumi.getter(name="maxAttempts")
    def max_attempts(self) -> Optional[pulumi.Input[int]]:
        """
        Maximum amount of attempts before being unable to flag the challenge.
        """
        return pulumi.get(self, "max_attempts")

    @max_attempts.setter
    def max_attempts(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "max_attempts", value)

    @property
    @pulumi.getter
    def minimum(self) -> Optional[pulumi.Input[int]]:
        """
        The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
        """
        return pulumi.get(self, "minimum")

    @minimum.setter
    def minimum(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "minimum", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        Name of the challenge, displayed as it.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def next(self) -> Optional[pulumi.Input[int]]:
        """
        Suggestion for the end-user as next challenge to work on.
        """
        return pulumi.get(self, "next")

    @next.setter
    def next(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "next", value)

    @property
    @pulumi.getter
    def requirements(self) -> Optional[pulumi.Input['ChallengeDynamicIaCRequirementsArgs']]:
        """
        List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF.
        """
        return pulumi.get(self, "requirements")

    @requirements.setter
    def requirements(self, value: Optional[pulumi.Input['ChallengeDynamicIaCRequirementsArgs']]):
        pulumi.set(self, "requirements", value)

    @property
    @pulumi.getter(name="scenarioId")
    def scenario_id(self) -> Optional[pulumi.Input[str]]:
        """
        The file's ID of the scenario.
        """
        return pulumi.get(self, "scenario_id")

    @scenario_id.setter
    def scenario_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "scenario_id", value)

    @property
    @pulumi.getter
    def shared(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the instance will be shared between all players.
        """
        return pulumi.get(self, "shared")

    @shared.setter
    def shared(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "shared", value)

    @property
    @pulumi.getter
    def state(self) -> Optional[pulumi.Input[str]]:
        """
        State of the challenge, either hidden or visible.
        """
        return pulumi.get(self, "state")

    @state.setter
    def state(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "state", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter
    def timeout(self) -> Optional[pulumi.Input[int]]:
        """
        The timeout (in seconds) after which the instance will be janitored.
        """
        return pulumi.get(self, "timeout")

    @timeout.setter
    def timeout(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "timeout", value)

    @property
    @pulumi.getter
    def topics(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of challenge topics that are displayed to the administrators for maintenance and planification.
        """
        return pulumi.get(self, "topics")

    @topics.setter
    def topics(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "topics", value)

    @property
    @pulumi.getter
    def until(self) -> Optional[pulumi.Input[str]]:
        """
        The date until the instance could run before being janitored.
        """
        return pulumi.get(self, "until")

    @until.setter
    def until(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "until", value)

    @property
    @pulumi.getter
    def value(self) -> Optional[pulumi.Input[int]]:
        """
        The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge.
        """
        return pulumi.get(self, "value")

    @value.setter
    def value(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "value", value)


class ChallengeDynamicIaC(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 attribution: Optional[pulumi.Input[str]] = None,
                 category: Optional[pulumi.Input[str]] = None,
                 connection_info: Optional[pulumi.Input[str]] = None,
                 decay: Optional[pulumi.Input[int]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 destroy_on_flag: Optional[pulumi.Input[bool]] = None,
                 function: Optional[pulumi.Input[str]] = None,
                 mana_cost: Optional[pulumi.Input[int]] = None,
                 max_attempts: Optional[pulumi.Input[int]] = None,
                 minimum: Optional[pulumi.Input[int]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 next: Optional[pulumi.Input[int]] = None,
                 requirements: Optional[pulumi.Input[Union['ChallengeDynamicIaCRequirementsArgs', 'ChallengeDynamicIaCRequirementsArgsDict']]] = None,
                 scenario_id: Optional[pulumi.Input[str]] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 timeout: Optional[pulumi.Input[int]] = None,
                 topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 until: Optional[pulumi.Input[str]] = None,
                 value: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        """
        CTFd is built around the Challenge resource, which contains all the attributes to define a part of the Capture The Flag event.

        This implementation has support of a more dynamic behavior for its scoring through time/solves thus is different from a standard challenge.

        ## Example Usage

        ```python
        import pulumi
        import base64
        import ctfer-io_pulumi-ctfdcm as ctfdcm
        import pulumi_ctfd as ctfd

        scenario = ctfd.index.Ctfd_file("scenario",
            name=scenario.zip,
            contentb64=(lambda path: base64.b64encode(open(path).read().encode()).decode())(.../scenario.zip))
        http = ctfdcm.ChallengeDynamicIaC("http",
            category="misc",
            description="...",
            value=500,
            decay=100,
            minimum=50,
            state="visible",
            function="logarithmic",
            shared=True,
            destroy_on_flag=True,
            mana_cost=1,
            scenario_id=scenario["id"],
            timeout=600,
            topics=["Misc"],
            tags=[
                "misc",
                "basic",
            ])
        http_flag = ctfd.index.Ctfd_flag("httpFlag",
            challenge_id=http.id,
            content=CTF{some_flag})
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] attribution: Attribution to the creator(s) of the challenge.
        :param pulumi.Input[str] category: Category of the challenge that CTFd groups by on the web UI.
        :param pulumi.Input[str] connection_info: Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
        :param pulumi.Input[int] decay: The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`.
        :param pulumi.Input[str] description: Description of the challenge, consider using multiline descriptions for better style.
        :param pulumi.Input[bool] destroy_on_flag: Whether to destroy the instance once flagged.
        :param pulumi.Input[str] function: Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
        :param pulumi.Input[int] mana_cost: The cost (in mana) of the challenge once an instance is deployed.
        :param pulumi.Input[int] max_attempts: Maximum amount of attempts before being unable to flag the challenge.
        :param pulumi.Input[int] minimum: The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
        :param pulumi.Input[str] name: Name of the challenge, displayed as it.
        :param pulumi.Input[int] next: Suggestion for the end-user as next challenge to work on.
        :param pulumi.Input[Union['ChallengeDynamicIaCRequirementsArgs', 'ChallengeDynamicIaCRequirementsArgsDict']] requirements: List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF.
        :param pulumi.Input[str] scenario_id: The file's ID of the scenario.
        :param pulumi.Input[bool] shared: Whether the instance will be shared between all players.
        :param pulumi.Input[str] state: State of the challenge, either hidden or visible.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves.
        :param pulumi.Input[int] timeout: The timeout (in seconds) after which the instance will be janitored.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: List of challenge topics that are displayed to the administrators for maintenance and planification.
        :param pulumi.Input[str] until: The date until the instance could run before being janitored.
        :param pulumi.Input[int] value: The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ChallengeDynamicIaCArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        CTFd is built around the Challenge resource, which contains all the attributes to define a part of the Capture The Flag event.

        This implementation has support of a more dynamic behavior for its scoring through time/solves thus is different from a standard challenge.

        ## Example Usage

        ```python
        import pulumi
        import base64
        import ctfer-io_pulumi-ctfdcm as ctfdcm
        import pulumi_ctfd as ctfd

        scenario = ctfd.index.Ctfd_file("scenario",
            name=scenario.zip,
            contentb64=(lambda path: base64.b64encode(open(path).read().encode()).decode())(.../scenario.zip))
        http = ctfdcm.ChallengeDynamicIaC("http",
            category="misc",
            description="...",
            value=500,
            decay=100,
            minimum=50,
            state="visible",
            function="logarithmic",
            shared=True,
            destroy_on_flag=True,
            mana_cost=1,
            scenario_id=scenario["id"],
            timeout=600,
            topics=["Misc"],
            tags=[
                "misc",
                "basic",
            ])
        http_flag = ctfd.index.Ctfd_flag("httpFlag",
            challenge_id=http.id,
            content=CTF{some_flag})
        ```

        :param str resource_name: The name of the resource.
        :param ChallengeDynamicIaCArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(ChallengeDynamicIaCArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 attribution: Optional[pulumi.Input[str]] = None,
                 category: Optional[pulumi.Input[str]] = None,
                 connection_info: Optional[pulumi.Input[str]] = None,
                 decay: Optional[pulumi.Input[int]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 destroy_on_flag: Optional[pulumi.Input[bool]] = None,
                 function: Optional[pulumi.Input[str]] = None,
                 mana_cost: Optional[pulumi.Input[int]] = None,
                 max_attempts: Optional[pulumi.Input[int]] = None,
                 minimum: Optional[pulumi.Input[int]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 next: Optional[pulumi.Input[int]] = None,
                 requirements: Optional[pulumi.Input[Union['ChallengeDynamicIaCRequirementsArgs', 'ChallengeDynamicIaCRequirementsArgsDict']]] = None,
                 scenario_id: Optional[pulumi.Input[str]] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 timeout: Optional[pulumi.Input[int]] = None,
                 topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 until: Optional[pulumi.Input[str]] = None,
                 value: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = ChallengeDynamicIaCArgs.__new__(ChallengeDynamicIaCArgs)

            __props__.__dict__["attribution"] = attribution
            if category is None and not opts.urn:
                raise TypeError("Missing required property 'category'")
            __props__.__dict__["category"] = category
            __props__.__dict__["connection_info"] = connection_info
            if decay is None and not opts.urn:
                raise TypeError("Missing required property 'decay'")
            __props__.__dict__["decay"] = decay
            if description is None and not opts.urn:
                raise TypeError("Missing required property 'description'")
            __props__.__dict__["description"] = description
            __props__.__dict__["destroy_on_flag"] = destroy_on_flag
            __props__.__dict__["function"] = function
            __props__.__dict__["mana_cost"] = mana_cost
            __props__.__dict__["max_attempts"] = max_attempts
            if minimum is None and not opts.urn:
                raise TypeError("Missing required property 'minimum'")
            __props__.__dict__["minimum"] = minimum
            __props__.__dict__["name"] = name
            __props__.__dict__["next"] = next
            __props__.__dict__["requirements"] = requirements
            if scenario_id is None and not opts.urn:
                raise TypeError("Missing required property 'scenario_id'")
            __props__.__dict__["scenario_id"] = scenario_id
            __props__.__dict__["shared"] = shared
            __props__.__dict__["state"] = state
            __props__.__dict__["tags"] = tags
            __props__.__dict__["timeout"] = timeout
            __props__.__dict__["topics"] = topics
            __props__.__dict__["until"] = until
            if value is None and not opts.urn:
                raise TypeError("Missing required property 'value'")
            __props__.__dict__["value"] = value
        super(ChallengeDynamicIaC, __self__).__init__(
            'ctfdcm:index/challengeDynamicIaC:ChallengeDynamicIaC',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            attribution: Optional[pulumi.Input[str]] = None,
            category: Optional[pulumi.Input[str]] = None,
            connection_info: Optional[pulumi.Input[str]] = None,
            decay: Optional[pulumi.Input[int]] = None,
            description: Optional[pulumi.Input[str]] = None,
            destroy_on_flag: Optional[pulumi.Input[bool]] = None,
            function: Optional[pulumi.Input[str]] = None,
            mana_cost: Optional[pulumi.Input[int]] = None,
            max_attempts: Optional[pulumi.Input[int]] = None,
            minimum: Optional[pulumi.Input[int]] = None,
            name: Optional[pulumi.Input[str]] = None,
            next: Optional[pulumi.Input[int]] = None,
            requirements: Optional[pulumi.Input[Union['ChallengeDynamicIaCRequirementsArgs', 'ChallengeDynamicIaCRequirementsArgsDict']]] = None,
            scenario_id: Optional[pulumi.Input[str]] = None,
            shared: Optional[pulumi.Input[bool]] = None,
            state: Optional[pulumi.Input[str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            timeout: Optional[pulumi.Input[int]] = None,
            topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            until: Optional[pulumi.Input[str]] = None,
            value: Optional[pulumi.Input[int]] = None) -> 'ChallengeDynamicIaC':
        """
        Get an existing ChallengeDynamicIaC resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] attribution: Attribution to the creator(s) of the challenge.
        :param pulumi.Input[str] category: Category of the challenge that CTFd groups by on the web UI.
        :param pulumi.Input[str] connection_info: Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
        :param pulumi.Input[int] decay: The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`.
        :param pulumi.Input[str] description: Description of the challenge, consider using multiline descriptions for better style.
        :param pulumi.Input[bool] destroy_on_flag: Whether to destroy the instance once flagged.
        :param pulumi.Input[str] function: Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
        :param pulumi.Input[int] mana_cost: The cost (in mana) of the challenge once an instance is deployed.
        :param pulumi.Input[int] max_attempts: Maximum amount of attempts before being unable to flag the challenge.
        :param pulumi.Input[int] minimum: The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
        :param pulumi.Input[str] name: Name of the challenge, displayed as it.
        :param pulumi.Input[int] next: Suggestion for the end-user as next challenge to work on.
        :param pulumi.Input[Union['ChallengeDynamicIaCRequirementsArgs', 'ChallengeDynamicIaCRequirementsArgsDict']] requirements: List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF.
        :param pulumi.Input[str] scenario_id: The file's ID of the scenario.
        :param pulumi.Input[bool] shared: Whether the instance will be shared between all players.
        :param pulumi.Input[str] state: State of the challenge, either hidden or visible.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves.
        :param pulumi.Input[int] timeout: The timeout (in seconds) after which the instance will be janitored.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: List of challenge topics that are displayed to the administrators for maintenance and planification.
        :param pulumi.Input[str] until: The date until the instance could run before being janitored.
        :param pulumi.Input[int] value: The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ChallengeDynamicIaCState.__new__(_ChallengeDynamicIaCState)

        __props__.__dict__["attribution"] = attribution
        __props__.__dict__["category"] = category
        __props__.__dict__["connection_info"] = connection_info
        __props__.__dict__["decay"] = decay
        __props__.__dict__["description"] = description
        __props__.__dict__["destroy_on_flag"] = destroy_on_flag
        __props__.__dict__["function"] = function
        __props__.__dict__["mana_cost"] = mana_cost
        __props__.__dict__["max_attempts"] = max_attempts
        __props__.__dict__["minimum"] = minimum
        __props__.__dict__["name"] = name
        __props__.__dict__["next"] = next
        __props__.__dict__["requirements"] = requirements
        __props__.__dict__["scenario_id"] = scenario_id
        __props__.__dict__["shared"] = shared
        __props__.__dict__["state"] = state
        __props__.__dict__["tags"] = tags
        __props__.__dict__["timeout"] = timeout
        __props__.__dict__["topics"] = topics
        __props__.__dict__["until"] = until
        __props__.__dict__["value"] = value
        return ChallengeDynamicIaC(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def attribution(self) -> pulumi.Output[Optional[str]]:
        """
        Attribution to the creator(s) of the challenge.
        """
        return pulumi.get(self, "attribution")

    @property
    @pulumi.getter
    def category(self) -> pulumi.Output[str]:
        """
        Category of the challenge that CTFd groups by on the web UI.
        """
        return pulumi.get(self, "category")

    @property
    @pulumi.getter(name="connectionInfo")
    def connection_info(self) -> pulumi.Output[str]:
        """
        Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
        """
        return pulumi.get(self, "connection_info")

    @property
    @pulumi.getter
    def decay(self) -> pulumi.Output[int]:
        """
        The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`.
        """
        return pulumi.get(self, "decay")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[str]:
        """
        Description of the challenge, consider using multiline descriptions for better style.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="destroyOnFlag")
    def destroy_on_flag(self) -> pulumi.Output[bool]:
        """
        Whether to destroy the instance once flagged.
        """
        return pulumi.get(self, "destroy_on_flag")

    @property
    @pulumi.getter
    def function(self) -> pulumi.Output[str]:
        """
        Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
        """
        return pulumi.get(self, "function")

    @property
    @pulumi.getter(name="manaCost")
    def mana_cost(self) -> pulumi.Output[int]:
        """
        The cost (in mana) of the challenge once an instance is deployed.
        """
        return pulumi.get(self, "mana_cost")

    @property
    @pulumi.getter(name="maxAttempts")
    def max_attempts(self) -> pulumi.Output[int]:
        """
        Maximum amount of attempts before being unable to flag the challenge.
        """
        return pulumi.get(self, "max_attempts")

    @property
    @pulumi.getter
    def minimum(self) -> pulumi.Output[int]:
        """
        The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
        """
        return pulumi.get(self, "minimum")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Name of the challenge, displayed as it.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def next(self) -> pulumi.Output[Optional[int]]:
        """
        Suggestion for the end-user as next challenge to work on.
        """
        return pulumi.get(self, "next")

    @property
    @pulumi.getter
    def requirements(self) -> pulumi.Output[Optional['outputs.ChallengeDynamicIaCRequirements']]:
        """
        List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF.
        """
        return pulumi.get(self, "requirements")

    @property
    @pulumi.getter(name="scenarioId")
    def scenario_id(self) -> pulumi.Output[str]:
        """
        The file's ID of the scenario.
        """
        return pulumi.get(self, "scenario_id")

    @property
    @pulumi.getter
    def shared(self) -> pulumi.Output[bool]:
        """
        Whether the instance will be shared between all players.
        """
        return pulumi.get(self, "shared")

    @property
    @pulumi.getter
    def state(self) -> pulumi.Output[str]:
        """
        State of the challenge, either hidden or visible.
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Sequence[str]]:
        """
        List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def timeout(self) -> pulumi.Output[int]:
        """
        The timeout (in seconds) after which the instance will be janitored.
        """
        return pulumi.get(self, "timeout")

    @property
    @pulumi.getter
    def topics(self) -> pulumi.Output[Sequence[str]]:
        """
        List of challenge topics that are displayed to the administrators for maintenance and planification.
        """
        return pulumi.get(self, "topics")

    @property
    @pulumi.getter
    def until(self) -> pulumi.Output[str]:
        """
        The date until the instance could run before being janitored.
        """
        return pulumi.get(self, "until")

    @property
    @pulumi.getter
    def value(self) -> pulumi.Output[int]:
        """
        The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge.
        """
        return pulumi.get(self, "value")

