This commit is contained in:
Alexander Hosking 2021-10-13 11:00:41 -04:00
commit 8642aca503
11 changed files with 304 additions and 245 deletions

View File

@ -1,3 +1,17 @@
# Orchestration - Clouds
This will enable the packing/deploying to client 'clouds'.
## Pre-commit Hooks
### Windows
**Dependencies**
1. `pip install pre-commit`
1. `pip install checkov`
1. `choco install tflint`
1. `choco install terraform-docs`
1. `choco install tfsec`
## Running It!
1. `pre-commit run -a`

View File

@ -0,0 +1,30 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0 # Use the ref you want to point at
hooks:
- id: detect-aws-credentials
- id: detect-private-key
- repo: local
hooks:
- id: terraform-fmt
name: terraform fmt
description: runs terraform fmt
entry: terraform fmt -recursive
language: system
pass_filenames: false
# - repo: https://github.com/gruntwork-io/pre-commit
# rev: v0.1.16 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
# hooks:
# - id: tflint
# args:
# - "--module"
# - "--deep"
# - "--config=.tflint.hcl"
# - id: terraform-validate
# - id: terraform-fmt
# - repo: git://github.com/antonbabenko/pre-commit-terraform
# rev: v1.52.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
# hooks:
# - id: terraform_tfsec
# - id: terraform_docs
# - id: checkov

View File

@ -2,21 +2,24 @@
# Manual edits may be lost in future updates.
provider "registry.terraform.io/cloudflare/cloudflare" {
version = "2.17.0"
constraints = "2.17.0"
version = "3.0.0"
constraints = "3.0.0"
hashes = [
"h1:Y2YvQIMTWnl2xz82+5gOVo3zSgQFpk7o/CadXP+Ad6w=",
"zh:05d97d21dea9acc20cb88885e658508bf23a09d2561eb203be70248f9bb7ee68",
"zh:23ee7136382586ca1f6e5a2df6751a22e29cd4060dab0bc613b702b2edf3881c",
"zh:2fc9647ded9459118966b6883372c4707f232220525ef56b488de738cf9c5e78",
"zh:31624f7efb0c93461cb54f5197c6af891ba8ccb540362356b5722509a00f3976",
"zh:3ded9720928dac2b6027e3c074511f9717726fd2e67feb17f764a3766ff22d3f",
"zh:623c689e580dd3cd4d75a713e40583590d343ceb801e6ffbc6d90d43be85cf6f",
"zh:63191d6bf16c9307d98ee4c31637e74687599baa05266218c5a32ed22f28b06b",
"zh:697955f294fff567b3862e6d0e7f2bbcfcfa8bfb58be28efca2fda00d9b7ebaa",
"zh:d4980aacac7f2e6c24e9072b284af77f0c5ad485c48a1ff041efeee3beacec58",
"zh:e5d4e2595034fc6a7382409aef91425d8a21473532774edce60166205ee0e4af",
"zh:f1b2f956748aba79be2f74b68035055cc99fdb6cdb2b5183e119be00c13bcda4",
"h1:Zp3pzxI09BVYA7sKVNuI1s0+7qaqvMUCmxEC134Um74=",
"zh:0fb2291957cc00d8acb04a5cae1d0f8790011dc69fb2c74b60e336d92e34d085",
"zh:1181d4ff7220abff3742463da4c4d3475a0058781f3a9996ae1138dd0ec52172",
"zh:1e67007b97172ae66b6a85c156814b4888e66df76ff57909305a10cfd7ebaf0d",
"zh:2381c35a1586538fcfca9ac0d219166b000f41640a8f28edd5cd44f9dbccb795",
"zh:4011294fa97d2a7893bb68418d0c5c446f59c605bdbfddf18d7bfd47a90d057a",
"zh:70e86342130964280d950212de30cae8609a503be69638fc43dadfee2b9d172f",
"zh:97b15c62b0d50fd871f31685d4569bcab2b759a3a67cf0c5307da072ad5132a1",
"zh:aa3e22f73329b1f2730e5ecabd7878f54faaead2f089fd300257b381e5505929",
"zh:afdf51a4fff5c7788f7b6140cb2bfa180855341bed8a2b3434b5acbcfaafe443",
"zh:b65a51cad80e848f754d4d4d692bb6405e21379196f6ba59e62e16090a742851",
"zh:cdc933c00625dc48204b4a7d4fbc3cb7c56e5e2afef23d0d60c751bde592a3ba",
"zh:d23cd0f6a0f9bb6a876c95434fe537b3399c8f72c6e9fe18099a97ef1d162f4f",
"zh:dc7ad5e4ebc6322a907d9552d06a58e160917ba084b601a205f648117893f199",
"zh:f6d07a7cf3860e8a9b68f62e97786a37d8b5e7b34958779d2722a3d5857d1224",
]
}
@ -25,6 +28,7 @@ provider "registry.terraform.io/hashicorp/aws" {
constraints = "~> 2.0"
hashes = [
"h1:6tf4jg37RrMHyVCql+fEgAFvX8JiqDognr+lk6rx7To=",
"h1:fx8tbGVwK1YIDI6UdHLnorC9PA1ZPSWEeW3V3aDCdWY=",
"zh:01a5f351146434b418f9ff8d8cc956ddc801110f1cc8b139e01be2ff8c544605",
"zh:1ec08abbaf09e3e0547511d48f77a1e2c89face2d55886b23f643011c76cb247",
"zh:606d134fef7c1357c9d155aadbee6826bc22bc0115b6291d483bc1444291c3e1",

View File

View File

@ -5,6 +5,7 @@ resource "cloudflare_zone" "studi-o_com" {
resource "cloudflare_zone" "studi-o_ca" {
zone = "studi-odesigns.ca"
}
resource "cloudflare_record" "studi-o_com_www" {
zone_id = cloudflare_zone.studi-o_com.id
name = "www"

View File

@ -1,3 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 2.0"
}
cloudflare = {
source = "cloudflare/cloudflare"
version = "3.0"
}
}
required_version = ">= 0.13"
}
terraform {
backend "remote" {
organization = "AHosking"
@ -7,6 +21,7 @@ terraform {
}
}
}
provider "cloudflare" {
email = var.CLOUDFLARE_EMAIL
api_key = var.CLOUDFLARE_API_KEY

View File

@ -20,7 +20,7 @@ variable "site5_ip" {
}
variable "do_assets" {
default = "165.22.228.138"
default = "165.22.228.138"
}
## KFA IP
@ -28,10 +28,10 @@ variable "kfa_ip" {
default = "64.137.159.107"
}
variable "studi-odesigns_com" { default = "studi-odesigns.com"}
variable "studi-odesigns_ca" { default = "studi-odesigns.ca"}
variable "studi-odesign_com" { default = "studi-odesign.com"}
variable "studi-odesign_ca" { default = "studi-odesign.ca"}
variable "studi-odesigns_com" { default = "studi-odesigns.com" }
variable "studi-odesigns_ca" { default = "studi-odesigns.ca" }
variable "studi-odesign_com" { default = "studi-odesign.com" }
variable "studi-odesign_ca" { default = "studi-odesign.ca" }
## Vsphere creds - this did not work anywhere near as well as I'd hoped
#variable "vsphere_user" {}

View File

@ -1,13 +1 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 2.0"
}
cloudflare = {
source = "cloudflare/cloudflare"
version = "2.17.0"
}
}
required_version = ">= 0.13"
}

View File

@ -18,7 +18,14 @@
"titleBar.inactiveForeground": "#e7e7e799",
"statusBar.background": "#eb5424",
"statusBarItem.hoverBackground": "#ef7853",
"statusBar.foreground": "#e7e7e7"
"statusBar.foreground": "#e7e7e7",
"activityBar.activeBackground": "#ef7853",
"editorGroup.border": "#ef7853",
"panel.border": "#ef7853",
"sash.hoverBorder": "#ef7853",
"sideBar.border": "#ef7853",
"statusBarItem.remoteBackground": "#eb5424",
"statusBarItem.remoteForeground": "#e7e7e7"
},
"peacock.color": "#eb5424"
}