From 7705d16c757a83d6562868fa6532e6b009e266c9 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Fri, 29 Sep 2023 10:45:30 +0100 Subject: [PATCH] Pin Teleport Terraform Provider to Teleport major version 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 --- terraform/gen/referencedocs.go.tpl | 4 ++-- terraform/reference.mdx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/terraform/gen/referencedocs.go.tpl b/terraform/gen/referencedocs.go.tpl index a91020f3d..3fa0cc601 100644 --- a/terraform/gen/referencedocs.go.tpl +++ b/terraform/gen/referencedocs.go.tpl @@ -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" } } @@ -76,4 +76,4 @@ Example: ``` {{$resource.Example}} ``` -{{end}} \ No newline at end of file +{{end}} diff --git a/terraform/reference.mdx b/terraform/reference.mdx index 60134ba70..d373d7d72 100755 --- a/terraform/reference.mdx +++ b/terraform/reference.mdx @@ -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" } } @@ -2373,3 +2373,4 @@ resource "teleport_user" "example" { } } ``` +