fix backend init

This commit is contained in:
Michael Jerger 2023-08-02 16:49:35 +02:00
parent 1585f15582
commit 577c717a87
2 changed files with 6 additions and 0 deletions

View file

@ -36,6 +36,8 @@ class Aws(Validateable, CredentialMappingDefault):
result = {} result = {}
if self.aws_as_backend: if self.aws_as_backend:
result = { result = {
"access_key": self.aws_access_key,
"secret_key": self.aws_secret_key,
"bucket": self.aws_bucket, "bucket": self.aws_bucket,
"key": self.__bucket_key__(), "key": self.__bucket_key__(),
"region": self.aws_region, "region": self.aws_region,

View file

@ -41,6 +41,8 @@ def test_should_calculate_backend_config():
{ {
"module": "dns_aws", "module": "dns_aws",
"stage": "prod", "stage": "prod",
"aws_access_key": "aws_access_key",
"aws_secret_key": "aws_secret_key",
"aws_bucket": "meissa-configuration", "aws_bucket": "meissa-configuration",
"aws_bucket_kms_key_id": "arn:aws:kms:eu-central-1:907507348333:alias/meissa-configuration", "aws_bucket_kms_key_id": "arn:aws:kms:eu-central-1:907507348333:alias/meissa-configuration",
"aws_region": "eu-central-1", "aws_region": "eu-central-1",
@ -48,6 +50,8 @@ def test_should_calculate_backend_config():
) )
) )
assert { assert {
"access_key": "aws_access_key",
"secret_key": "aws_secret_key",
"bucket": "meissa-configuration", "bucket": "meissa-configuration",
"key": "prod/dns_aws", "key": "prod/dns_aws",
"kms_key_id": "arn:aws:kms:eu-central-1:907507348333:alias/meissa-configuration", "kms_key_id": "arn:aws:kms:eu-central-1:907507348333:alias/meissa-configuration",