Skip to content

Commit 5241805

Browse files
committed
fix!: enforce agent names be case-insensitive-unique per-workspace
1 parent 2a248b1 commit 5241805

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

provisioner/terraform/resources.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,12 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
215215
return nil, xerrors.Errorf("decode agent attributes: %w", err)
216216
}
217217

218-
if _, ok := agentNames[tfResource.Name]; ok {
218+
// Agent names must be case-insensitive-unique, to be unambiguous in
219+
// `coder_app`s and CoderVPN DNS names.
220+
if _, ok := agentNames[strings.ToLower(tfResource.Name)]; ok {
219221
return nil, xerrors.Errorf("duplicate agent name: %s", tfResource.Name)
220222
}
221-
agentNames[tfResource.Name] = struct{}{}
223+
agentNames[strings.ToLower(tfResource.Name)] = struct{}{}
222224

223225
// Handling for deprecated attributes. login_before_ready was replaced
224226
// by startup_script_behavior, but we still need to support it for

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy