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

..03-May-2022-

.circleci/H18-May-2021-4232

.github/H18-May-2021-3219

examples/H18-May-2021-8158

test-fixtures/H18-May-2021-3230

.go-versionH A D18-May-20217 21

LICENSEH A D18-May-202115.6 KiB355256

README.mdH A D18-May-20214.4 KiB10979

TESTS.mdH A D18-May-20214 KiB7959

admin_organization.goH A D18-May-20215.1 KiB151100

admin_organization_test.goH A D18-May-20217.7 KiB232179

admin_run.goH A D18-May-20214.1 KiB13997

admin_run_test.goH A D18-May-20218.5 KiB306242

admin_setting.goH A D18-May-2021958 2719

admin_setting_cost_estimation.goH A D18-May-20213.2 KiB8561

admin_setting_cost_estimation_test.goH A D18-May-2021974 3929

admin_setting_customization.goH A D18-May-20212.4 KiB7551

admin_setting_customization_test.goH A D18-May-20211.6 KiB5543

admin_setting_general.goH A D18-May-20213.6 KiB8561

admin_setting_general_test.goH A D18-May-20213.1 KiB8166

admin_setting_saml.goH A D18-May-20214.2 KiB11482

admin_setting_saml_test.goH A D18-May-20212 KiB7560

admin_setting_smtp.goH A D18-May-20212.9 KiB10373

admin_setting_smtp_test.goH A D18-May-2021987 4433

admin_setting_twilio.goH A D18-May-20212.7 KiB9159

admin_setting_twilio_test.goH A D18-May-2021846 3928

admin_terraform_version.goH A D18-May-20215.3 KiB177121

admin_terraform_version_test.goH A D18-May-20214.2 KiB155128

admin_user.goH A D18-May-20216 KiB223145

admin_user_test.goH A D18-May-20214.3 KiB171130

admin_workspace.goH A D18-May-20213.2 KiB11975

admin_workspace_test.goH A D18-May-20217.3 KiB246198

agent_pool.goH A D18-May-20215.2 KiB205133

agent_pool_test.goH A D18-May-20215.4 KiB207157

agent_token.goH A D18-May-20213.8 KiB14594

agent_token_test.goH A D18-May-20213.5 KiB133104

apply.goH A D18-May-20213.5 KiB13295

apply_test.goH A D18-May-20213 KiB11392

configuration_version.goH A D18-May-20216.6 KiB208129

configuration_version_test.goH A D18-May-20216.6 KiB239187

cost_estimate.goH A D18-May-20214.2 KiB13193

cost_estimate_test.goH A D18-May-20212.9 KiB10387

errors.goH A D18-May-20213.5 KiB10231

go.modH A D18-May-2021462 1613

go.sumH A D18-May-20212 KiB2322

helper_test.goH A D18-May-202123.9 KiB1,002812

ip_ranges.goH A D18-May-20212.6 KiB9761

ip_ranges_test.goH A D18-May-2021869 3831

logreader.goH A D18-May-20213.5 KiB14499

logreader_test.goH A D18-May-20215.6 KiB263228

notification_configuration.goH A D18-May-202111.3 KiB319197

notification_configuration_test.goH A D18-May-202110.6 KiB319255

oauth_client.goH A D18-May-20216.7 KiB211140

oauth_client_test.goH A D18-May-202110.3 KiB338271

oauth_token.goH A D18-May-20214.1 KiB15196

oauth_token_test.goH A D18-May-20215.8 KiB193151

organization.goH A D18-May-202111.6 KiB373243

organization_membership.goH A D18-May-20215.9 KiB183117

organization_membership_test.goH A D18-May-20216.8 KiB223166

organization_test.goH A D18-May-202113 KiB444356

organization_token.goH A D18-May-20212.6 KiB9966

organization_token_test.goH A D18-May-20212.5 KiB9473

plan.goH A D18-May-20214.2 KiB162116

plan_export.goH A D18-May-20214.8 KiB176117

plan_export_test.goH A D18-May-20214.2 KiB160130

plan_test.goH A D18-May-20213.7 KiB138115

policy.goH A D18-May-20217.5 KiB287189

policy_check.goH A D18-May-20216.2 KiB222155

policy_check_test.goH A D18-May-20218.2 KiB271219

policy_set.goH A D18-May-202112.5 KiB415264

policy_set_parameter.goH A D18-May-20216.8 KiB231151

policy_set_parameter_test.goH A D18-May-20219.1 KiB301232

policy_set_test.goH A D18-May-202116.2 KiB573459

policy_test.goH A D18-May-202114.5 KiB518418

registry_module.goH A D18-May-202113.6 KiB462347

registry_module_test.goH A D18-May-202122.5 KiB657553

run.goH A D18-May-202112.4 KiB371233

run_test.goH A D18-May-202112.4 KiB431332

run_trigger.goH A D18-May-20214.6 KiB178118

run_trigger_test.goH A D18-May-20216 KiB220171

ssh_key.goH A D18-May-20214.8 KiB199127

ssh_key_test.goH A D18-May-20216 KiB223174

state_version.goH A D18-May-20217.1 KiB248162

state_version_output.goH A D18-May-20211.3 KiB5236

state_version_output_test.goH A D18-May-20211.2 KiB5438

state_version_test.goH A D18-May-202111.8 KiB420319

team.goH A D18-May-20216.5 KiB232148

team_access.goH A D18-May-20218.7 KiB275176

team_access_test.goH A D18-May-20218.8 KiB327254

team_member.goH A D18-May-20216.9 KiB252186

team_member_test.goH A D18-May-20217.5 KiB274206

team_test.goH A D18-May-20218.3 KiB315256

team_token.goH A D18-May-20212.5 KiB10067

team_token_test.goH A D18-May-20212.4 KiB9976

testing.goH A D18-May-2021962 3723

tfe.goH A D18-May-202122.5 KiB746489

tfe_test.goH A D18-May-202118.3 KiB677572

type_helpers.goH A D18-May-20212.2 KiB8249

user.goH A D18-May-20212.6 KiB9455

user_test.goH A D18-May-20212.2 KiB9374

user_token.goH A D18-May-20213.4 KiB13691

user_token_test.goH A D18-May-20213.2 KiB127104

validations.goH A D18-May-2021491 2011

variable.goH A D18-May-20216.8 KiB245154

variable_test.goH A D18-May-202110.1 KiB328259

workspace.goH A D18-May-202131.3 KiB934594

workspace_test.goH A D18-May-202134.8 KiB1,091884

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://pkg.go.dev/github.com/hashicorp/go-tfe).
62
63## Examples
64
65See the [examples directory](https://github.com/hashicorp/go-tfe/tree/master/examples).
66
67## Running tests
68
69See [TESTS.md](https://github.com/hashicorp/go-tfe/tree/master/TESTS.md).
70
71## Issues and Contributing
72
73If you find an issue with this package, please report an issue. If you'd like,
74we welcome any contributions. Fork this repository and submit a pull request.
75
76## Releases
77
78Documentation 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.
79
80### Creating a release
811. Merge your approved branch into master.
821. [Create a new release in GitHub](https://help.github.com/en/github/administering-a-repository/creating-releases).
83   - Click on "Releases" and then "Draft a new release"
84   - Set the `tag version` to a new tag, using [Semantic Versioning](https://semver.org/) as a guideline.
85   - Set the `target` as master.
86   - Set the `Release title` to the tag you created, `vX.Y.Z`
87   - Use the description section to describe why you're releasing and what changes you've made. You should include links to merged PRs
88   - Consider using the following headers in the description of your release:
89      - BREAKING CHANGES: Use this for any changes that aren't backwards compatible. Include details on how to handle these changes.
90      - FEATURES: Use this for any large new features added,
91      - ENHANCEMENTS: Use this for smaller new features added
92      - BUG FIXES: Use this for any bugs that were fixed.
93      - 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.
94
95      Markdown example:
96
97      ```markdown
98      ENHANCEMENTS
99      * Add description of new small feature (#3)[link-to-pull-request]
100
101      BUG FIXES
102      * Fix description of a bug (#2)[link-to-pull-request]
103      * Fix description of another bug (#1)[link-to-pull-request]
104      ```
105
106   - Don't attach any binaries. The zip and tar.gz assets are automatically created and attached after you publish your release.
107   - Click "Publish release" to save and publish your release.
108
109