Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive plan asking about destroying stacks #277

Closed
troyready opened this issue May 13, 2020 · 1 comment · Fixed by #289
Closed

Interactive plan asking about destroying stacks #277

troyready opened this issue May 13, 2020 · 1 comment · Fixed by #289
Assignees
Labels
feature Request or pull request for a new feature priority:low Low priority issue or pull request

Comments

@troyready
Copy link
Contributor

troyready commented May 13, 2020

While testing runway plan today (v1.7.3 on python2 in a ubuntu:bionic docker image), I got unexpected output:

root@03c24adf8758:/app# export DEPLOY_ENVIRONMENT=prod
root@03c24adf8758:/app# runway plan  
	INFO:runway:Could not find runway.variables.yml or runway.variables.yaml in the current directory. Continuing without a variables file.
INFO:runway:
INFO:runway:Environment "prod" was determined from the DEPLOY_ENVIRONMENT environment variable.
INFO:runway:If this is not correct, update the value (or unset it to fall back to the name of the current git branch or parent directory).
INFO:runway:

Configured deployments:
<my deployment list here>


Enter number of deployment to run (or "all"): 2
INFO:runway:
INFO:runway:Found 1 deployment(s)
INFO:runway:
INFO:runway:
INFO:runway:======= Processing deployment 'mydeployname' ===========================
INFO:runway:
INFO:runway:Attempting to deploy 'prod' to region(s): us-east-1
INFO:runway:
INFO:runway:======= Processing region us-east-1 ===========================
INFO:runway:Verified current AWS account matches required account id 123456789012.
INFO:runway:
INFO:runway:---- Processing module 'pipeline_user.cfn' for 'prod' in us-east-1 --------------
INFO:runway:Module options: {'name': 'pipeline_user.cfn', 'parameters': {'permitted_role_arns': 'somerolearn', 'namespace': 'prod'}, 'tags': {}, 'class_path': None, 'env_vars': {}, 'environments': {}, 'environment': True, 'child_modules': [], 'path': 'pipeline_user.cfn', 'type': None, 'options': {}}
INFO:runway.cfngin:stacks.yaml: generating change sets...
INFO:runway.cfngin:Using interactive AWS provider mode.
INFO:runway.cfngin.actions.diff:Diffing stacks: teststack
INFO:runway.cfngin.providers.aws.default:prod-teststack changes:
Parameters Added: TableName

Changes:
- Add TerraformLockTable (AWS::DynamoDB::Table)
- Add TerraformStateBucket (AWS::S3::Bucket)
Show full change set? [y/n] n
Destroy stack 'prod-teststack'? [y/n] n
INFO:runway.cfngin.ui:teststack: skipped (canceled execution)

(the "Destroy stack 'prod-teststack'?" question being the strange part)

The cfngin config defines the stack fairly simply (with no option set to persist the stack graph):

namespace: ${namespace}
cfngin_bucket: ""

sys_path: ./

stacks:
  teststack:
    template_path: test_templates/tf_state.yaml
    variables:
      TableName: ${ssm /infra/${namespace}-troytest::default=defaulttablename}

When I ran the plan, no stack was present (the stack had previously been deployed and deleted).

EDIT: I realize this is probably much more expected behavior than was originally apparent to me. Makes sense to query the user about deleting the stack that I know see in the "REVIEW_IN_PROGRESS" state.

Fine if we want to just close this, but perhaps there's still a UX improvement that could be made here that warrants leaving it open.

@troyready troyready added bug Something isn't working priority:low Low priority issue or pull request status:review_needed Issue or pull request needs reviewed labels May 13, 2020
@ITProKyle
Copy link
Collaborator

EDIT: I realize this is probably much more expected behavior than was originally apparent to me. Makes sense to query the user about deleting the stack that I know see in the "REVIEW_IN_PROGRESS" state.

was just about to mention this. it prompt for deleting the chageset/stack created to generate a changeset for a net-new stack. we could reword the prompt a bit.

@ITProKyle ITProKyle added feature Request or pull request for a new feature and removed bug Something isn't working status:review_needed Issue or pull request needs reviewed labels May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request or pull request for a new feature priority:low Low priority issue or pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants