constellation/cli/internal/cmd
Moritz Sanft 744a605602
cli: state file validation (#2523)
* re-use `ReadFromFile` in `CreateOrRead`

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* [wip]: add constraints

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* [wip] error formatting

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* wip

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* formatted error messages

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* state file validation

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* linter fixes

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* allow overriding the constraints

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* dont validate on read

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* add pre-create constraints

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* [wip]

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* finish pre-init validation test

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* finish post-init validation

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* use state file validation in CLI

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* fix apply tests

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* Update internal/validation/errors.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* use transformator for tests

* tidy

* use empty check directly

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* Update cli/internal/state/state.go

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>

* conditional validation per CSP

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* tidy

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* fix rebase

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* add default case

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* validate state-file as last input

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

---------

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
2023-11-03 15:47:03 +01:00
..
pathprefix cli: fix incorrect file path for master secret during upgrades when using workspace flag (#2249) 2023-08-16 15:38:40 +02:00
apply_test.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
apply.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
applyhelm.go cli: common backend for init and upgrade apply commands (#2449) 2023-10-24 15:39:18 +02:00
applyinit.go cli: common backend for init and upgrade apply commands (#2449) 2023-10-24 15:39:18 +02:00
applyterraform.go cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
BUILD.bazel cli: common backend for init and upgrade apply commands (#2449) 2023-10-24 15:39:18 +02:00
cloud_test.go cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
cloud.go cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
cmd.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
config.go config: add separate option for handling attestation parameters (#1623) 2023-05-03 11:11:53 +02:00
configfetchmeasurements_test.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
configfetchmeasurements.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
configgenerate_test.go cli: generate state file during constellation config generate (#2455) 2023-10-16 20:18:59 +02:00
configgenerate.go cli: generate state file during constellation config generate (#2455) 2023-10-16 20:18:59 +02:00
configinstancetypes.go config: validate instance type for aws SNP based on attestation variant (#1963) 2023-06-26 17:05:12 +02:00
configkubernetesversions.go go: remove unused parameters 2023-03-20 08:41:01 -04:00
configmigrate.go cli: update config migration to migrate v3 -> v4 (#2166) 2023-08-04 15:57:36 +02:00
create_test.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
create.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
iam.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamcreate_test.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamcreate.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamcreateaws.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamcreateazure.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamcreategcp.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamdestroy_test.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamdestroy.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamupgradeapply_test.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
iamupgradeapply.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
init_test.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
init.go ci: add e2e test for self-managed infrastructure (#2472) 2023-10-27 09:37:26 +02:00
log.go Add debug logging for verify command (#610) 2022-11-21 17:02:33 +01:00
mini.go Update CLI reference (#248) 2022-10-14 10:48:20 +02:00
minidown.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
miniup_cross.go cli: add windows amd64 build target (#1835) 2023-05-30 12:02:43 +02:00
miniup_linux_amd64.go cli: add windows amd64 build target (#1835) 2023-05-30 12:02:43 +02:00
miniup.go cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
recover_test.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
recover.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
spinner_test.go reserve enough time for stable tests (#564) 2022-11-17 17:30:35 +01:00
spinner.go cli: add missing flag to miniConstellation (#1374) 2023-03-08 15:48:36 +01:00
status_test.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
status.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
terminate_test.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
terminate.go cli: refactor flag parsing code (#2425) 2023-10-16 15:05:29 +02:00
upgrade.go cli: move helm and terraform out of kubernetes package (#2222) 2023-08-16 09:59:32 +02:00
upgradeapply_test.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
upgradeapply.go cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
upgradecheck_test.go cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
upgradecheck.go cli: unify cloudcmd create and upgrade code (#2513) 2023-10-31 12:46:40 +01:00
userinteraction_test.go bazel: add build files for go (#1186) 2023-03-09 15:23:42 +01:00
userinteraction.go add license headers 2022-09-05 09:17:25 +02:00
validargs_test.go add license headers 2022-09-05 09:17:25 +02:00
validargs.go cli: remove debug env check for AWS (#460) 2022-11-04 15:31:51 +01:00
verifier_test.go api: add functions to transparently handle signatures upon API interaction (#2142) 2023-08-01 16:48:13 +02:00
verify_test.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
verify.go cli: state file validation (#2523) 2023-11-03 15:47:03 +01:00
version_test.go cli: use Semver type to represent microservice versions (#2125) 2023-07-25 14:20:25 +02:00
version.go cli: use Semver type to represent microservice versions (#2125) 2023-07-25 14:20:25 +02:00