microsoft / cobalt

Infrastructure turn-key solution for app service workloads
MIT License
116 stars 78 forks source link

Null_resource lifecycle is not in sync with it's contents #345

Open TechnicallyWilliams opened 4 years ago

TechnicallyWilliams commented 4 years ago

Background

null_resource gets created even if it's local-exec command line fails. Continuous failures create new null_resource references in the state file and will not clean up previously created null_resources references in the state file. Continuous local-exec failures of a null_resource will result in a ever expanding state file.

Description

As a user, I'd like the null_resource to be destroyed during current deployment when local-exec command fails in order to prevent pollution of state file.

Acceptance Criteria

Reference: [Done-Done Checklist] (https://github.com/Microsoft/code-with-engineering-playbook/blob/master/Engineering/BestPractices/DoneDone.md)

Also, here are a few points that need to be addressed:

  1. Successful local-exec commands clean up all previous null-resource references that live within the state file that were created as a result of continuous local-exec failures.

Resources

image

https://www.terraform.io/docs/provisioners/local-exec.html

Tasks

Stories are intended to be completed in a single sprint; if task breakdown creates addition work then team should discuss promoting the Story to an Epic. Reference: [Minimal Valuable Slices] (https://github.com/Microsoft/code-with-engineering-playbook/blob/master/Engineering/BestPractices/MinimalSlices.md)

Reference: [How to Write Better Tasks] (http://agilebutpragmatic.blogspot.com/2012/04/splitting-story-into-tasks-how-to-write.html)

Assignee should break down work into tasks here

  1. Investigate ways to prevent continuous creation of null_resource references upon consecutive local-exec failures