-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bug of terraform with s3/do space, now can run terraform plan & …
…apply successfully
- Loading branch information
1 parent
597010f
commit 3b45c5f
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# How to set up terraform | ||
|
||
Find your digitalocean spaces access key and secret key here: https://cloud.digitalocean.com/account/api/spaces?i=d79377 | ||
|
||
Save it to your local `~/.netrc` file: | ||
|
||
```bash | ||
echo "machine sfo2.digitaloceanspaces.com login $SPACES_KEY password $SPACES_SECRET" >> ~/.netrc | ||
``` | ||
|
||
Go the env folder, load key | ||
|
||
```bash | ||
cd dev | ||
source setup_keys.sh | ||
``` | ||
|
||
# How to run terraform | ||
|
||
Init: | ||
|
||
```bash | ||
terraform init -backend-config=backend-config.tfvars | ||
``` | ||
|
||
Plan, in the prompt input the database password: | ||
|
||
```bash | ||
terraform plan -var-file=dev.env.tfvars | ||
``` | ||
|
||
Apply: | ||
|
||
```bash | ||
terraform apply -var-file=dev.env.tfvars | ||
``` | ||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters