feat: initial commit
- add modules - add config - add environments - add .gitignore - add makefile
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
include "root" {
|
||||
path = find_in_parent_folders("root.hcl")
|
||||
expose = true
|
||||
}
|
||||
|
||||
include "config" {
|
||||
path = "${get_repo_root()}/config/config.hcl"
|
||||
expose = true
|
||||
}
|
||||
|
||||
locals {
|
||||
config = include.config.locals.config
|
||||
}
|
||||
|
||||
terraform {
|
||||
source = "../../../modules/artifactapi"
|
||||
}
|
||||
|
||||
inputs = {
|
||||
remote_alpine = local.config.remote_alpine
|
||||
remote_docker = local.config.remote_docker
|
||||
remote_generic = local.config.remote_generic
|
||||
remote_goproxy = local.config.remote_goproxy
|
||||
remote_helm = local.config.remote_helm
|
||||
remote_rpm = local.config.remote_rpm
|
||||
virtual = local.config.virtual
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
generate "backend" {
|
||||
path = "backend.tf"
|
||||
if_exists = "overwrite"
|
||||
contents = <<EOF
|
||||
provider "artifactapi" {
|
||||
endpoint = "https://artifactapi.k8s.syd1.au.unkin.net"
|
||||
}
|
||||
|
||||
terraform {
|
||||
backend "consul" {
|
||||
address = "https://consul.service.consul"
|
||||
path = "infra/terraform/artifactapi/${path_relative_to_include()}/state"
|
||||
scheme = "https"
|
||||
lock = true
|
||||
ca_file = "/etc/pki/tls/certs/ca-bundle.crt"
|
||||
}
|
||||
required_version = ">= 1.10"
|
||||
required_providers {
|
||||
artifactapi = {
|
||||
source = "git.unkin.net/unkin/artifactapi"
|
||||
version = "0.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
}
|
||||
Reference in New Issue
Block a user