Skip to content

Commit

Permalink
Adding info on updating the terraform s3 buckets
Browse files Browse the repository at this point in the history
Signed-off-by: garland <[email protected]>
  • Loading branch information
sekka1 committed Jul 3, 2019
1 parent 4efd70a commit 92297d4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,34 @@ and require some kind of large scale migration or cut over.

We suggest you take the `cidr-ranges.md` file as a good place to start.

# Replace all of the S3 buckets used
In the examples, S3 buckets are used for Terraform and Kops as the state store.
This allows you to not hold the state of what you launched local to your machine and
on a remote machine. This is useful if you accidentally remove the files from your
local machine or if multiple people or machines will be updating these resources.

One problem is that S3 bucket names are global meaning only one can exist. If I
used a bucket name, that means you can not use that same name.

For you to use this, you will need to update the bucket names in this repository
to what you want to use. We are using the bucket name `kubernetes-ops-123-terraform-state`

The following is a way to replace all of the occurrences of `kubernetes-ops-123-terraform-state`
with `kubernetes-ops-xxxxxx-terraform-state`. A suggestion would be to replace the
`xxxxxx` with another random number.

Linux:
```
find . -name '*' -exec sed -i -e 's/kubernetes-ops-123-terraform-state/kubernetes-ops-xxxxxx-terraform-state/g' {} \;
```

OSX:
```
find . -type f | xargs sed -i '' 's/kubernetes-ops-123-terraform-state/kubernetes-ops-xxxxx-terraform-state/g'
```

You can alternatively use your IDE to search and replace this string

# VPC Creation

Directory: <repo root>/tf-environment
Expand Down

0 comments on commit 92297d4

Please sign in to comment.