fix region prefixes & backends
This commit is contained in:
parent
b165b5d06c
commit
1c08952a86
9 changed files with 15 additions and 21 deletions
2
build.py
2
build.py
|
@ -33,7 +33,7 @@ default_task = "dev"
|
||||||
name = "ddadevops"
|
name = "ddadevops"
|
||||||
MODULE = "not-used"
|
MODULE = "not-used"
|
||||||
PROJECT_ROOT_PATH = "."
|
PROJECT_ROOT_PATH = "."
|
||||||
version = "4.0.0-dev75"
|
version = "4.0.0-dev78"
|
||||||
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
|
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
|
||||||
description = __doc__
|
description = __doc__
|
||||||
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]
|
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]
|
||||||
|
|
|
@ -57,6 +57,7 @@ class Aws(Validateable, CredentialMappingDefault):
|
||||||
result = {
|
result = {
|
||||||
"aws_access_key": self.aws_access_key,
|
"aws_access_key": self.aws_access_key,
|
||||||
"aws_secret_key": self.aws_secret_key,
|
"aws_secret_key": self.aws_secret_key,
|
||||||
|
"aws_region": self.aws_region,
|
||||||
}
|
}
|
||||||
if self.aws_as_backend:
|
if self.aws_as_backend:
|
||||||
result.update(
|
result.update(
|
||||||
|
@ -65,7 +66,6 @@ class Aws(Validateable, CredentialMappingDefault):
|
||||||
"bucket": self.aws_bucket,
|
"bucket": self.aws_bucket,
|
||||||
"key": self.__bucket_key__(),
|
"key": self.__bucket_key__(),
|
||||||
"kms_key_id": self.aws_bucket_kms_key_id,
|
"kms_key_id": self.aws_bucket_kms_key_id,
|
||||||
"region": self.aws_region,
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -2,4 +2,3 @@ variable "account_name" {}
|
||||||
variable "bucket" {}
|
variable "bucket" {}
|
||||||
variable "key" {}
|
variable "key" {}
|
||||||
variable "kms_key_id" {}
|
variable "kms_key_id" {}
|
||||||
variable "region" {}
|
|
|
@ -1,5 +1,5 @@
|
||||||
provider "aws" {
|
provider "aws" {
|
||||||
region = var.region
|
region = var.aws_region
|
||||||
access_key = var.aws_access_key
|
access_key = var.aws_access_key
|
||||||
secret_key = var.aws_secret_key
|
secret_key = var.aws_secret_key
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
variable "aws_access_key" {
|
variable "aws_access_key" {}
|
||||||
}
|
variable "aws_secret_key" {}
|
||||||
|
variable "aws_region" {}
|
||||||
variable "aws_secret_key" {
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,29 +1,24 @@
|
||||||
terraform {
|
terraform {
|
||||||
required_providers {
|
required_providers {
|
||||||
|
|
||||||
exoscale = {
|
|
||||||
source = "exoscale/exoscale"
|
|
||||||
version = ">= 0.29.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
hcloud = {
|
hcloud = {
|
||||||
source = "hetznercloud/hcloud"
|
source = "hetznercloud/hcloud"
|
||||||
version = ">= 1.23.0"
|
version = ">= 1.41"
|
||||||
}
|
}
|
||||||
|
|
||||||
aws = {
|
aws = {
|
||||||
source = "hashicorp/aws"
|
source = "hashicorp/aws"
|
||||||
version = "~> 3.0"
|
version = "~> 5.6"
|
||||||
}
|
}
|
||||||
|
|
||||||
hetznerdns = {
|
hetznerdns = {
|
||||||
source = "timohirt/hetznerdns"
|
source = "timohirt/hetznerdns"
|
||||||
version = ">= 1.1.0"
|
version = ">= 2.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
digitalocean = {
|
digitalocean = {
|
||||||
source = "digitalocean/digitalocean"
|
source = "digitalocean/digitalocean"
|
||||||
version = "~> 2.0"
|
version = "~> 2.28"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,6 +66,7 @@ def test_should_calculate_project_vars():
|
||||||
assert {
|
assert {
|
||||||
"aws_access_key": "aws_access_key",
|
"aws_access_key": "aws_access_key",
|
||||||
"aws_secret_key": "aws_secret_key",
|
"aws_secret_key": "aws_secret_key",
|
||||||
|
"aws_region": "region",
|
||||||
} == sut.project_vars()
|
} == sut.project_vars()
|
||||||
|
|
||||||
sut = Aws(
|
sut = Aws(
|
||||||
|
@ -78,9 +79,9 @@ def test_should_calculate_project_vars():
|
||||||
assert {
|
assert {
|
||||||
"aws_access_key": "aws_access_key",
|
"aws_access_key": "aws_access_key",
|
||||||
"aws_secret_key": "aws_secret_key",
|
"aws_secret_key": "aws_secret_key",
|
||||||
|
"aws_region": "region",
|
||||||
"account_name": "test",
|
"account_name": "test",
|
||||||
"bucket": "bucket",
|
"bucket": "bucket",
|
||||||
"key": "test/module",
|
"key": "test/module",
|
||||||
"kms_key_id": "aws_bucket_kms_key_id",
|
"kms_key_id": "aws_bucket_kms_key_id",
|
||||||
"region": "region",
|
|
||||||
} == sut.project_vars()
|
} == sut.project_vars()
|
||||||
|
|
|
@ -76,9 +76,9 @@ def test_should_calculate_project_vars():
|
||||||
"do_api_key": "api_key",
|
"do_api_key": "api_key",
|
||||||
"do_spaces_access_id": "spaces_id",
|
"do_spaces_access_id": "spaces_id",
|
||||||
"do_spaces_secret_key": "spaces_secret",
|
"do_spaces_secret_key": "spaces_secret",
|
||||||
|
"region": "region",
|
||||||
"account_name": "test",
|
"account_name": "test",
|
||||||
"endpoint": "endpoint",
|
"endpoint": "endpoint",
|
||||||
"bucket": "bucket",
|
"bucket": "bucket",
|
||||||
"key": "test/module",
|
"key": "test/module",
|
||||||
"region": "region",
|
|
||||||
} == sut.project_vars()
|
} == sut.project_vars()
|
||||||
|
|
|
@ -89,6 +89,7 @@ def test_should_calculate_project_vars():
|
||||||
"hetzner_api_key": "hetzner_api_key",
|
"hetzner_api_key": "hetzner_api_key",
|
||||||
"aws_access_key": "aws_access_key",
|
"aws_access_key": "aws_access_key",
|
||||||
"aws_secret_key": "aws_secret_key",
|
"aws_secret_key": "aws_secret_key",
|
||||||
|
"aws_region": "region",
|
||||||
} == sut.project_vars()
|
} == sut.project_vars()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue