================
🚀 Description
-----------
`--terraform-dir` で指定したディレクトリにある Terraform で作成されるリソースを動的に pytest の fixture として自動で定義してくれる pluginです
🚀 Install
-------
github から引っ張ってきて。
```sh
pip install pytest-terraform-fixture
```
🚀 Usage
-----
Terraform で作成したいリソースを記述する (ここでは `instance_a` のリソースを定義したとする)
```terraform
provider "nifcloud" {
access_key = "xxxxx"
secret_key = "yyyyy"
region = "jp-east-1"
endpoint = "jp-east-1.conputing.api.nifcloud.com"
}
resource "nifcloud_instance" "instance_a" {
instance_id = "hogehogea"
image_id = "89"
key_name = "ssh_key"
instance_type = "large"
description = "pytest-terraform"
availability_zone = "east-11"
disable_api_termination = "false"
ip_type = "none"
}
```
pytest で `instance_a` をリソースを使うテストを作成します (自動的に `instance_a` をfixutreとして定義してくれる)
```python
import pytest
from python_terraform import Terraform
def test_terraform_fixture(instance_a):
# instance_a を作成するテスト
assert True
```
後は、 `*.tf` のディレクトリを指定して実行
```sh
pytest --terraform-dir={実施したい *.tf をもつディレクトリ}
```
🚀 Requirements
------------
このプロジェクトを実行するには以下が必要です:
* [python](https://www.python.org/) 3.4.+
* [terraform](https://www.terraform.io) 0.11.+
🚀 Contributing
------------
PR歓迎してます
🚀 Support and Migration
---------------------
特に無し
🚀 License
-------
- [MIT License](http://petitviolet.mit-license.org/)
Metadata
Release files for pytest-terraform-fixture 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest-terraform-fixture-0.1.2.tar.gz | 4.1 kB | Without provenance | Details for pytest-terraform-fixture-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_terraform_fixture-0.1.2-py3.6.egg | Legacy Egg format | - | - | Details for pytest_terraform_fixture-0.1.2-py3.6.egg |
Total release size: 10.3 kB
Release files / pytest-terraform-fixture-0.1.2.tar.gz
| Download URL | pytest-terraform-fixture-0.1.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9349947173bb96f54b9b9f15f6be6d38ef51f52dfa7deabc66e4d6663e486a0d
|
|
BLAKE2b-256 checksum How to use checksums |
dac93ffd69cd3135127a01feb4b3538bab7de135d3120a6a5a6fde65c1d571bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.12.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Release files / pytest_terraform_fixture-0.1.2-py3.6.egg
| Download URL | pytest_terraform_fixture-0.1.2-py3.6.egg |
|---|---|
| Size | 6.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7edfc00257874f5a364f0b363f146f7ff1c2798108ce7fd1fbc4be6d4def6397
|
|
BLAKE2b-256 checksum How to use checksums |
7c732fcee367e71b6fd18603105710098ffd9ea809c890fb4187e7a9d7014ad1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.12.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Security for pytest-terraform-fixture 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.