Skip to content

Commit

Permalink
fix: resource group output variable rename for azd
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldotyu committed Apr 17, 2024
1 parent c917c64 commit 074bae3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-azd-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
id: kubectl_get_service
run: |
eval $(azd env get-values)
az aks get-credentials --resource-group $AZURE_RESOURCEGROUP_NAME --name $AZURE_AKS_CLUSTER_NAME
az aks get-credentials --resource-group $AZURE_RESOURCE_GROUP --name $AZURE_AKS_CLUSTER_NAME
storeAdminIp=$(kubectl get service store-admin -n $AZURE_AKS_NAMESPACE -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
while [ -z "$storeAdminIp" ]; do
sleep 60
Expand Down
2 changes: 1 addition & 1 deletion azd-hooks/predeploy.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env pwsh

az aks get-credentials --resource-group ${AZURE_RESOURCEGROUP_NAME} --name ${AZURE_AKS_CLUSTER_NAME} --overwrite-existing
az aks get-credentials --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_AKS_CLUSTER_NAME} --overwrite-existing

###########################################################
# Create the custom-values.yaml file with base images
Expand Down
2 changes: 1 addition & 1 deletion azd-hooks/predeploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

az aks get-credentials --resource-group ${AZURE_RESOURCEGROUP_NAME} --name ${AZURE_AKS_CLUSTER_NAME} --overwrite-existing
az aks get-credentials --resource-group ${AZURE_RESOURCE_GROUP} --name ${AZURE_AKS_CLUSTER_NAME} --overwrite-existing

##########################################################
# Create the custom-values.yaml file with base images
Expand Down
2 changes: 1 addition & 1 deletion docs/azd.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ This will take a few minutes to complete.
## Validate the deployment

Once the deployment is complete, you should see a list of outputs that show the resources that were created. Make a note of the value for `AZURE_RESOURCEGROUP_NAME`. Open the [Azure Portal](https://portal.azure.com), and navigate to the resource group. You should see an AKS cluster. Click on the AKS resource to open it. In the Kubernetes resources section, click on the Workloads tab. You will see the application deployments in the pets namespace. Next, click on the Services and ingresses tab. You will see the Kubernetes Services that are deployed in your Kubernetes cluster. For the store-admin and store-front services, you'll notice that the Type is LoadBalancer. This means that the services are exposed to the internet via public IP addresses. You can click on the External IP to open the app in your browser.
Once the deployment is complete, you should see a list of outputs that show the resources that were created. Make a note of the value for `AZURE_RESOURCE_GROUP`. Open the [Azure Portal](https://portal.azure.com), and navigate to the resource group. You should see an AKS cluster. Click on the AKS resource to open it. In the Kubernetes resources section, click on the Workloads tab. You will see the application deployments in the pets namespace. Next, click on the Services and ingresses tab. You will see the Kubernetes Services that are deployed in your Kubernetes cluster. For the store-admin and store-front services, you'll notice that the Type is LoadBalancer. This means that the services are exposed to the internet via public IP addresses. You can click on the External IP to open the app in your browser.

If you deployed an Azure Service Bus, navigate to the resource and use Azure Service Bus explorer to check for order messages.

Expand Down
4 changes: 2 additions & 2 deletions infra/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ param location string
// "resourceGroupName": {
// "value": "myGroupName"
// }
param k8s_namespace string = 'default'
param k8s_namespace string = 'pets'
param resourceGroupName string = ''
param openAiServiceName string = ''
param openAiModelName string = 'gpt-35-turbo'
Expand Down Expand Up @@ -228,7 +228,7 @@ module acrPullRoleAssignment './core/security/registry-access.bicep' = if(deploy
}

// outputs data
output AZURE_RESOURCEGROUP_NAME string = rg.name
output AZURE_RESOURCE_GROUP string = rg.name
output AZURE_AKS_CLUSTER_NAME string = kubernetes.outputs.clusterName
output AZURE_OPENAI_MODEL_NAME string = openAiModelName
output AZURE_OPENAI_ENDPOINT string = openAi.outputs.endpoint
Expand Down
2 changes: 1 addition & 1 deletion infra/terraform/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ output "AZURE_RESOURCENAME_SUFFIX" {
value = local.name
}

output "AZURE_RESOURCEGROUP_NAME" {
output "AZURE_RESOURCE_GROUP" {
value = azurerm_resource_group.example.name
}

Expand Down

0 comments on commit 074bae3

Please sign in to comment.