Init terraform

This commit is contained in:
Jake Howard 2020-02-21 18:44:25 +00:00
parent 45946741d5
commit a3cc0f7849
Signed by: jake
GPG key ID: 57AFB45680EDD477
7 changed files with 70 additions and 0 deletions

37
.gitignore vendored
View file

@ -113,3 +113,40 @@ dmypy.json
# End of https://www.gitignore.io/api/python,ansible # End of https://www.gitignore.io/api/python,ansible
env/ env/
ansible/.vault_pass ansible/.vault_pass
# Created by https://www.gitignore.io/api/terraform
# Edit at https://www.gitignore.io/?templates=terraform
### Terraform ###
# Local .terraform directories
**/.terraform/*
# .tfstate files
*.tfstate
*.tfstate.*
# Crash log files
crash.log
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
# .tfvars files are managed as part of configuration and so should be included in
# version control.
#
# example.tfvars
# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json
# Include override files you do wish to add to version control using negated pattern
# !example_override.tf
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*
# End of https://www.gitignore.io/api/terraform
terraform/secrets.auto.tfvars

7
scripts/terraform-apply.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -ex
cd terraform/
terraform apply

7
scripts/terraform-lint.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
cd terraform/
terraform fmt -check -recursive

7
scripts/terraform-plan.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -ex
cd terraform/
terraform plan

6
terraform/casey_vps.tf Normal file
View file

@ -0,0 +1,6 @@
resource "vultr_server" "casey" {
plan_id = 200
region_id = 8
os_id = 159
hostname = "casey"
}

5
terraform/providers.tf Normal file
View file

@ -0,0 +1,5 @@
provider "vultr" {
api_key = var.vultr_api_key
rate_limit = 700
retry_limit = 3
}

1
terraform/variables.tf Normal file
View file

@ -0,0 +1 @@
variable "vultr_api_key" {}