tfstate: very basic terraform state backend in flask

This commit is contained in:
Iain Learmonth 2022-08-29 19:16:35 +01:00
parent 29870639b8
commit affa0f0149
4 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,28 @@
"""add terraform state
Revision ID: 665e340dbe09
Revises: c644bb20d0e3
Create Date: 2022-08-29 17:10:05.447985
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '665e340dbe09'
down_revision = 'c644bb20d0e3'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('terraform_state',
sa.Column('key', sa.String(), nullable=False),
sa.Column('state', sa.String(), nullable=True),
sa.Column('lock', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('key', name=op.f('pk_terraform_state'))
)
def downgrade():
op.drop_table('terraform_state')