Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Terraform Version Resource #400

Merged
merged 3 commits into from
Jan 5, 2022
Merged
Changes from 1 commit
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
46 changes: 46 additions & 0 deletions website/docs/r/terraform_version.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: "tfe"
page_title: "Terraform Enterprise: tfe_terraform_version"
sidebar_current: "docs-resource-tfe-terraform-version-x"
description: |-
Manages Terraform versions
---

# tfe_terraform_version"
sebasslash marked this conversation as resolved.
Show resolved Hide resolved

Manages Terraform versions.
sebasslash marked this conversation as resolved.
Show resolved Hide resolved

## Example Usage

Basic Usage:

```hcl
resource "tfe_terraform_version" "test" {
version = "99.99.99"
sebasslash marked this conversation as resolved.
Show resolved Hide resolved
url = "https://tfe-host.com/path/to/terraform.zip"
sha = "e75ac73deb69a6b3aa667cb0b8b731aee79e2904"
}
```

## Argument Reference

The following arguments are supported:

* `version` - (Required) A semantic version string in N.N.N or N.N.N-bundleName format.
* `url` - (Required) The URL where a ZIP-compressed 64-bit Linux binary of this version can be downloaded.
* `sha` - (Required) The SHA-256 checksum of the compressed Terraform binary.
* `official` - (Optional) Whether or not this is an official release of Terraform. Defaults to "false".
* `enabled` - (Optional) Whether or not this version of Terraform is enabled for use in Terraform Cloud. Defaults to "true".
Copy link
Member

@chrisarcand chrisarcand Jan 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually an issue in the API docs, too - this is true of TFE as well as TFC, even though the docs seem to indicate TFC only, IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just update the docs to say for use in Terraform Cloud or Enterprise ?

* `beta` - (Optional) Whether or not this version of Terraform is beta pre-release. Defaults to "false".

## Attributes Reference

* `id` The ID of the Terraform version

## Import

Terraform versions can be imported; use `<TERRAFORM VERSION ID>` as the import ID. For example:
sebasslash marked this conversation as resolved.
Show resolved Hide resolved

```shell
terraform import tfe_terraform_version.test tool-L4oe7rNwn7J4E5Yr
```