Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Pin Teleport Terraform Provider to Teleport major version (#937)
Browse files Browse the repository at this point in the history
The previous constrain `>= (=teleport.version=)` allows Terraform to pick any version bigger than the specified version. This is a problem because `>= 12.0.0` can actually select `14.0.0` which breaks our client guarantees when connecting to Auth server.

This PR forces Terraform to pick any version `>=12.0.0` and `< 13.0.0`. The pessimist version constrain prevents Terraform provider to use versions outside of the specified major version.

Signed-off-by: Tiago Silva <[email protected]>
  • Loading branch information
tigrato authored Oct 4, 2023
1 parent 0d5ec8d commit 7373912
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions terraform/gen/referencedocs.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Add the following configuration section to your `terraform` configuration block:
terraform {
required_providers {
teleport = {
version = ">= (=teleport.version=)"
version = "~> (=teleport.major_version=).0"
source = "terraform.releases.teleport.dev/gravitational/teleport"
}
}
Expand Down Expand Up @@ -76,4 +76,4 @@ Example:
```
{{$resource.Example}}
```
{{end}}
{{end}}
3 changes: 2 additions & 1 deletion terraform/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Add the following configuration section to your `terraform` configuration block:
terraform {
required_providers {
teleport = {
version = ">= (=teleport.version=)"
version = "~> (=teleport.major_version=).0"
source = "terraform.releases.teleport.dev/gravitational/teleport"
}
}
Expand Down Expand Up @@ -2373,3 +2373,4 @@ resource "teleport_user" "example" {
}
}
```

0 comments on commit 7373912

Please sign in to comment.