Skip to content

Commit

Permalink
Make it hard to use the prod state on accident (SumoLogic#22)
Browse files Browse the repository at this point in the history
* make local state the default

* remove trailing spaces

* re-enable apply

* move all remote-state declarations into the .drone.yml

* remove renaming step

* remove newline

Co-authored-by: Marcin Suterski <msuterski@users.noreply.github.com>
  • Loading branch information
mlclmj and msuterski committed Jul 28, 2020
1 parent 495eb6a commit 0054c89
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ steps:
- plan
init_options:
lock-timeout: 5m
backend-config:
- "bucket=remote-state"
- "prefix=nytimes/dv-sumologic"
environment:
SUMOLOGIC_ACCESSID:
from_secret: access_id
Expand All @@ -40,6 +43,9 @@ steps:
- apply
init_options:
lock-timeout: 5m
backend-config:
- "bucket=remote-state"
- "prefix=nytimes/dv-sumologic"
environment:
SUMOLOGIC_ACCESSID:
from_secret: access_id
Expand Down
9 changes: 5 additions & 4 deletions terraform/remote-state.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Be careful making changes in this file -- you can accidentally find yourself
# working with the live production state file.
# Please reach out in #delivery-engineering if you'd like help working with this.

terraform {
backend "gcs" {
bucket = "remote-state"
prefix = "nytimes/dv-sumologic"
}
backend "gcs" {}
}

0 comments on commit 0054c89

Please sign in to comment.