feat: use app wildcards for apps if configured#4263
Merged
Conversation
jsjoeio
approved these changes
Oct 4, 2022
kylecarbs
reviewed
Oct 4, 2022
| // `coder server` or via a hostname-based dev URL. If this is set to false | ||
| // and there is no app wildcard configured on the server, the app will not | ||
| // be accessible in the UI. | ||
| RelativePath bool `json:"relative_path"` |
Member
There was a problem hiding this comment.
I think we'll have to invert this on the provider to not break current deployments.
This is defaulting to false: https://github.com/coder/terraform-provider-coder/blob/main/provider/app.go#L62, which I believe would break everyone.
eg. remove relative_path and add subdomain instead
- rename relative_path -> subdomain when referring to apps
- migrate workspace_apps.relative_path to workspace_apps.subdomain
- upgrade coder/coder terraform module to 0.5.0
kylecarbs
approved these changes
Oct 5, 2022
| Command string `mapstructure:"command"` | ||
| Subdomain bool `mapstructure:"subdomain"` | ||
| // RelativePath is deprecated in favor of Subdomain. | ||
| RelativePath *bool `mapstructure:"relative_path"` |
Member
There was a problem hiding this comment.
I don't think this needs to be a pointer anymore
Member
Author
There was a problem hiding this comment.
We prefer the deprecated value over the new value if it's set, so we have to use a pointer for this to determine if it was explicitly set or not. I will add a comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
subdomainto the WorkspaceApp struct.subdomainistrueand an app hostname is set.relative_pathand addssubdomain).relative_pathtosubdomainacross the codebase and in the database