Remove ctfd_challenge
subresources (files/flags/hints)
#64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current design of the
ctfd_challenge
, despite it proposes a unified API to manage a CTFd challenge, has many problem.One of them is that internally, a lot of work has to be performed to follow the deltas and the CRUD operations necessary to cope with the Terraform plan.
For many reasons (and especially both a burden of maintainability and poor configuration quality) we must step back from the goal of a unified API.
This PR:
ctfd_challenge.file
attribute to its own resourcectfd_file
, along with lifecycle testsctfd_challenge.flag
attribute to its own resourcectfd_flag
, along with lifecycle testsctfd_challenge.hint
attribute to its own resourcectfd_hint
, along with lifecycle tests. Permit hints to be depends on one another 🎉ctfd_challenge.decay
,ctfd_challenge.minimum
,ctfd_challenge.tags
andctfd_challenge.topics
attributes empty/default values.Follows an example of what this PR technically implies for end users.
Before
After
Documentation has been updated and
make docs
run.Due to breaking changes, this PR implies for the next release to be major.