Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Bug report
about: Let us know about an unexpected error, a crash, or an incorrect behavior.
labels: bug
---

<!--
Hi there,

Thank you for opening an issue! Please note that we try to keep the this issue
tracker reserved for bug reports and feature requests related to the python-tfe API
wrapper. If you know your issue relates to the HCP Terraform and Terraform Enterprise
platform itself, please contact tf-cloud@hashicorp.support. For general usage
questions, please post to our community forum: https://discuss.hashicorp.com.
-->

#### python-tfe version
<!---
What version of python-tfe are you using?
-->
```plaintext
...
```

## Description
<!-- Describe what's happening. -->

## Testing plan
<!--
1. _Describe how to replicate_
1. _the conditions under which your code performs its purpose,_
1. _including example code to run where necessary._
-->
```plaintext
...
```

#### Expected Behavior
<!--
What should have happened?
-->

#### Actual Behavior
<!--
What actually happened?
-->

#### Additional Context
<!--
Is there anything atypical about your situation that we should know? For
example: is Terraform running in a wrapper script or in a CI system? Are you
passing any unusual command line options or environment variables to opt-in to
non-default behavior?
-->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: HCP Terraform and Terraform Enterprise Troubleshooting and Feature Requests
url: https://support.hashicorp.com/hc/en-us/requests/new
about: For issues and feature requests concerning the HCP Terraform and Terraform Enterprise platform itself, please submit a HashiCorp support request or email tf-cloud@hashicorp.support
- name: Terraform Language or Workflow Questions
url: https://discuss.hashicorp.com
about: Please ask Terraform language or workflow related questions through the HashiCorp Discuss forum
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Feature request
about: Suggest a new feature or other enhancement.
labels: feature-request
---

<!--
Hi there,

Thank you for opening an issue! Please note that we try to keep the this issue tracker reserved for
bug reports and feature requests related to the python-tfe API wrapper. If you know
your issue relates to the HCP Terraform and Terraform Enterprise platform itself, please contact
tf-cloud@hashicorp.support. For general usage questions, please post to our community forum:
https://discuss.hashicorp.com.
-->


#### Use-cases
<!---
In order to properly evaluate a feature request, it is necessary to understand the use-cases for it.

Please describe below the _end goal_ you are trying to achieve that has led you to request this feature.

Please keep this section focused on the problem and not on the suggested solution. We'll get to that in a moment, below!
-->

#### Attempted Solutions
<!---
If you've already tried to solve the problem with existing features and found a limitation that prevented you from succeeding, please describe it below in as much detail as possible.

Ideally, this would include real configuration snippets that you tried, real Terraform command lines you ran, and what results you got in each case.

Please remove any sensitive information such as passwords before sharing configuration snippets and command lines.
-->

#### Proposal
<!---
If you have an idea for a way to address the problem via a change to this library, please describe it below.

In this section, it's helpful to include specific examples of how what you are suggesting might look in your code since that allows us to understand the full picture of what you are proposing.

If you don't know what you'd propose or are unsure of some details, don't worry! When we evaluate the feature request we'll be happy to help.
-->
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
64 changes: 64 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!--
Thank you for contributing to hashicorp/python-tfe! Please read docs/CONTRIBUTING.md for detailed information when preparing your change.

Here's what to expect after the pull request is opened:

The test suite contains many acceptance tests that are run against a test version of HCP Terraform, and additional testing is done against Terraform Enterprise. You can read more about running the tests against your own Terraform Enterprise environment in TESTS.md. Our CI system (Github Actions) will not test your fork until a one-time approval takes place.

Your change, depending on its impact, may be released in the following ways:

1. For impactful bug fixes, it can be released fairly quickly as a patch release.
2. For noncritical bug fixes and new features, it will be incorporated into the next minor version release.
3. For breaking changes (those changes that alter the public method signatures), more consideration must be made and alternatives may be considered, depending on upgrade difficulty and release schedule.

Please note that API features that are not generally available should not be merged/released without prior discussion with the maintainers. See docs/CONTRIBUTING Section "Adding API changes that are not generally available" for more information.

Please fill out the remaining template to assist code reviewers and testers with incorporating your change. If a section does not apply, feel free to delete it.
-->

## Description

<!-- Describe why you're making this change. -->

## Testing plan

<!--
1. _Describe how to replicate_
1. _the conditions under which your code performs its purpose,_
1. _including example code to run where necessary._
-->

## External links

<!--
_Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section._

- [API documentation](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/xxxx)
- [Related PR](https://github.com/terraform-providers/terraform-provider-tfe/pull/xxxx)

-->

## Output from tests
Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

<!--
_Please run the tests locally for any files you changes and include the output here._
-->
```
...
```

<!-- heimdall_github_prtemplate:grc-pci_dss-2024-01-05 -->
## Rollback Plan

<!--
Please outline a plan in the event changes need to be rolled back

Example: If a change needs to be reverted, we will roll out an update to the code within 7 days.
-->

## Changes to Security Controls

<!--
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
-->
136 changes: 136 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Mac specific
.DS_Store

# python specific
__pycache__
.coverage
coverage_results
.coverage*
coverage.xml
htmlcov
.venv
.pyre
.pytest_cache/

# Visual Studio Code
.vscode/
.env

# build artifacts
**/test-results/**
blu-server-coverage.tgz
.artifacts/**
dist/**
**/sqlite_test.db
.container-id
docker-artifacts/**
portal.zip
analyzer.zip
ngrok.log

# portal copy
static/server-version.txt

# other cloned repos
.repos/**


# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
.idea/
*.iml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml


### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

# Database stuff
database/postgresql-*.jar

# OS stuff
*.pid

# Profile files
profiles

# Pyenv
# .python-version is needed by setup-python GH action
# .python-version

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Cached build artifacts from the Go build system
.cache

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# OS-specific files
.DS_Store

# Repo-specific
bin/

# Generated protoset files
*.protoset

# Root vendor directory generated from the Go build system
/vendor

### Visual Studio Code ###
.vscode/*
!.vscode/settings.json
!.vscode/launch.json
!.vscode/extensions.json

# Ignore code-workspaces
*.code-workspace
/app/__pycache__/

# Terraform
terraform/local/.terraform/**
poc-terraform/.terraform
poc-terraform/terraform.tfstate*

# Proto bin generated files
protos.bin

# Local RSA keys
.local/*
11 changes: 11 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.13"
30 changes: 30 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
PyTFE - Python SDK for Terraform Enterprise/Cloud API

This package provides a Python client for interacting with the Terraform Enterprise
and Terraform Cloud APIs, similar to HashiCorp's go-tfe SDK.
"""

__version__ = "0.1.0"
__author__ = "Ansible-Tfe-Development-Team"
__email__ = "sivaselvan.i@hasicorp.com"

from .client import Client
from .config import Config
from .exceptions import (
PyTFEException,
AuthenticationError,
NotFoundError,
ValidationError,
ServerError,
)

__all__ = [
"Client",
"Config",
"PyTFEException",
"AuthenticationError",
"NotFoundError",
"ValidationError",
"ServerError",
]
Loading