• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.circleci/H20-Jan-2021-

.github/H20-Jan-2021-

examples/H20-Jan-2021-

test-fixtures/H20-Jan-2021-

.go-versionH A D20-Jan-20218

LICENSEH A D20-Jan-202115.6 KiB

README.mdH A D20-Jan-20214.7 KiB

TESTS.mdH A D20-Jan-20213.6 KiB

agent_pool.goH A D20-Jan-20215.2 KiB

agent_pool_test.goH A D20-Jan-20215.2 KiB

agent_token.goH A D20-Jan-20213.8 KiB

agent_token_test.goH A D20-Jan-20213.3 KiB

apply.goH A D20-Jan-20213.4 KiB

apply_test.goH A D20-Jan-20211.6 KiB

configuration_version.goH A D20-Jan-20216.6 KiB

configuration_version_test.goH A D20-Jan-20215.1 KiB

cost_estimate.goH A D20-Jan-20214.2 KiB

cost_estimate_test.goH A D20-Jan-20211.3 KiB

go.modH A D20-Jan-2021465

go.sumH A D20-Jan-20212.1 KiB

helper_test.goH A D20-Jan-202122.4 KiB

ip_ranges.goH A D20-Jan-20212.7 KiB

ip_ranges_test.goH A D20-Jan-2021847

logreader.goH A D20-Jan-20213.5 KiB

logreader_test.goH A D20-Jan-20215.2 KiB

notification_configuration.goH A D20-Jan-202111 KiB

notification_configuration_test.goH A D20-Jan-202110.6 KiB

oauth_client.goH A D20-Jan-20216.6 KiB

oauth_client_test.goH A D20-Jan-202110.2 KiB

oauth_token.goH A D20-Jan-20214 KiB

oauth_token_test.goH A D20-Jan-20215.7 KiB

organization.goH A D20-Jan-202111.5 KiB

organization_membership.goH A D20-Jan-20215.8 KiB

organization_membership_test.goH A D20-Jan-20216.8 KiB

organization_test.goH A D20-Jan-202111.1 KiB

organization_token.goH A D20-Jan-20212.7 KiB

organization_token_test.goH A D20-Jan-20212.5 KiB

plan.goH A D20-Jan-20213.5 KiB

plan_export.goH A D20-Jan-20214.7 KiB

plan_export_test.goH A D20-Jan-20213 KiB

plan_test.goH A D20-Jan-20211.6 KiB

policy.goH A D20-Jan-20217.4 KiB

policy_check.goH A D20-Jan-20216.1 KiB

policy_check_test.goH A D20-Jan-20216.1 KiB

policy_set.goH A D20-Jan-202112.4 KiB

policy_set_parameter.goH A D20-Jan-20216.6 KiB

policy_set_parameter_test.goH A D20-Jan-20218.9 KiB

policy_set_test.goH A D20-Jan-202115.1 KiB

policy_test.goH A D20-Jan-202111.1 KiB

registry_module.goH A D20-Jan-202112.6 KiB

registry_module_test.goH A D20-Jan-202118.5 KiB

run.goH A D20-Jan-202111.4 KiB

run_test.goH A D20-Jan-20218.6 KiB

run_trigger.goH A D20-Jan-20214.6 KiB

run_trigger_test.goH A D20-Jan-20216 KiB

ssh_key.goH A D20-Jan-20214.8 KiB

ssh_key_test.goH A D20-Jan-20216 KiB

state_version.goH A D20-Jan-20217.1 KiB

state_version_output.goH A D20-Jan-20211.3 KiB

state_version_output_test.goH A D20-Jan-20211.2 KiB

state_version_test.goH A D20-Jan-202111.7 KiB

team.goH A D20-Jan-20216.1 KiB

team_access.goH A D20-Jan-20218.5 KiB

team_access_test.goH A D20-Jan-20218.2 KiB

team_member.goH A D20-Jan-20216.9 KiB

team_member_test.goH A D20-Jan-20217 KiB

team_test.goH A D20-Jan-20215.9 KiB

team_token.goH A D20-Jan-20212.5 KiB

team_token_test.goH A D20-Jan-20212.3 KiB

testing.goH A D20-Jan-2021972

tfe.goH A D20-Jan-202121.9 KiB

tfe_test.goH A D20-Jan-202114.7 KiB

type_helpers.goH A D20-Jan-20212.1 KiB

user.goH A D20-Jan-20212.5 KiB

user_test.goH A D20-Jan-20212.1 KiB

user_token.goH A D20-Jan-20213.4 KiB

user_token_test.goH A D20-Jan-20213.2 KiB

validations.goH A D20-Jan-2021491

variable.goH A D20-Jan-20216.6 KiB

variable_test.goH A D20-Jan-202110 KiB

workspace.goH A D20-Jan-202124.2 KiB

workspace_test.goH A D20-Jan-202123.6 KiB

README.md

1Terraform Cloud/Enterprise Go Client
2==============================
3
4[![Build Status](https://circleci.com/gh/hashicorp/go-tfe.svg?style=shield)](https://circleci.com/gh/hashicorp/go-tfe)
5[![GitHub license](https://img.shields.io/github/license/hashicorp/go-tfe.svg)](https://github.com/hashicorp/go-tfe/blob/master/LICENSE)
6[![GoDoc](https://godoc.org/github.com/hashicorp/go-tfe?status.svg)](https://godoc.org/github.com/hashicorp/go-tfe)
7[![Go Report Card](https://goreportcard.com/badge/github.com/hashicorp/go-tfe)](https://goreportcard.com/report/github.com/hashicorp/go-tfe)
8[![GitHub issues](https://img.shields.io/github/issues/hashicorp/go-tfe.svg)](https://github.com/hashicorp/go-tfe/issues)
9
10The official Go API client for [Terraform Cloud/Enterprise](https://www.hashicorp.com/products/terraform).
11
12This client supports the [Terraform Cloud V2 API](https://www.terraform.io/docs/cloud/api/index.html).
13As Terraform Enterprise is a self-hosted distribution of Terraform Cloud, this
14client supports both Cloud and Enterprise use cases. In all package
15documentation and API, the platform will always be stated as 'Terraform
16Enterprise' - but a feature will be explicitly noted as only supported in one or
17the other, if applicable (rare).
18
19Note this client is in beta and is subject to change (though it is generally
20quite stable). We will indicate any breaking changes by releasing new versions.
21Until the release of v1.0, any minor version changes will indicate possible
22breaking changes. Patch version changes will be used for both bugfixes and
23non-breaking changes.
24
25## Installation
26
27Installation can be done with a normal `go get`:
28
29```
30go get -u github.com/hashicorp/go-tfe
31```
32
33## Usage
34
35```go
36import tfe "github.com/hashicorp/go-tfe"
37```
38
39Construct a new TFE client, then use the various endpoints on the client to
40access different parts of the Terraform Enterprise API. For example, to list
41all organizations:
42
43```go
44config := &tfe.Config{
45	Token: "insert-your-token-here",
46}
47
48client, err := tfe.NewClient(config)
49if err != nil {
50	log.Fatal(err)
51}
52
53orgs, err := client.Organizations.List(context.Background(), tfe.OrganizationListOptions{})
54if err != nil {
55	log.Fatal(err)
56}
57```
58
59## Documentation
60
61For complete usage of the API client, see the full [package docs](https://godoc.org/github.com/hashicorp/go-tfe).
62
63## API Coverage
64
65Most of the [Terraform Cloud/Enterprise V2 API](https://www.terraform.io/docs/cloud/api/index.html) is supported in this
66client. Currently, the separate [Admin API](https://www.terraform.io/docs/cloud/api/admin/index.html) - applicable only
67to Terraform Enterprise - is not.
68
69
70## Examples
71
72See the [examples directory](https://github.com/hashicorp/go-tfe/tree/master/examples).
73
74## Running tests
75
76See [TESTS.md](https://github.com/hashicorp/go-tfe/tree/master/TESTS.md).
77
78## Issues and Contributing
79
80If you find an issue with this package, please report an issue. If you'd like,
81we welcome any contributions. Fork this repository and submit a pull request.
82
83## Releases
84
85Documentation updates and test fixes that only touch test files don't require a release or tag. You can just merge these changes into master once they have been approved.
86
87### Creating a release
881. Merge your approved branch into master.
891. [Create a new release in GitHub](https://help.github.com/en/github/administering-a-repository/creating-releases).
90   - Click on "Releases" and then "Draft a new release"
91   - Set the `tag version` to a new tag, using [Semantic Versioning](https://semver.org/) as a guideline.
92   - Set the `target` as master.
93   - Set the `Release title` to the tag you created, `vX.Y.Z`
94   - Use the description section to describe why you're releasing and what changes you've made. You should include links to merged PRs
95   - Consider using the following headers in the description of your release:
96      - BREAKING CHANGES: Use this for any changes that aren't backwards compatible. Include details on how to handle these changes.
97      - FEATURES: Use this for any large new features added,
98      - ENHANCEMENTS: Use this for smaller new features added
99      - BUG FIXES: Use this for any bugs that were fixed.
100      - NOTES: Use this section if you need to include any additional notes on things like upgrading, upcoming deprecations, or any other information you might want to highlight.
101
102      Markdown example:
103
104      ```markdown
105      ENHANCEMENTS
106      * Add description of new small feature (#3)[link-to-pull-request]
107
108      BUG FIXES
109      * Fix description of a bug (#2)[link-to-pull-request]
110      * Fix description of another bug (#1)[link-to-pull-request]
111      ```
112
113   - Don't attach any binaries. The zip and tar.gz assets are automatically created and attached after you publish your release.
114   - Click "Publish release" to save and publish your release.
115
116