diff --git a/build.py b/build.py index da8d7a8..b76858f 100644 --- a/build.py +++ b/build.py @@ -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")] diff --git a/src/main/python/ddadevops/digitalocean_mixin.py b/src/main/python/ddadevops/digitalocean_mixin.py index d5b1fb1..5dad381 100644 --- a/src/main/python/ddadevops/digitalocean_mixin.py +++ b/src/main/python/ddadevops/digitalocean_mixin.py @@ -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): diff --git a/src/main/resources/terraform/do_mixin_vars.tf b/src/main/resources/terraform/do_mixin_vars.tf index 8aa0110..1a94882 100644 --- a/src/main/resources/terraform/do_mixin_vars.tf +++ b/src/main/resources/terraform/do_mixin_vars.tf @@ -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" { } diff --git a/src/main/resources/terraform/do_provider.tf b/src/main/resources/terraform/do_provider.tf index b9721d7..308e5f3 100644 --- a/src/main/resources/terraform/do_provider.tf +++ b/src/main/resources/terraform/do_provider.tf @@ -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 }