func AttachResourceURIsToAzureStatus()

in internal/engine/environments/azure.go [164:189]


func AttachResourceURIsToAzureStatus(
	status *AzureDeploymentStatus,
	resourceGroupName string,
	environment string,
) {
	if !IsAzureEnvironment(environment) {
		logging.GlobalLogger.Info(
			"Not fetching resource URIs because we're not in the OCD environment.",
		)
	}

	if resourceGroupName == "" {
		logging.GlobalLogger.Warn("No resource group name found.")
		return
	}

	resourceURIs := az.FindAllDeployedResourceURIs(resourceGroupName)

	if len(resourceURIs) > 0 {
		logging.GlobalLogger.WithField("resourceURIs", resourceURIs).
			Info("Found deployed resources.")
		status.ResourceURIs = append(status.ResourceURIs, resourceURIs...)
	} else {
		logging.GlobalLogger.Warn("No deployed resources found.")
	}
}