Skip to content

feat: preserve order of rich parameters #6689

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

Merged
merged 4 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
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
Prev Previous commit
WIP
  • Loading branch information
mtojek committed Mar 21, 2023
commit e9e4e28a2c55e8b65db8d6b8eeac2d06a3da3fa1
1 change: 0 additions & 1 deletion provisioner/terraform/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ func ConvertState(modules []*tfjson.StateModule, rawGraph string) (*State, error
tfResourcesByLabel := map[string]map[string]*tfjson.StateResource{}

// Extra array to preserve the order of rich parameters.
// Duplicated entries are not possible.
tfResourcesRichParameters := make([]*tfjson.StateResource, 0)

var findTerraformResources func(mod *tfjson.StateModule)
Expand Down
2 changes: 1 addition & 1 deletion provisioner/terraform/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func TestConvertResources(t *testing.T) {
}},
Required: true,
}, {
Name: "Example 2",
Name: "Sample",
Type: "string",
Description: "blah blah",
DefaultValue: "ok",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ terraform {
}
}

data "coder_parameter" "sample" {
name = "Sample"
type = "string"
description = "blah blah"
default = "ok"
}

data "coder_parameter" "example" {
name = "Example"
type = "string"
Expand All @@ -20,13 +27,6 @@ data "coder_parameter" "example" {
}
}

data "coder_parameter" "example2" {
name = "Example 2"
type = "string"
description = "blah blah"
default = "ok"
}

resource "coder_agent" "dev" {
os = "windows"
arch = "arm64"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.