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

..03-May-2022-

.circleci/H20-Jan-2021-4232

.github/H20-Jan-2021-3219

examples/H20-Jan-2021-8158

test-fixtures/H20-Jan-2021-3230

.go-versionH A D20-Jan-20218 21

LICENSEH A D20-Jan-202115.6 KiB355256

README.mdH A D20-Jan-20214.7 KiB11683

TESTS.mdH A D20-Jan-20213.6 KiB7757

agent_pool.goH A D20-Jan-20215.2 KiB206136

agent_pool_test.goH A D20-Jan-20215.2 KiB190145

agent_token.goH A D20-Jan-20213.8 KiB14696

agent_token_test.goH A D20-Jan-20213.3 KiB12196

apply.goH A D20-Jan-20213.4 KiB13396

apply_test.goH A D20-Jan-20211.6 KiB6651

configuration_version.goH A D20-Jan-20216.6 KiB209131

configuration_version_test.goH A D20-Jan-20215.1 KiB196148

cost_estimate.goH A D20-Jan-20214.2 KiB13294

cost_estimate_test.goH A D20-Jan-20211.3 KiB5039

go.modH A D20-Jan-2021465 1613

go.sumH A D20-Jan-20212.1 KiB2423

helper_test.goH A D20-Jan-202122.4 KiB975792

ip_ranges.goH A D20-Jan-20212.7 KiB9762

ip_ranges_test.goH A D20-Jan-2021847 3630

logreader.goH A D20-Jan-20213.5 KiB14499

logreader_test.goH A D20-Jan-20215.2 KiB254221

notification_configuration.goH A D20-Jan-202111 KiB320200

notification_configuration_test.goH A D20-Jan-202110.6 KiB317253

oauth_client.goH A D20-Jan-20216.6 KiB211141

oauth_client_test.goH A D20-Jan-202110.2 KiB336269

oauth_token.goH A D20-Jan-20214 KiB15197

oauth_token_test.goH A D20-Jan-20215.7 KiB190148

organization.goH A D20-Jan-202111.5 KiB373245

organization_membership.goH A D20-Jan-20215.8 KiB179115

organization_membership_test.goH A D20-Jan-20216.8 KiB223166

organization_test.goH A D20-Jan-202111.1 KiB375291

organization_token.goH A D20-Jan-20212.7 KiB10067

organization_token_test.goH A D20-Jan-20212.5 KiB9473

plan.goH A D20-Jan-20213.5 KiB13798

plan_export.goH A D20-Jan-20214.7 KiB176118

plan_export_test.goH A D20-Jan-20213 KiB11994

plan_test.goH A D20-Jan-20211.6 KiB6752

policy.goH A D20-Jan-20217.4 KiB287191

policy_check.goH A D20-Jan-20216.1 KiB223155

policy_check_test.goH A D20-Jan-20216.1 KiB201155

policy_set.goH A D20-Jan-202112.4 KiB415266

policy_set_parameter.goH A D20-Jan-20216.6 KiB231153

policy_set_parameter_test.goH A D20-Jan-20218.9 KiB288224

policy_set_test.goH A D20-Jan-202115.1 KiB530425

policy_test.goH A D20-Jan-202111.1 KiB394313

registry_module.goH A D20-Jan-202112.6 KiB418321

registry_module_test.goH A D20-Jan-202118.5 KiB528437

run.goH A D20-Jan-202111.4 KiB355228

run_test.goH A D20-Jan-20218.6 KiB312226

run_trigger.goH A D20-Jan-20214.6 KiB178119

run_trigger_test.goH A D20-Jan-20216 KiB218169

ssh_key.goH A D20-Jan-20214.8 KiB199128

ssh_key_test.goH A D20-Jan-20216 KiB220171

state_version.goH A D20-Jan-20217.1 KiB248163

state_version_output.goH A D20-Jan-20211.3 KiB5337

state_version_output_test.goH A D20-Jan-20211.2 KiB5338

state_version_test.goH A D20-Jan-202111.7 KiB417316

team.goH A D20-Jan-20216.1 KiB230148

team_access.goH A D20-Jan-20218.5 KiB275178

team_access_test.goH A D20-Jan-20218.2 KiB298231

team_member.goH A D20-Jan-20216.9 KiB252186

team_member_test.goH A D20-Jan-20217 KiB254199

team_test.goH A D20-Jan-20215.9 KiB226179

team_token.goH A D20-Jan-20212.5 KiB10067

team_token_test.goH A D20-Jan-20212.3 KiB9373

testing.goH A D20-Jan-2021972 3723

tfe.goH A D20-Jan-202121.9 KiB731475

tfe_test.goH A D20-Jan-202114.7 KiB571480

type_helpers.goH A D20-Jan-20212.1 KiB7746

user.goH A D20-Jan-20212.5 KiB9456

user_test.goH A D20-Jan-20212.1 KiB9071

user_token.goH A D20-Jan-20213.4 KiB13691

user_token_test.goH A D20-Jan-20213.2 KiB127104

validations.goH A D20-Jan-2021491 2011

variable.goH A D20-Jan-20216.6 KiB245156

variable_test.goH A D20-Jan-202110 KiB325256

workspace.goH A D20-Jan-202124.2 KiB724451

workspace_test.goH A D20-Jan-202123.6 KiB751604

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