Remove manual state migration steps for AWS

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-08-09 16:04:32 +02:00 committed by Daniel Weiße
parent 154d1cc3cf
commit e30179a8aa
9 changed files with 20 additions and 146 deletions

View file

@ -93,11 +93,9 @@ type Upgrader struct {
helmClient helmInterface
imageFetcher imageFetcher
outWriter io.Writer
// TODO(AB#3248): Remove this tfClient after we can assume that all existing clusters have been migrated.
tfClient *terraform.Client
tfUpgrader *upgrade.TerraformUpgrader
log debugLog
upgradeID string
tfUpgrader *upgrade.TerraformUpgrader
log debugLog
upgradeID string
}
// NewUpgrader returns a new Upgrader.
@ -147,7 +145,6 @@ func NewUpgrader(
if err != nil {
return nil, fmt.Errorf("setting up terraform client: %w", err)
}
u.tfClient = tfClient
tfUpgrader, err := upgrade.NewTerraformUpgrader(tfClient, outWriter, fileHandler)
if err != nil {
@ -163,12 +160,6 @@ func (u *Upgrader) GetUpgradeID() string {
return u.upgradeID
}
// AddManualStateMigration adds a manual state migration to the Terraform client.
// TODO(AB#3248): Remove this method after we can assume that all existing clusters have been migrated.
func (u *Upgrader) AddManualStateMigration(migration terraform.StateMigration) {
u.tfClient.WithManualStateMigration(migration)
}
// CheckTerraformMigrations checks whether Terraform migrations are possible in the current workspace.
// If the files that will be written during the upgrade already exist, it returns an error.
func (u *Upgrader) CheckTerraformMigrations(upgradeWorkspace string) error {