Skip to content

Commit 8814cb0

Browse files
authored
Revert "fix: Use Terraform address to index resource + agent association (#1577)" (#1585)
This reverts commit f3fe2a0.
1 parent c034e83 commit 8814cb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

provisioner/terraform/provision.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,11 @@ func parseTerraformPlan(ctx context.Context, terraform *tfexec.Terraform, planfi
357357
if resource.Type == "coder_agent" || resource.Type == "coder_agent_instance" {
358358
continue
359359
}
360+
resourceKey := strings.Join([]string{resource.Type, resource.Name}, ".")
360361
resources = append(resources, &proto.Resource{
361362
Name: resource.Name,
362363
Type: resource.Type,
363-
Agents: findAgents(resourceDependencies, agents, resource.Address),
364+
Agents: findAgents(resourceDependencies, agents, resourceKey),
364365
})
365366
}
366367

@@ -497,7 +498,8 @@ func parseTerraformApply(ctx context.Context, terraform *tfexec.Terraform, state
497498
if resource.Type == "coder_agent" || resource.Type == "coder_agent_instance" {
498499
continue
499500
}
500-
resourceAgents := findAgents(resourceDependencies, agents, resource.Address)
501+
resourceKey := strings.Join([]string{resource.Type, resource.Name}, ".")
502+
resourceAgents := findAgents(resourceDependencies, agents, resourceKey)
501503
for _, agent := range resourceAgents {
502504
// Didn't use instance identity.
503505
if agent.GetToken() != "" {

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