abcxyz / abcxyz/guardian

Add the ability to migrate terraform state

Abierto
#154 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Go
Estrellas
26
Forks
7
Merge medio
1 d 1 h
PR fusionados (30 d)
1

Descripción

### TL;DR

Provide the ability for users to inform guardian that the state file needs to be migrated.

### Detailed design

Use PR body comments to determine if the `-migrate-state` flag should be used in the terraform init command.

This would require two phases:

1. Checkout the main branch, run `terraform init`
2. Checkout the PR branch, run `terraform init -migrate-state`
- This would leave the existing state intact, so if the plan/apply failed, it would be a no-op
4. Continue with the `plan` and `apply`

There should be a separate and distinct step to remove the old state file after a successful plan and apply.

### Alternatives considered

_No response_

### Additional information

_No response_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.