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"
|
||||
MODULE = "not-used"
|
||||
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"
|
||||
description = __doc__
|
||||
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]
|
||||
|
|
|
@ -57,6 +57,7 @@ class Aws(Validateable, CredentialMappingDefault):
|
|||
result = {
|
||||
"aws_access_key": self.aws_access_key,
|
||||
"aws_secret_key": self.aws_secret_key,
|
||||
"aws_region": self.aws_region,
|
||||
}
|
||||
if self.aws_as_backend:
|
||||
result.update(
|
||||
|
@ -65,7 +66,6 @@ class Aws(Validateable, CredentialMappingDefault):
|
|||
"bucket": self.aws_bucket,
|
||||
"key": self.__bucket_key__(),
|
||||
"kms_key_id": self.aws_bucket_kms_key_id,
|
||||
"region": self.aws_region,
|
||||
}
|
||||
)
|
||||
return result
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
variable "account_name" {}
|
||||
variable "bucket" {}
|
||||
variable "key" {}
|
||||
variable "kms_key_id" {}
|
||||
variable "region" {}
|
||||
variable "kms_key_id" {}
|
|
@ -1,5 +1,5 @@
|
|||
provider "aws" {
|
||||
region = var.region
|
||||
region = var.aws_region
|
||||
access_key = var.aws_access_key
|
||||
secret_key = var.aws_secret_key
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
variable "aws_access_key" {
|
||||
}
|
||||
|
||||
variable "aws_secret_key" {
|
||||
}
|
||||
variable "aws_access_key" {}
|
||||
variable "aws_secret_key" {}
|
||||
variable "aws_region" {}
|
||||
|
|
|
@ -1,29 +1,24 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
|
||||
exoscale = {
|
||||
source = "exoscale/exoscale"
|
||||
version = ">= 0.29.0"
|
||||
}
|
||||
|
||||
hcloud = {
|
||||
source = "hetznercloud/hcloud"
|
||||
version = ">= 1.23.0"
|
||||
version = ">= 1.41"
|
||||
}
|
||||
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = "~> 3.0"
|
||||
version = "~> 5.6"
|
||||
}
|
||||
|
||||
hetznerdns = {
|
||||
source = "timohirt/hetznerdns"
|
||||
version = ">= 1.1.0"
|
||||
version = ">= 2.2"
|
||||
}
|
||||
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.0"
|
||||
version = "~> 2.28"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -66,6 +66,7 @@ def test_should_calculate_project_vars():
|
|||
assert {
|
||||
"aws_access_key": "aws_access_key",
|
||||
"aws_secret_key": "aws_secret_key",
|
||||
"aws_region": "region",
|
||||
} == sut.project_vars()
|
||||
|
||||
sut = Aws(
|
||||
|
@ -78,9 +79,9 @@ def test_should_calculate_project_vars():
|
|||
assert {
|
||||
"aws_access_key": "aws_access_key",
|
||||
"aws_secret_key": "aws_secret_key",
|
||||
"aws_region": "region",
|
||||
"account_name": "test",
|
||||
"bucket": "bucket",
|
||||
"key": "test/module",
|
||||
"kms_key_id": "aws_bucket_kms_key_id",
|
||||
"region": "region",
|
||||
} == sut.project_vars()
|
||||
|
|
|
@ -76,9 +76,9 @@ def test_should_calculate_project_vars():
|
|||
"do_api_key": "api_key",
|
||||
"do_spaces_access_id": "spaces_id",
|
||||
"do_spaces_secret_key": "spaces_secret",
|
||||
"region": "region",
|
||||
"account_name": "test",
|
||||
"endpoint": "endpoint",
|
||||
"bucket": "bucket",
|
||||
"key": "test/module",
|
||||
"region": "region",
|
||||
} == sut.project_vars()
|
||||
|
|
|
@ -89,6 +89,7 @@ def test_should_calculate_project_vars():
|
|||
"hetzner_api_key": "hetzner_api_key",
|
||||
"aws_access_key": "aws_access_key",
|
||||
"aws_secret_key": "aws_secret_key",
|
||||
"aws_region": "region",
|
||||
} == sut.project_vars()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue