constellation/cli/internal/cmd
Moritz Sanft 005e865a13
cli: use state file on init and upgrade (#2395)
* [wip] use state file in CLI

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

tidy

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

* use state file in CLI

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

take clusterConfig from IDFile for compat

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

various fixes

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

wip

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

* add GCP-specific values in Helm loader test

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

* remove unnecessary pointer

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

* write ClusterValues in one step

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

* move stub to test file

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

* remove mention of id-file

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

* move output to `migrateTerraform`

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

* unconditional assignments converting from idFile

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

* move require block in go modules file

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

* fall back to id file on upgrade

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

* tidy

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

* fix linter check

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

* add notice to remove Terraform state check on manual migration

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

* add `name` field

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

fix name tests

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

* return early if no Terraform diff

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

* tidy

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

* return infrastructure state even if no diff exists

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

* add TODO to remove comment

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

* use state-file in miniconstellation

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

* cli: remove id-file (#2402)

* remove id-file from `constellation create`

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

* add file renaming to handler

* rename id-file after upgrade

* use idFile on `constellation init`

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

* remove id-file from `constellation verify`

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

* linter fixes

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

* remove id-file from `constellation mini`

* remove id-file from `constellation recover`

* linter fixes

* remove id-file from `constellation terminate`

* fix initSecret type

* fix recover argument precedence

* fix terminate test

* generate

* add TODO to remove id-file removal

* Update cli/internal/cmd/init.go

Co-authored-by: Adrian Stobbe <stobbe.adrian@gmail.com>

* fix verify arg parse logic

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

* add version test

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

* remove id-file from docs

* add file not found log

* use state-file in miniconstellation

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

* remove id-file from `constellation iam destroy`

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

* remove id-file from `cdbg deploy`

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: Adrian Stobbe <stobbe.adrian@gmail.com>

* use state-file in CI

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

* update orchestration docs

---------

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
Co-authored-by: Adrian Stobbe <stobbe.adrian@gmail.com>
2023-10-09 13:04:29 +02: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
BUILD.bazel cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
cloud_test.go cli: write infrastructure to new state file (#2321) 2023-09-25 16:19:43 +02:00
cloud.go cli: write infrastructure to new state file (#2321) 2023-09-25 16:19:43 +02:00
cmd.go Add package design goals to CLI package documentation 2023-08-09 15:42:24 +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: fix Azure SEV-SNP latest version logic (#2343) 2023-09-25 11:53:02 +02:00
configfetchmeasurements.go cli: fix Azure SEV-SNP latest version logic (#2343) 2023-09-25 11:53:02 +02:00
configgenerate_test.go cli: store kubernetes version as strong type in config (#2287) 2023-09-19 13:50:00 +02:00
configgenerate.go cli: store kubernetes version as strong type in config (#2287) 2023-09-19 13:50:00 +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: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
create.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
iamcreate_test.go Move workspace path functions to sub-package of cmd 2023-08-09 15:42:24 +02:00
iamcreate.go cli: fix incorrect file path for master secret during upgrades when using workspace flag (#2249) 2023-08-16 15:38:40 +02:00
iamdestroy_test.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
iamdestroy.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
iamupgradeapply_test.go cli: fix Azure SEV-SNP latest version logic (#2343) 2023-09-25 11:53:02 +02:00
iamupgradeapply.go cli: perform upgrades in-place in Terraform workspace (#2317) 2023-09-14 11:51:20 +02:00
init_test.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
init.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +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: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
recover_test.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
recover.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02: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 kubernetes package (#2232) 2023-08-21 16:15:32 +02:00
status.go cli: helm install and upgrade unification (#2244) 2023-08-24 16:40:47 +02:00
terminate_test.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
terminate.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04: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: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
upgradeapply.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
upgradecheck_test.go cli: perform upgrades in-place in Terraform workspace (#2317) 2023-09-14 11:51:20 +02:00
upgradecheck.go cli: store kubernetes version as strong type in config (#2287) 2023-09-19 13:50:00 +02: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: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02:00
verify.go cli: use state file on init and upgrade (#2395) 2023-10-09 13:04:29 +02: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