From 89e816093afabad251e48798173c2c2a61f8f544 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 19 May 2022 11:38:46 +0100 Subject: [PATCH] Revert "fix: Use Terraform address to index resource + agent association (#1577)" This reverts commit f3fe2a08cefcdc203590df3778d354c360b733ef. --- provisioner/terraform/provision.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/provisioner/terraform/provision.go b/provisioner/terraform/provision.go index 56da18c732815..ecc493b991c56 100644 --- a/provisioner/terraform/provision.go +++ b/provisioner/terraform/provision.go @@ -357,10 +357,11 @@ func parseTerraformPlan(ctx context.Context, terraform *tfexec.Terraform, planfi if resource.Type == "coder_agent" || resource.Type == "coder_agent_instance" { continue } + resourceKey := strings.Join([]string{resource.Type, resource.Name}, ".") resources = append(resources, &proto.Resource{ Name: resource.Name, Type: resource.Type, - Agents: findAgents(resourceDependencies, agents, resource.Address), + Agents: findAgents(resourceDependencies, agents, resourceKey), }) } @@ -497,7 +498,8 @@ func parseTerraformApply(ctx context.Context, terraform *tfexec.Terraform, state if resource.Type == "coder_agent" || resource.Type == "coder_agent_instance" { continue } - resourceAgents := findAgents(resourceDependencies, agents, resource.Address) + resourceKey := strings.Join([]string{resource.Type, resource.Name}, ".") + resourceAgents := findAgents(resourceDependencies, agents, resourceKey) for _, agent := range resourceAgents { // Didn't use instance identity. if agent.GetToken() != "" { 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