A Robotframework Library wrapping the Terraform CLI
Project description
Terraform Library for Robot Framework
The TerraformLibrary is a wrapper for the Hashicorp Terraform CLI
With the integration of Terraform into Robot Framework, inputs can be passed from tests to terraform executions and outputs from
terraform script can be used in robot tests. Commands like terraform init, plan, apply and destroy can be used
with any terraform script.
https://developer.hashicorp.com/terraform/cli
Keyword Documentation
Link to the keyword documentation
Installation
If you already have Python >= 3.8 with pip installed, you can simply run:
pip install --upgrade robotframework-terraformlibrary
Getting started
Some examples how to import and use the library.
*** Settings ***
Library TerraformLibrary
*** Variables ***
${PATH_TO_TERRAFORM_SCRIPT} ${CURDIR}/terraform-script
*** Test Cases ***
Run Terraform Init
${rc} ${output} Terraform Init ${PATH_TO_TERRAFORM_SCRIPT}
Run Terraform Plan
Set TF Var my_var test_value
${rc} ${output} Terraform Plan ${PATH_TO_TERRAFORM_SCRIPT}
Should Contain ${output} Plan: 1 to add, 0 to change, 0 to destroy.
Run Terraform Apply
${rc} ${output} Terraform Apply ${PATH_TO_TERRAFORM_SCRIPT}
Should Contain ${output} Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Inspect Terraform State
${output} Get Terraform State ${PATH_TO_TERRAFORM_SCRIPT}
Should Be Equal As Strings ${output["values"]["root_module"]["resources"][0]["name"]} foo
Run Terraform Destroy
${rc} ${output} Terraform Destroy ${PATH_TO_TERRAFORM_SCRIPT}
Should Contain ${output} Destroy complete! Resources: 1 destroyed.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_terraformlibrary-0.2.0.tar.gz.
File metadata
- Download URL: robotframework_terraformlibrary-0.2.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2565b1bfa14f30f8c48de4dc06a94f5667e5123a8e9dac8beec79674be03b85d
|
|
| MD5 |
937c9248eb8708d54393902bc76ab323
|
|
| BLAKE2b-256 |
248a34e04631de7563094414c2ce059eab5753a1d40c4f2205314768cba88680
|
Provenance
The following attestation bundles were made for robotframework_terraformlibrary-0.2.0.tar.gz:
Publisher:
publish.yml on Nilsty/robotframework-terraformlibrary
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_terraformlibrary-0.2.0.tar.gz -
Subject digest:
2565b1bfa14f30f8c48de4dc06a94f5667e5123a8e9dac8beec79674be03b85d - Sigstore transparency entry: 174051191
- Sigstore integration time:
-
Permalink:
Nilsty/robotframework-terraformlibrary@a41cfc47a93a8908918634a386bc1df02dd9cfa2 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Nilsty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a41cfc47a93a8908918634a386bc1df02dd9cfa2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file robotframework_terraformlibrary-0.2.0-py3-none-any.whl.
File metadata
- Download URL: robotframework_terraformlibrary-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
299f6da572df8d8f4339b0b2dadabbaa93566a98a42bdfa32762a73d0638b0e4
|
|
| MD5 |
05fa29ade53eef2bb24234ace86f89d6
|
|
| BLAKE2b-256 |
258c46ef42ba4c39394472c5e5437d8899e3b7d27742b02cf4abd26c482939f2
|
Provenance
The following attestation bundles were made for robotframework_terraformlibrary-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Nilsty/robotframework-terraformlibrary
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_terraformlibrary-0.2.0-py3-none-any.whl -
Subject digest:
299f6da572df8d8f4339b0b2dadabbaa93566a98a42bdfa32762a73d0638b0e4 - Sigstore transparency entry: 174051194
- Sigstore integration time:
-
Permalink:
Nilsty/robotframework-terraformlibrary@a41cfc47a93a8908918634a386bc1df02dd9cfa2 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Nilsty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a41cfc47a93a8908918634a386bc1df02dd9cfa2 -
Trigger Event:
release
-
Statement type: