fix do config

This commit is contained in:
jerger 2022-12-10 13:24:11 +01:00
parent a8b558ec54
commit 4d8b4164d5
4 changed files with 13 additions and 12 deletions

View file

@ -28,7 +28,7 @@ use_plugin("python.distutils")
default_task = "publish"
name = "ddadevops"
version = "2.0.5"
version = "2.0.6-dev1"
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
description = __doc__
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]

View file

@ -1,11 +1,11 @@
from .devops_terraform_build import DevopsTerraformBuild
def add_digitalocean_mixin_config(config, do_api_key, do_s3_id, do_s3_secret):
def add_digitalocean_mixin_config(config, do_api_key, do_spaces_access_id, do_spaces_secret_key):
config.update({'DigitaloceanMixin':
{'do_api_key': do_api_key,
'do_s3_id': do_s3_id,
'do_s3_secret': do_s3_secret}})
'do_spaces_access_id': do_spaces_access_id,
'do_spaces_secret_key': do_spaces_secret_key}})
return config
@ -15,13 +15,15 @@ class DigitaloceanMixin(DevopsTerraformBuild):
super().__init__(project, config)
do_mixin_config = config['DigitaloceanMixin']
self.do_api_key = do_mixin_config['do_api_key']
self.do_spaces_access_id = do_mixin_config['do_spaces_access_id']
self.do_spaces_secret_key = do_mixin_config['do_spaces_secret_key']
def project_vars(self):
ret = super().project_vars()
if self.do_api_key:
ret['do_api_key'] = self.do_api_key
ret['do_s3_id'] = self.do_api_key
ret['do_s3_secret'] = self.do_api_key
ret['do_spaces_access_id'] = self.do_api_key
ret['do_spaces_secret_key'] = self.do_api_key
return ret
def copy_build_resources_from_package(self):

View file

@ -1,9 +1,8 @@
variable "do_api_key" {
}
variable "spaces_access_id" {
default = null
variable "do_spaces_access_id" {
}
variable "spaces_secret_key" {
default = null
variable "do_spaces_secret_key" {
}

View file

@ -1,5 +1,5 @@
provider "digitalocean" {
token = var.do_api_key
spaces_access_id = var.spaces_secret_key
spaces_secret_key = var.spaces_secret_key
spaces_access_id = var.do_spaces_access_id
spaces_secret_key = var.do_spaces_secret_key
}