leverage 2.0.0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {leverage-2.0.0 → leverage-2.1.1}/PKG-INFO +13 -10
- {leverage-2.0.0 → leverage-2.1.1}/README.md +8 -6
- {leverage-2.0.0 → leverage-2.1.1}/leverage/__init__.py +1 -1
- {leverage-2.0.0 → leverage-2.1.1}/leverage/container.py +5 -5
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/credentials.py +2 -2
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/project.py +3 -2
- {leverage-2.0.0 → leverage-2.1.1}/leverage/path.py +2 -3
- {leverage-2.0.0 → leverage-2.1.1}/pyproject.toml +7 -6
- {leverage-2.0.0 → leverage-2.1.1}/LICENSE.txt +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/_internals.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/_parsing.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/_utils.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/conf.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/containers/kubectl.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/leverage.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/logger.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/__init__.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/auth.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/aws.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/kubectl.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/run.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/shell.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/tf.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/tfautomv.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/modules/utils.py +0 -0
- {leverage-2.0.0 → leverage-2.1.1}/leverage/tasks.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: leverage
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Binbash Leverage Command-Line tool.
|
|
5
5
|
Home-page: https://github.com/binbashar/leverage
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: leverage,binbash
|
|
8
8
|
Author: BinBash Inc
|
|
9
9
|
Author-email: leverage@binbash.com.ar
|
|
10
|
-
Requires-Python: >=3.9,<3.
|
|
10
|
+
Requires-Python: >=3.9,<3.14
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
20
|
Classifier: Topic :: Software Development :: Build Tools
|
|
20
21
|
Requires-Dist: boto3 (==1.33.2)
|
|
21
22
|
Requires-Dist: click (==8.0.1)
|
|
@@ -24,10 +25,10 @@ Requires-Dist: docker (==6.1.0)
|
|
|
24
25
|
Requires-Dist: dockerpty (==0.4.1)
|
|
25
26
|
Requires-Dist: docutils (==0.17.1)
|
|
26
27
|
Requires-Dist: jinja2 (==3.0.1)
|
|
27
|
-
Requires-Dist: python-hcl2 (==7.
|
|
28
|
+
Requires-Dist: python-hcl2 (==7.3.1)
|
|
28
29
|
Requires-Dist: questionary (==1.10.0)
|
|
29
30
|
Requires-Dist: requests (==2.31)
|
|
30
|
-
Requires-Dist: rich (==
|
|
31
|
+
Requires-Dist: rich (==14.1.0)
|
|
31
32
|
Requires-Dist: ruamel.yaml (==0.17.10)
|
|
32
33
|
Requires-Dist: simple-term-menu (==1.6.4)
|
|
33
34
|
Requires-Dist: yaenv (==1.5.3post1)
|
|
@@ -87,13 +88,13 @@ PROJECT=bb
|
|
|
87
88
|
MFA_ENABLED=false
|
|
88
89
|
|
|
89
90
|
# Terraform
|
|
90
|
-
|
|
91
|
+
TF_IMAGE_TAG=1.5.0-0.2.0
|
|
91
92
|
```
|
|
92
93
|
|
|
93
94
|
So, if you have created a project with version <1.8.0 and want to use it with version >=1.8.0 you should:
|
|
94
95
|
|
|
95
96
|
- remove TERRAFORM_IMAGE_NAME line
|
|
96
|
-
- update
|
|
97
|
+
- update TF_IMAGE_TAG from this form '9.9.9' to this one '9.9.9-9.9.9'.
|
|
97
98
|
|
|
98
99
|
For the second item you can check the version [here](https://hub.docker.com/r/binbash/leverage-toolbox/tags).
|
|
99
100
|
|
|
@@ -107,6 +108,7 @@ Leverage CLI explicitly supports the following Python versions:
|
|
|
107
108
|
- Python 3.10.x
|
|
108
109
|
- Python 3.11.x
|
|
109
110
|
- Python 3.12.x
|
|
111
|
+
- Python 3.13.x
|
|
110
112
|
|
|
111
113
|
These versions are not only supported but are also the only versions used in our CI/CD pipelines to ensure compatibility
|
|
112
114
|
and performance. This rigorous testing helps prevent compatibility issues and ensures that the Leverage CLI performs as
|
|
@@ -148,14 +150,15 @@ pyenv install 3.9.7
|
|
|
148
150
|
pyenv install 3.10.1
|
|
149
151
|
pyenv install 3.11.8
|
|
150
152
|
pyenv install 3.12.7
|
|
153
|
+
pyenv install 3.13.6
|
|
151
154
|
```
|
|
152
155
|
|
|
153
156
|
4. Create a virtual environment for the leverage project:
|
|
154
157
|
|
|
155
|
-
Create a virtual environment for your project using Python 3.
|
|
158
|
+
Create a virtual environment for your project using Python 3.13.x:
|
|
156
159
|
|
|
157
160
|
```bash
|
|
158
|
-
pyenv virtualenv 3.
|
|
161
|
+
pyenv virtualenv 3.13.6 leverage_py_313_venv
|
|
159
162
|
```
|
|
160
163
|
|
|
161
164
|
5. Set your virtual environment to be used in the project:
|
|
@@ -164,10 +167,10 @@ To set this virtual environment as the local environment for your project, navig
|
|
|
164
167
|
|
|
165
168
|
```bash
|
|
166
169
|
cd <path_to_leverage_project_root>
|
|
167
|
-
pyenv local
|
|
170
|
+
pyenv local leverage_py_313_venv
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
This setup commands `pyenv` to use `
|
|
173
|
+
This setup commands `pyenv` to use `leverage_py_313_venv` as the local Python version for your project directory,
|
|
171
174
|
ensuring that all Python operations within this directory use this isolated environment.
|
|
172
175
|
|
|
173
176
|
## Setting up development environment
|
|
@@ -50,13 +50,13 @@ PROJECT=bb
|
|
|
50
50
|
MFA_ENABLED=false
|
|
51
51
|
|
|
52
52
|
# Terraform
|
|
53
|
-
|
|
53
|
+
TF_IMAGE_TAG=1.5.0-0.2.0
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
So, if you have created a project with version <1.8.0 and want to use it with version >=1.8.0 you should:
|
|
57
57
|
|
|
58
58
|
- remove TERRAFORM_IMAGE_NAME line
|
|
59
|
-
- update
|
|
59
|
+
- update TF_IMAGE_TAG from this form '9.9.9' to this one '9.9.9-9.9.9'.
|
|
60
60
|
|
|
61
61
|
For the second item you can check the version [here](https://hub.docker.com/r/binbash/leverage-toolbox/tags).
|
|
62
62
|
|
|
@@ -70,6 +70,7 @@ Leverage CLI explicitly supports the following Python versions:
|
|
|
70
70
|
- Python 3.10.x
|
|
71
71
|
- Python 3.11.x
|
|
72
72
|
- Python 3.12.x
|
|
73
|
+
- Python 3.13.x
|
|
73
74
|
|
|
74
75
|
These versions are not only supported but are also the only versions used in our CI/CD pipelines to ensure compatibility
|
|
75
76
|
and performance. This rigorous testing helps prevent compatibility issues and ensures that the Leverage CLI performs as
|
|
@@ -111,14 +112,15 @@ pyenv install 3.9.7
|
|
|
111
112
|
pyenv install 3.10.1
|
|
112
113
|
pyenv install 3.11.8
|
|
113
114
|
pyenv install 3.12.7
|
|
115
|
+
pyenv install 3.13.6
|
|
114
116
|
```
|
|
115
117
|
|
|
116
118
|
4. Create a virtual environment for the leverage project:
|
|
117
119
|
|
|
118
|
-
Create a virtual environment for your project using Python 3.
|
|
120
|
+
Create a virtual environment for your project using Python 3.13.x:
|
|
119
121
|
|
|
120
122
|
```bash
|
|
121
|
-
pyenv virtualenv 3.
|
|
123
|
+
pyenv virtualenv 3.13.6 leverage_py_313_venv
|
|
122
124
|
```
|
|
123
125
|
|
|
124
126
|
5. Set your virtual environment to be used in the project:
|
|
@@ -127,10 +129,10 @@ To set this virtual environment as the local environment for your project, navig
|
|
|
127
129
|
|
|
128
130
|
```bash
|
|
129
131
|
cd <path_to_leverage_project_root>
|
|
130
|
-
pyenv local
|
|
132
|
+
pyenv local leverage_py_313_venv
|
|
131
133
|
```
|
|
132
134
|
|
|
133
|
-
This setup commands `pyenv` to use `
|
|
135
|
+
This setup commands `pyenv` to use `leverage_py_313_venv` as the local Python version for your project directory,
|
|
134
136
|
ensuring that all Python operations within this directory use this isolated environment.
|
|
135
137
|
|
|
136
138
|
## Setting up development environment
|
|
@@ -490,10 +490,10 @@ class TFContainer(SSOContainer):
|
|
|
490
490
|
if self.paths.tf_cache_dir:
|
|
491
491
|
# then mount it too into the container
|
|
492
492
|
self.environment["TF_PLUGIN_CACHE_DIR"] = self.paths.tf_cache_dir
|
|
493
|
-
# given that terraform
|
|
494
|
-
# we need to use the same directory inside the container
|
|
493
|
+
# given that opentofu/terraform uses symlinks to point from the .terraform folder
|
|
494
|
+
# into the plugin folder we need to use the same directory inside the container
|
|
495
495
|
# otherwise symlinks will be broken once outside the container
|
|
496
|
-
# which will break terraform usage outside Leverage
|
|
496
|
+
# which will break opentofu/terraform usage outside Leverage
|
|
497
497
|
self.mounts.append(Mount(source=self.paths.tf_cache_dir, target=self.paths.tf_cache_dir, type="bind"))
|
|
498
498
|
if SSH_AUTH_SOCK is not None:
|
|
499
499
|
self.mounts.append(Mount(source=SSH_AUTH_SOCK, target="/ssh-agent", type="bind"))
|
|
@@ -528,7 +528,7 @@ class TFContainer(SSOContainer):
|
|
|
528
528
|
|
|
529
529
|
@property
|
|
530
530
|
def tf_default_args(self):
|
|
531
|
-
"""Array of strings containing all valid config files for layer as parameters for Terraform"""
|
|
531
|
+
"""Array of strings containing all valid config files for layer as parameters for OpenTofu/Terraform"""
|
|
532
532
|
common_config_files = [
|
|
533
533
|
f"-var-file={self.paths.guest_config_file(common_file)}"
|
|
534
534
|
for common_file in self.paths.common_config_dir.glob("*.tfvars")
|
|
@@ -669,7 +669,7 @@ class TFContainer(SSOContainer):
|
|
|
669
669
|
raise KeyError()
|
|
670
670
|
except (KeyError, IndexError):
|
|
671
671
|
logger.error(
|
|
672
|
-
"[red]✘[/red] Malformed [bold]config.tf[/bold] file. Missing
|
|
672
|
+
"[red]✘[/red] Malformed [bold]config.tf[/bold] file. Missing backend block. In some cases you may want to skip this check by using the --skip-validation flag, e.g. the first time you initialize a tf-backend layer."
|
|
673
673
|
)
|
|
674
674
|
raise Exit(1)
|
|
675
675
|
except Exception as e:
|
|
@@ -157,7 +157,7 @@ def _ask_for_credentials_location():
|
|
|
157
157
|
{
|
|
158
158
|
"type": "select",
|
|
159
159
|
"name": "input_type",
|
|
160
|
-
"message": "Select the means by which you'll provide the
|
|
160
|
+
"message": "Select the means by which you'll provide the programmatic keys:",
|
|
161
161
|
"qmark": ">",
|
|
162
162
|
"choices": [
|
|
163
163
|
{"name": "Path to an access keys file obtained from AWS", "value": "path"},
|
|
@@ -312,7 +312,7 @@ def _load_configs_for_credentials():
|
|
|
312
312
|
env_config = AWSCLI.env_conf
|
|
313
313
|
|
|
314
314
|
terraform_config = {}
|
|
315
|
-
logger.info("Loading
|
|
315
|
+
logger.info("Loading tf common configuration.")
|
|
316
316
|
terraform_config = AWSCLI.paths.common_conf
|
|
317
317
|
|
|
318
318
|
config_values = {}
|
|
@@ -203,8 +203,9 @@ def _render_templates(template_files, config, source=TEMPLATE_DIR, destination=P
|
|
|
203
203
|
template_location = template_file.relative_to(TEMPLATES_REPO_DIR)
|
|
204
204
|
|
|
205
205
|
template = JINJA_ENV.get_template(template_location.as_posix())
|
|
206
|
-
if
|
|
206
|
+
if "terraform_image_tag" not in config:
|
|
207
207
|
config["terraform_image_tag"] = __toolbox_version__
|
|
208
|
+
|
|
208
209
|
rendered_template = template.render(config)
|
|
209
210
|
|
|
210
211
|
rendered_location = template_file.relative_to(source)
|
|
@@ -324,7 +325,7 @@ def create():
|
|
|
324
325
|
_render_project_template(config=config)
|
|
325
326
|
|
|
326
327
|
# Format the code correctly
|
|
327
|
-
logger.info("Reformatting
|
|
328
|
+
logger.info("Reformatting configuration to the standard style.")
|
|
328
329
|
|
|
329
330
|
terraform = TFContainer(get_docker_client())
|
|
330
331
|
terraform.ensure_image()
|
|
@@ -275,13 +275,12 @@ class PathsHandler:
|
|
|
275
275
|
"""Make sure the command is being run at layer level. If not, bail."""
|
|
276
276
|
path = path or self.cwd
|
|
277
277
|
if path in (self.common_config_dir, self.account_config_dir):
|
|
278
|
-
raise ExitError(1, "Currently in a configuration directory, no Terraform command can be run here.")
|
|
278
|
+
raise ExitError(1, "Currently in a configuration directory, no OpenTofu/Terraform command can be run here.")
|
|
279
279
|
|
|
280
280
|
if path in (self.root_dir, self.account_dir):
|
|
281
281
|
raise ExitError(
|
|
282
282
|
1,
|
|
283
|
-
"
|
|
284
|
-
" the root directory of an account.",
|
|
283
|
+
"This command cannot run neither in the root of the project or in" " the root directory of an account.",
|
|
285
284
|
)
|
|
286
285
|
|
|
287
286
|
if not list(path.glob("*.tf")):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "leverage"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.1.1"
|
|
4
4
|
description = "Binbash Leverage Command-Line tool."
|
|
5
5
|
authors = ["BinBash Inc <leverage@binbash.com.ar>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -17,7 +17,8 @@ classifiers = [
|
|
|
17
17
|
"Programming Language :: Python :: 3.9",
|
|
18
18
|
"Programming Language :: Python :: 3.10",
|
|
19
19
|
"Programming Language :: Python :: 3.11",
|
|
20
|
-
"Programming Language :: Python :: 3.12"
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13"
|
|
21
22
|
]
|
|
22
23
|
packages = [
|
|
23
24
|
{ include = "leverage" },
|
|
@@ -26,7 +27,7 @@ packages = [
|
|
|
26
27
|
]
|
|
27
28
|
|
|
28
29
|
[tool.poetry.dependencies]
|
|
29
|
-
python = "~3.9 || ~3.10 || ~3.11 || ~3.12"
|
|
30
|
+
python = "~3.9 || ~3.10 || ~3.11 || ~3.12 || ~3.13"
|
|
30
31
|
click = "8.0.1"
|
|
31
32
|
yaenv = "1.5.3post1"
|
|
32
33
|
"ruamel.yaml" = "0.17.10"
|
|
@@ -34,11 +35,11 @@ jinja2 = "3.0.1"
|
|
|
34
35
|
docker = "6.1.0"
|
|
35
36
|
dockerpty = "0.4.1"
|
|
36
37
|
questionary = "1.10.0"
|
|
37
|
-
python-hcl2 = "7.
|
|
38
|
+
python-hcl2 = "7.3.1"
|
|
38
39
|
boto3 = "1.33.2"
|
|
39
40
|
configupdater = "3.2"
|
|
40
41
|
docutils = "0.17.1"
|
|
41
|
-
rich = "
|
|
42
|
+
rich = "14.1.0"
|
|
42
43
|
requests = "2.31"
|
|
43
44
|
simple-term-menu = "1.6.4"
|
|
44
45
|
|
|
@@ -46,7 +47,7 @@ simple-term-menu = "1.6.4"
|
|
|
46
47
|
pylint = "2.8.3"
|
|
47
48
|
pytest = "8.3.3"
|
|
48
49
|
pytest-cov = "6.0.0"
|
|
49
|
-
twine = "
|
|
50
|
+
twine = "6.1.0"
|
|
50
51
|
black = "23.3.0"
|
|
51
52
|
pre-commit = "3.5.0"
|
|
52
53
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|