Skip to content

Commit

Permalink
[add] resource group to resource list (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
rguptar authored Jul 24, 2024
1 parent 55326ff commit 28b753d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions internal/az/group.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package az

import (
"fmt"

"github.com/Azure/InnovationEngine/internal/logging"
"github.com/Azure/InnovationEngine/internal/patterns"
"github.com/Azure/InnovationEngine/internal/shells"
Expand Down Expand Up @@ -37,3 +39,7 @@ func FindResourceGroupName(commandOutput string) string {
}
return ""
}

func BuildResourceGroupId(subscription string, resourceGroup string) string {
return fmt.Sprintf("/subscriptions/%s/resourceGroups/%s", subscription, resourceGroup)
}
2 changes: 1 addition & 1 deletion internal/engine/environments/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func AttachResourceURIsToAzureStatus(
if len(resourceURIs) > 0 {
logging.GlobalLogger.WithField("resourceURIs", resourceURIs).
Info("Found deployed resources.")
status.ResourceURIs = resourceURIs
status.ResourceURIs = append(status.ResourceURIs, resourceURIs...)
} else {
logging.GlobalLogger.Warn("No deployed resources found.")
}
Expand Down
1 change: 1 addition & 0 deletions internal/engine/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ func (e *Engine) ExecuteAndRenderSteps(steps []common.Step, env map[string]strin
if tmpResourceGroup != "" {
logging.GlobalLogger.WithField("resourceGroup", tmpResourceGroup).Info("Found resource group")
resourceGroupName = tmpResourceGroup
azureStatus.AddResourceURI(az.BuildResourceGroupId(e.Configuration.Subscription, resourceGroupName))
}
}

Expand Down

0 comments on commit 28b753d

Please sign in to comment.