Skip to content

Commit 0ebcb7d

Browse files
authored
fix: Remove reliance of relative_path on subdomains (coder#4390)
This broke all relative path applications.
1 parent d275331 commit 0ebcb7d

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

provisioner/terraform/resources.go

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,13 @@ type agentAttributes struct {
2525

2626
// A mapping of attributes on the "coder_app" resource.
2727
type agentAppAttributes struct {
28-
AgentID string `mapstructure:"agent_id"`
29-
Name string `mapstructure:"name"`
30-
Icon string `mapstructure:"icon"`
31-
URL string `mapstructure:"url"`
32-
Command string `mapstructure:"command"`
33-
Subdomain bool `mapstructure:"subdomain"`
34-
// RelativePath is deprecated in favor of Subdomain. This value is a pointer
35-
// because we prefer it over Subdomain it was explicitly set.
36-
RelativePath *bool `mapstructure:"relative_path"`
37-
Healthcheck []appHealthcheckAttributes `mapstructure:"healthcheck"`
28+
AgentID string `mapstructure:"agent_id"`
29+
Name string `mapstructure:"name"`
30+
Icon string `mapstructure:"icon"`
31+
URL string `mapstructure:"url"`
32+
Command string `mapstructure:"command"`
33+
Subdomain bool `mapstructure:"subdomain"`
34+
Healthcheck []appHealthcheckAttributes `mapstructure:"healthcheck"`
3835
}
3936

4037
// A mapping of attributes on the "healthcheck" resource.
@@ -238,12 +235,7 @@ func ConvertResources(module *tfjson.StateModule, rawGraph string) ([]*proto.Res
238235
}
239236
}
240237

241-
// Default attrs.RelativePath to true if unspecified in Terraform.
242238
subdomain := attrs.Subdomain
243-
if attrs.RelativePath != nil {
244-
subdomain = !*attrs.RelativePath
245-
}
246-
247239
for _, agents := range resourceAgents {
248240
for _, agent := range agents {
249241
// Find agents with the matching ID and associate them!

0 commit comments

Comments
 (0)