diff --git a/build.py b/build.py index f1a0c75..ec1bafa 100644 --- a/build.py +++ b/build.py @@ -28,7 +28,7 @@ use_plugin("python.distutils") default_task = "publish" name = "ddadevops" -version = "2.0.4" +version = "2.0.5-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/dev_requirements.txt b/dev_requirements.txt index 25d5dae..45db84f 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,14 +1,11 @@ -coverage==6.4 -flake8==5.0 +coverage==6.5 +flake8==6.0 flake8-polyfill==1.0.2 -mypy==0.971 +mypy==0.991 mypy-extensions==0.4.3 -pycodestyle==2.9.1 -pyflakes==2.5 -pylint==2.14 -pytest==7.1 -pytest-cov==3.0 +pycodestyle==2.10.0 +pyflakes==3.0.1 +pylint==2.15.8 +pytest==7.2 +pytest-cov==4.0 pytest-datafiles==2.0 -dda-python-terraform==2.0.1 -packaging==3.0 -boto3==1.24 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 13473af..c4eaf68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,6 @@ pybuilder deprecation -setuptools \ No newline at end of file +setuptools +dda-python-terraform==2.0.1 +packaging +boto3 \ No newline at end of file diff --git a/src/main/python/ddadevops/digitalocean_mixin.py b/src/main/python/ddadevops/digitalocean_mixin.py index cd881ae..d5b1fb1 100644 --- a/src/main/python/ddadevops/digitalocean_mixin.py +++ b/src/main/python/ddadevops/digitalocean_mixin.py @@ -1,9 +1,11 @@ from .devops_terraform_build import DevopsTerraformBuild -def add_digitalocean_mixin_config(config, do_api_key): +def add_digitalocean_mixin_config(config, do_api_key, do_s3_id, do_s3_secret): config.update({'DigitaloceanMixin': - {'do_api_key': do_api_key}}) + {'do_api_key': do_api_key, + 'do_s3_id': do_s3_id, + 'do_s3_secret': do_s3_secret}}) return config @@ -18,6 +20,8 @@ class DigitaloceanMixin(DevopsTerraformBuild): 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 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 fecefd8..8aa0110 100644 --- a/src/main/resources/terraform/do_mixin_vars.tf +++ b/src/main/resources/terraform/do_mixin_vars.tf @@ -1,2 +1,9 @@ variable "do_api_key" { } + +variable "spaces_access_id" { + default = null +} +variable "spaces_secret_key" { + default = null +} diff --git a/src/main/resources/terraform/do_provider.tf b/src/main/resources/terraform/do_provider.tf index 13ccad7..b9721d7 100644 --- a/src/main/resources/terraform/do_provider.tf +++ b/src/main/resources/terraform/do_provider.tf @@ -1,3 +1,5 @@ provider "digitalocean" { token = var.do_api_key + spaces_access_id = var.spaces_secret_key + spaces_secret_key = var.spaces_secret_key }