Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.circleci/ | H | 18-May-2021 | - | 42 | 32 | |
.github/ | H | 18-May-2021 | - | 32 | 19 | |
examples/ | H | 18-May-2021 | - | 81 | 58 | |
test-fixtures/ | H | 18-May-2021 | - | 32 | 30 | |
.go-version | H A D | 18-May-2021 | 7 | 2 | 1 | |
LICENSE | H A D | 18-May-2021 | 15.6 KiB | 355 | 256 | |
README.md | H A D | 18-May-2021 | 4.4 KiB | 109 | 79 | |
TESTS.md | H A D | 18-May-2021 | 4 KiB | 79 | 59 | |
admin_organization.go | H A D | 18-May-2021 | 5.1 KiB | 151 | 100 | |
admin_organization_test.go | H A D | 18-May-2021 | 7.7 KiB | 232 | 179 | |
admin_run.go | H A D | 18-May-2021 | 4.1 KiB | 139 | 97 | |
admin_run_test.go | H A D | 18-May-2021 | 8.5 KiB | 306 | 242 | |
admin_setting.go | H A D | 18-May-2021 | 958 | 27 | 19 | |
admin_setting_cost_estimation.go | H A D | 18-May-2021 | 3.2 KiB | 85 | 61 | |
admin_setting_cost_estimation_test.go | H A D | 18-May-2021 | 974 | 39 | 29 | |
admin_setting_customization.go | H A D | 18-May-2021 | 2.4 KiB | 75 | 51 | |
admin_setting_customization_test.go | H A D | 18-May-2021 | 1.6 KiB | 55 | 43 | |
admin_setting_general.go | H A D | 18-May-2021 | 3.6 KiB | 85 | 61 | |
admin_setting_general_test.go | H A D | 18-May-2021 | 3.1 KiB | 81 | 66 | |
admin_setting_saml.go | H A D | 18-May-2021 | 4.2 KiB | 114 | 82 | |
admin_setting_saml_test.go | H A D | 18-May-2021 | 2 KiB | 75 | 60 | |
admin_setting_smtp.go | H A D | 18-May-2021 | 2.9 KiB | 103 | 73 | |
admin_setting_smtp_test.go | H A D | 18-May-2021 | 987 | 44 | 33 | |
admin_setting_twilio.go | H A D | 18-May-2021 | 2.7 KiB | 91 | 59 | |
admin_setting_twilio_test.go | H A D | 18-May-2021 | 846 | 39 | 28 | |
admin_terraform_version.go | H A D | 18-May-2021 | 5.3 KiB | 177 | 121 | |
admin_terraform_version_test.go | H A D | 18-May-2021 | 4.2 KiB | 155 | 128 | |
admin_user.go | H A D | 18-May-2021 | 6 KiB | 223 | 145 | |
admin_user_test.go | H A D | 18-May-2021 | 4.3 KiB | 171 | 130 | |
admin_workspace.go | H A D | 18-May-2021 | 3.2 KiB | 119 | 75 | |
admin_workspace_test.go | H A D | 18-May-2021 | 7.3 KiB | 246 | 198 | |
agent_pool.go | H A D | 18-May-2021 | 5.2 KiB | 205 | 133 | |
agent_pool_test.go | H A D | 18-May-2021 | 5.4 KiB | 207 | 157 | |
agent_token.go | H A D | 18-May-2021 | 3.8 KiB | 145 | 94 | |
agent_token_test.go | H A D | 18-May-2021 | 3.5 KiB | 133 | 104 | |
apply.go | H A D | 18-May-2021 | 3.5 KiB | 132 | 95 | |
apply_test.go | H A D | 18-May-2021 | 3 KiB | 113 | 92 | |
configuration_version.go | H A D | 18-May-2021 | 6.6 KiB | 208 | 129 | |
configuration_version_test.go | H A D | 18-May-2021 | 6.6 KiB | 239 | 187 | |
cost_estimate.go | H A D | 18-May-2021 | 4.2 KiB | 131 | 93 | |
cost_estimate_test.go | H A D | 18-May-2021 | 2.9 KiB | 103 | 87 | |
errors.go | H A D | 18-May-2021 | 3.5 KiB | 102 | 31 | |
go.mod | H A D | 18-May-2021 | 462 | 16 | 13 | |
go.sum | H A D | 18-May-2021 | 2 KiB | 23 | 22 | |
helper_test.go | H A D | 18-May-2021 | 23.9 KiB | 1,002 | 812 | |
ip_ranges.go | H A D | 18-May-2021 | 2.6 KiB | 97 | 61 | |
ip_ranges_test.go | H A D | 18-May-2021 | 869 | 38 | 31 | |
logreader.go | H A D | 18-May-2021 | 3.5 KiB | 144 | 99 | |
logreader_test.go | H A D | 18-May-2021 | 5.6 KiB | 263 | 228 | |
notification_configuration.go | H A D | 18-May-2021 | 11.3 KiB | 319 | 197 | |
notification_configuration_test.go | H A D | 18-May-2021 | 10.6 KiB | 319 | 255 | |
oauth_client.go | H A D | 18-May-2021 | 6.7 KiB | 211 | 140 | |
oauth_client_test.go | H A D | 18-May-2021 | 10.3 KiB | 338 | 271 | |
oauth_token.go | H A D | 18-May-2021 | 4.1 KiB | 151 | 96 | |
oauth_token_test.go | H A D | 18-May-2021 | 5.8 KiB | 193 | 151 | |
organization.go | H A D | 18-May-2021 | 11.6 KiB | 373 | 243 | |
organization_membership.go | H A D | 18-May-2021 | 5.9 KiB | 183 | 117 | |
organization_membership_test.go | H A D | 18-May-2021 | 6.8 KiB | 223 | 166 | |
organization_test.go | H A D | 18-May-2021 | 13 KiB | 444 | 356 | |
organization_token.go | H A D | 18-May-2021 | 2.6 KiB | 99 | 66 | |
organization_token_test.go | H A D | 18-May-2021 | 2.5 KiB | 94 | 73 | |
plan.go | H A D | 18-May-2021 | 4.2 KiB | 162 | 116 | |
plan_export.go | H A D | 18-May-2021 | 4.8 KiB | 176 | 117 | |
plan_export_test.go | H A D | 18-May-2021 | 4.2 KiB | 160 | 130 | |
plan_test.go | H A D | 18-May-2021 | 3.7 KiB | 138 | 115 | |
policy.go | H A D | 18-May-2021 | 7.5 KiB | 287 | 189 | |
policy_check.go | H A D | 18-May-2021 | 6.2 KiB | 222 | 155 | |
policy_check_test.go | H A D | 18-May-2021 | 8.2 KiB | 271 | 219 | |
policy_set.go | H A D | 18-May-2021 | 12.5 KiB | 415 | 264 | |
policy_set_parameter.go | H A D | 18-May-2021 | 6.8 KiB | 231 | 151 | |
policy_set_parameter_test.go | H A D | 18-May-2021 | 9.1 KiB | 301 | 232 | |
policy_set_test.go | H A D | 18-May-2021 | 16.2 KiB | 573 | 459 | |
policy_test.go | H A D | 18-May-2021 | 14.5 KiB | 518 | 418 | |
registry_module.go | H A D | 18-May-2021 | 13.6 KiB | 462 | 347 | |
registry_module_test.go | H A D | 18-May-2021 | 22.5 KiB | 657 | 553 | |
run.go | H A D | 18-May-2021 | 12.4 KiB | 371 | 233 | |
run_test.go | H A D | 18-May-2021 | 12.4 KiB | 431 | 332 | |
run_trigger.go | H A D | 18-May-2021 | 4.6 KiB | 178 | 118 | |
run_trigger_test.go | H A D | 18-May-2021 | 6 KiB | 220 | 171 | |
ssh_key.go | H A D | 18-May-2021 | 4.8 KiB | 199 | 127 | |
ssh_key_test.go | H A D | 18-May-2021 | 6 KiB | 223 | 174 | |
state_version.go | H A D | 18-May-2021 | 7.1 KiB | 248 | 162 | |
state_version_output.go | H A D | 18-May-2021 | 1.3 KiB | 52 | 36 | |
state_version_output_test.go | H A D | 18-May-2021 | 1.2 KiB | 54 | 38 | |
state_version_test.go | H A D | 18-May-2021 | 11.8 KiB | 420 | 319 | |
team.go | H A D | 18-May-2021 | 6.5 KiB | 232 | 148 | |
team_access.go | H A D | 18-May-2021 | 8.7 KiB | 275 | 176 | |
team_access_test.go | H A D | 18-May-2021 | 8.8 KiB | 327 | 254 | |
team_member.go | H A D | 18-May-2021 | 6.9 KiB | 252 | 186 | |
team_member_test.go | H A D | 18-May-2021 | 7.5 KiB | 274 | 206 | |
team_test.go | H A D | 18-May-2021 | 8.3 KiB | 315 | 256 | |
team_token.go | H A D | 18-May-2021 | 2.5 KiB | 100 | 67 | |
team_token_test.go | H A D | 18-May-2021 | 2.4 KiB | 99 | 76 | |
testing.go | H A D | 18-May-2021 | 962 | 37 | 23 | |
tfe.go | H A D | 18-May-2021 | 22.5 KiB | 746 | 489 | |
tfe_test.go | H A D | 18-May-2021 | 18.3 KiB | 677 | 572 | |
type_helpers.go | H A D | 18-May-2021 | 2.2 KiB | 82 | 49 | |
user.go | H A D | 18-May-2021 | 2.6 KiB | 94 | 55 | |
user_test.go | H A D | 18-May-2021 | 2.2 KiB | 93 | 74 | |
user_token.go | H A D | 18-May-2021 | 3.4 KiB | 136 | 91 | |
user_token_test.go | H A D | 18-May-2021 | 3.2 KiB | 127 | 104 | |
validations.go | H A D | 18-May-2021 | 491 | 20 | 11 | |
variable.go | H A D | 18-May-2021 | 6.8 KiB | 245 | 154 | |
variable_test.go | H A D | 18-May-2021 | 10.1 KiB | 328 | 259 | |
workspace.go | H A D | 18-May-2021 | 31.3 KiB | 934 | 594 | |
workspace_test.go | H A D | 18-May-2021 | 34.8 KiB | 1,091 | 884 |
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