mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-04 23:35:11 -04:00
Remove manual state migration steps for AWS
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
154d1cc3cf
commit
e30179a8aa
9 changed files with 20 additions and 146 deletions
|
@ -221,17 +221,6 @@ func (u *upgradeApplyCmd) migrateTerraform(
|
|||
return fmt.Errorf("checking workspace: %w", err)
|
||||
}
|
||||
|
||||
// TODO(AB#3248): Remove this migration after we can assume that all existing clusters have been migrated.
|
||||
var awsZone string
|
||||
if conf.GetProvider() == cloudprovider.AWS {
|
||||
awsZone = conf.Provider.AWS.Zone
|
||||
}
|
||||
manualMigrations := terraformMigrationAWSNodeGroups(conf.GetProvider(), awsZone)
|
||||
for _, migration := range manualMigrations {
|
||||
u.log.Debugf("Adding manual Terraform migration: %s", migration.DisplayName)
|
||||
u.upgrader.AddManualStateMigration(migration)
|
||||
}
|
||||
|
||||
imageRef, err := getImage(cmd.Context(), conf, fetcher)
|
||||
if err != nil {
|
||||
return fmt.Errorf("fetching image reference: %w", err)
|
||||
|
@ -252,6 +241,15 @@ func (u *upgradeApplyCmd) migrateTerraform(
|
|||
}
|
||||
|
||||
// Check if there are any Terraform migrations to apply
|
||||
|
||||
// Add manual migrations here if required
|
||||
//
|
||||
// var manualMigrations []terraform.StateMigration
|
||||
// for _, migration := range manualMigrations {
|
||||
// u.log.Debugf("Adding manual Terraform migration: %s", migration.DisplayName)
|
||||
// u.upgrader.AddManualStateMigration(migration)
|
||||
// }
|
||||
|
||||
hasDiff, err := u.upgrader.PlanTerraformMigrations(cmd.Context(), opts)
|
||||
if err != nil {
|
||||
return fmt.Errorf("planning terraform migrations: %w", err)
|
||||
|
@ -447,6 +445,5 @@ type cloudUpgrader interface {
|
|||
ApplyTerraformMigrations(ctx context.Context, opts upgrade.TerraformUpgradeOptions) (clusterid.File, error)
|
||||
CheckTerraformMigrations(upgradeWorkspace string) error
|
||||
CleanUpTerraformMigrations(upgradeWorkspace string) error
|
||||
AddManualStateMigration(migration terraform.StateMigration)
|
||||
GetUpgradeID() string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue