From d902d859abf5194d9421830f22d3df004823263e Mon Sep 17 00:00:00 2001 From: Sebastian Rivera Date: Thu, 21 Dec 2023 16:51:33 -0500 Subject: [PATCH 1/4] Clarify GHA installation arguments --- website/docs/d/github_installation.html.markdown | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/docs/d/github_installation.html.markdown b/website/docs/d/github_installation.html.markdown index 23fcbb855..cf505ff6e 100644 --- a/website/docs/d/github_installation.html.markdown +++ b/website/docs/d/github_installation.html.markdown @@ -15,7 +15,7 @@ Use this data source to get information about the Github App Installation. ```hcl data "tfe_github_app_installation" "gha_installation" { - installation_id = 12345 + installation_id = 12345678 } ``` @@ -23,21 +23,21 @@ data "tfe_github_app_installation" "gha_installation" { ```hcl data "tfe_github_app_installation" "gha_installation" { - name = "installation_name" + name = "github_username_or_organization" } ``` ## Argument Reference -The following arguments are supported. At least one of `name`, `installation_id` must be set. +The following arguments are supported. At least one of `name`, `installation_id` must be set. + +* `installation_id` - (Optional) ID of the Github Installation. The installation ID can be found in the URL slug when visiting the installation's configuration page, e.g `https://github.com/settings/installations/12345678`. +* `name` - (Optional) Name of the Github user or organization account that installed the app. -* `installation_id` - (Optional) ID of the Github Installation as shown in Github. -* `name` - (Optional) Name of the Github Installation as shown in Github. - Must be one of: `installation_id` or `name`. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -* `id` - The internal ID of the Github Installation. This is different from the `installation_id`. \ No newline at end of file +* `id` - The internal ID of the Github Installation. This is different from the `installation_id`. From 88c1610dd4158f37857bb24d07562a49029d03bb Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Fri, 22 Dec 2023 11:14:50 -0700 Subject: [PATCH 2/4] Fixes older tfe, ws_settings always unsets execution_mode --- internal/provider/resource_tfe_workspace_settings.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/provider/resource_tfe_workspace_settings.go b/internal/provider/resource_tfe_workspace_settings.go index f8ab6653b..f6fabaff6 100644 --- a/internal/provider/resource_tfe_workspace_settings.go +++ b/internal/provider/resource_tfe_workspace_settings.go @@ -166,9 +166,11 @@ func (m unknownIfExecutionModeUnset) PlanModifyString(ctx context.Context, req p if configured.ExecutionMode.IsNull() && overwritesState[0].ExecutionMode.ValueBool() { resp.PlanValue = types.StringUnknown() } - } else if req.Path.Equal(path.Root("execution_mode")) { + } else if configured.ExecutionMode.IsNull() && req.Path.Equal(path.Root("execution_mode")) { // TFE does not support overwrites so default the execution mode to "remote" resp.PlanValue = types.StringValue("remote") + } else if configured.AgentPoolID.IsNull() && req.Path.Equal(path.Root("agent_pool_id")) { + resp.PlanValue = types.StringNull() } } From e0061914f590a4324212dc9ea1c04a6ff8fc1839 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Fri, 22 Dec 2023 11:22:55 -0700 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9b3f2d72..a4a281eb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: * Fixed default provider organization usage for `r/tfe_admin_organization_settings`, by @brandonc [1183](https://github.com/hashicorp/terraform-provider-tfe/pull/1183) +* `/r/tfe_workspace_settings`: Fix compatibility with older versions Terraform Enterprise when using agent execution by @brandonc [1193](https://github.com/hashicorp/terraform-provider-tfe/pull/1193) # v0.51.0 From d8e2c878d8bf46caa5928e2ecb05748cb8136318 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Fri, 22 Dec 2023 13:00:45 -0700 Subject: [PATCH 4/4] Update CHANGELOG.md Co-authored-by: Sebastian Rivera --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4a281eb2..de8084a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ BUG FIXES: * Fixed default provider organization usage for `r/tfe_admin_organization_settings`, by @brandonc [1183](https://github.com/hashicorp/terraform-provider-tfe/pull/1183) -* `/r/tfe_workspace_settings`: Fix compatibility with older versions Terraform Enterprise when using agent execution by @brandonc [1193](https://github.com/hashicorp/terraform-provider-tfe/pull/1193) +* `/r/tfe_workspace_settings`: Fix compatibility with older versions of Terraform Enterprise when using agent execution by @brandonc [1193](https://github.com/hashicorp/terraform-provider-tfe/pull/1193) # v0.51.0