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

r/tfe_workspace: Fix panic when trigger_prefixes = [""] #1214

Merged
merged 2 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ FEATURES:
* **New Data Source**: `d/tfe_registry_provider` is a new data source to retrieve information about a public or private provider in the private registry, by @tmatilai [1185](https://github.com/hashicorp/terraform-provider-tfe/pull/1185)
* **New Data Source**: `d/tfe_registry_providers` is a new data source to retrieve information about public and private providers in the private registry, by @tmatilai [1185](https://github.com/hashicorp/terraform-provider-tfe/pull/1185)

BUG FIXES:

* `r/tfe_workspace`: Fix panic on creation when `trigger_prefixes = [""]`, by @nfagerlund [1214](https://github.com/hashicorp/terraform-provider-tfe/pull/1214)

## v0.51.1

BUG FIXES:
Expand Down
4 changes: 3 additions & 1 deletion internal/provider/resource_tfe_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ func resourceTFEWorkspaceCreate(d *schema.ResourceData, meta interface{}) error

if tps, ok := d.GetOk("trigger_prefixes"); ok {
for _, tp := range tps.([]interface{}) {
options.TriggerPrefixes = append(options.TriggerPrefixes, tp.(string))
if val, ok := tp.(string); ok {
options.TriggerPrefixes = append(options.TriggerPrefixes, val)
}
}
} else {
options.TriggerPrefixes = nil
Expand Down
Loading