Skip to content

Instantly share code, notes, and snippets.

@ivanthelad
Created November 19, 2024 08:00
Show Gist options
  • Save ivanthelad/c9d42514cb5aecb5324257d7d5496470 to your computer and use it in GitHub Desktop.
Save ivanthelad/c9d42514cb5aecb5324257d7d5496470 to your computer and use it in GitHub Desktop.
─> ./deploy.sh
privateaca-bbce germanywestcentral aca-bbce aca-bbce-vnet
Create a resource group
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce
location: germanywestcentral
managedBy: null
name: privateaca-bbce
properties:
provisioningState: Succeeded
tags: null
type: Microsoft.Resources/resourceGroups
Create a log analytics workspace
createdDate: '2024-11-18T19:05:14.7292436Z'
customerId: be7f4269-aec5-46ae-bbbd-f7bf18c410de
etag: '"0000c89a-0000-1500-0000-673b8fea0000"'
features:
enableLogAccessUsingOnlyResourcePermissions: true
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.OperationalInsights/workspaces/privateaca-bbce
location: germanywestcentral
modifiedDate: '2024-11-18T19:05:14.7292436Z'
name: privateaca-bbce
provisioningState: Creating
publicNetworkAccessForIngestion: Enabled
publicNetworkAccessForQuery: Enabled
resourceGroup: privateaca-bbce
retentionInDays: 30
sku:
lastSkuUpdate: '2024-11-18T19:05:14.7292436Z'
name: PerGB2018
type: Microsoft.OperationalInsights/workspaces
workspaceCapping:
dailyQuotaGb: -1.0
dataIngestionStatus: RespectQuota
quotaNextResetTime: '2024-11-18T23:00:00Z'
Create a frontdoor profile
| Running ..
/ Running ..
- Running ..
\ Running ..
| Running ..
extendedProperties: {}
frontDoorId: 6bca71ff-46e8-4297-af8d-f3e34e02ed9c
id: /subscriptions/$subscription/resourcegroups/privateaca-bbce/providers/Microsoft.Cdn/profiles/frontdoor-bbce
kind: frontdoor
location: Global
name: frontdoor-bbce
originResponseTimeoutSeconds: 30
provisioningState: Succeeded
resourceGroup: privateaca-bbce
resourceState: Active
sku:
name: Premium_AzureFrontDoor
tags: {}
type: Microsoft.Cdn/profiles
Configure the log analytics workspace diagnostic settings
usage error: --resource ID | --resource NAME --resource-group NAME --resource-type TYPE [--resource-parent PARENT] [--resource-namespace NAMESPACE]
Create an endpoint. An endpoint is the entry point for your application. It is the URL that you use to access your application.
deploymentStatus: NotStarted
enabledState: Enabled
hostName: default-endpointbbce-frh3f4hnfah5ebfp.b01.azurefd.net
id: /subscriptions/$subscription/resourcegroups/privateaca-bbce/providers/Microsoft.Cdn/profiles/frontdoor-bbce/afdendpoints/default-endpointbbce
location: Global
name: default-endpointbbce
provisioningState: Succeeded
resourceGroup: privateaca-bbce
tags: {}
type: Microsoft.Cdn/profiles/afdendpoints
Create an origin group and add origins to it. An origin group is a collection of origins that you want to route traffic to.
deploymentStatus: NotStarted
id: /subscriptions/$subscription/resourcegroups/privateaca-bbce/providers/Microsoft.Cdn/profiles/frontdoor-bbce/origingroups/default-origin-group
loadBalancingSettings:
additionalLatencyInMilliseconds: 50
sampleSize: 4
successfulSamplesRequired: 3
name: default-origin-group
provisioningState: Succeeded
resourceGroup: privateaca-bbce
sessionAffinityState: Disabled
type: Microsoft.Cdn/profiles/origingroups
Create a virtual network and subnet
newVNet:
addressSpace:
addressPrefixes:
- 10.0.0.0/16
enableDdosProtection: false
etag: W/"f1ea1f32-9dcd-4f33-a97b-c762ea214c42"
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/virtualNetworks/aca-bbce-vnet
location: germanywestcentral
name: aca-bbce-vnet
privateEndpointVNetPolicies: Disabled
provisioningState: Succeeded
resourceGroup: privateaca-bbce
resourceGuid: 0b882e44-e6e8-4bd8-85d2-4ba8cb374ec4
subnets: []
type: Microsoft.Network/virtualNetworks
virtualNetworkPeerings: []
Create a subnet
addressPrefix: 10.0.0.0/23
delegations: []
etag: W/"9ffedb62-5b38-4b7e-939a-01164909dd4e"
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/virtualNetworks/aca-bbce-vnet/subnets/infrastructure-subnet
name: infrastructure-subnet
privateEndpointNetworkPolicies: Disabled
privateLinkServiceNetworkPolicies: Enabled
provisioningState: Succeeded
resourceGroup: privateaca-bbce
type: Microsoft.Network/virtualNetworks/subnets
Update the subnet to allow the environment to be delegated to it
addressPrefix: 10.0.0.0/23
delegations:
- actions:
- Microsoft.Network/virtualNetworks/subnets/join/action
etag: W/"ef559c06-5713-4ae4-bead-82271d584126"
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/virtualNetworks/aca-bbce-vnet/subnets/infrastructure-subnet/delegations/0
name: '0'
provisioningState: Succeeded
resourceGroup: privateaca-bbce
serviceName: Microsoft.App/environments
type: Microsoft.Network/virtualNetworks/subnets/delegations
etag: W/"ef559c06-5713-4ae4-bead-82271d584126"
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/virtualNetworks/aca-bbce-vnet/subnets/infrastructure-subnet
name: infrastructure-subnet
privateEndpointNetworkPolicies: Disabled
privateLinkServiceNetworkPolicies: Enabled
provisioningState: Succeeded
resourceGroup: privateaca-bbce
type: Microsoft.Network/virtualNetworks/subnets
Create an ACA environment
Argument '--infrastructure-resource-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
The behavior of this command has been altered by the following extension: containerapp
No Log Analytics workspace provided.
Generating a Log Analytics workspace with name "workspace-privateacabbceOi3X"
\ Running ..
Container Apps environment created. To deploy a container app, use: az containerapp create --help
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.App/managedEnvironments/aca-bbce
location: Germany West Central
name: aca-bbce
properties:
appInsightsConfiguration: null
appLogsConfiguration:
destination: log-analytics
logAnalyticsConfiguration:
customerId: 215bde46-8f87-427d-9e20-2e23131b7e62
dynamicJsonColumns: false
sharedKey: null
customDomainConfiguration:
certificateKeyVaultProperties: null
certificatePassword: null
certificateValue: null
customDomainVerificationId: 95138C81DEFB733A89EA5239C02E1A5E8268B44C5548BB405419A37670A703E0
dnsSuffix: null
expirationDate: null
subjectName: null
thumbprint: null
daprAIConnectionString: null
daprAIInstrumentationKey: null
daprConfiguration:
version: 1.12.5
defaultDomain: nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
eventStreamEndpoint: https://germanywestcentral.azurecontainerapps.dev/subscriptions/$subscription/resourceGroups/privateaca-bbce/managedEnvironments/aca-bbce/eventstream
infrastructureResourceGroup: privateaca-bbce-managed
kedaConfiguration:
version: 2.15.1
openTelemetryConfiguration: null
peerAuthentication:
mtls:
enabled: false
peerTrafficConfiguration:
encryption:
enabled: false
provisioningState: Succeeded
publicNetworkAccess: Disabled
staticIp: 10.0.1.131
vnetConfiguration:
dockerBridgeCidr: null
infrastructureSubnetId: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/virtualNetworks/aca-bbce-vnet/subnets/infrastructure-subnet
internal: true
platformReservedCidr: null
platformReservedDnsIP: null
workloadProfiles:
- name: Consumption
workloadProfileType: Consumption
zoneRedundant: false
resourceGroup: privateaca-bbce
systemData:
createdAt: '2024-11-18T19:07:53.1376303'
createdBy: $email
createdByType: User
lastModifiedAt: '2024-11-18T19:07:53.1376303'
lastModifiedBy: $email
lastModifiedByType: User
type: Microsoft.App/managedEnvironments
WARNING: The behavior of this command has been altered by the following extension: containerapp
WARNING: The behavior of this command has been altered by the following extension: containerapp
CONTAINERAPPS_ENVIRONMENT_ID = /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.App/managedEnvironments/aca-bbce
ENVIRONMENT_DEFAULT_DOMAIN = nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
WARNING: The behavior of this command has been altered by the following extension: containerapp
CONTAINERAPPS_ENVIRONMENT_ID = /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.App/managedEnvironments/aca-bbce
ENVIRONMENT_DEFAULT_DOMAIN = nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
ENVIRONMENT_STATIC_IP = 10.0.1.131
VNET_ID = /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/virtualNetworks/aca-bbce-vnet
Create a private DNS zone
etag: 3a6b9e33-7f27-49d9-a60d-42e52f6d3c64
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/privateDnsZones/nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
location: global
maxNumberOfRecordSets: 25000
maxNumberOfVirtualNetworkLinks: 1000
maxNumberOfVirtualNetworkLinksWithRegistration: 100
name: nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
numberOfRecordSets: 1
numberOfVirtualNetworkLinks: 0
numberOfVirtualNetworkLinksWithRegistration: 0
provisioningState: Succeeded
resourceGroup: privateaca-bbce
type: Microsoft.Network/privateDnsZones
Create a virtual network link to the private DNS zone
etag: '"4d079e20-0000-0100-0000-673b91780000"'
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/privateDnsZones/nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io/virtualNetworkLinks/aca-bbce-vnet
location: global
name: aca-bbce-vnet
provisioningState: Succeeded
registrationEnabled: true
resourceGroup: privateaca-bbce
type: Microsoft.Network/privateDnsZones/virtualNetworkLinks
virtualNetwork:
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/virtualNetworks/aca-bbce-vnet
resourceGroup: privateaca-bbce
virtualNetworkLinkState: InProgress
Add a record set to the private DNS zone
aRecords:
- ipv4Address: 10.0.1.131
etag: e65456e0-d657-46c9-9b47-137debf11e77
fqdn: '*.nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io.'
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Network/privateDnsZones/nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io/A/*
isAutoRegistered: false
name: '*'
resourceGroup: privateaca-bbce
ttl: 3600
type: Microsoft.Network/privateDnsZones/A
Create a container app
The behavior of this command has been altered by the following extension: containerapp
Container app created. Access your app at https://apibbce.nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io/
apibbce.nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
...
CONTAINER_APP_FQDN = apibbce.nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
Create an origin
deploymentStatus: NotStarted
enabledState: Enabled
enforceCertificateNameCheck: true
hostName: apibbce.nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
httpPort: 80
httpsPort: 443
id: /subscriptions/$subscription/resourcegroups/privateaca-bbce/providers/Microsoft.Cdn/profiles/frontdoor-bbce/origingroups/default-origin-group/origins/default-origin-group
name: default-origin-group
originGroupName: default-origin-group
originHostHeader: apibbce.nicetree-6dd5dc88.germanywestcentral.azurecontainerapps.io
priority: 1
provisioningState: Succeeded
resourceGroup: privateaca-bbce
sharedPrivateLinkResource:
groupId: managedEnvironments
privateLink:
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.App/managedEnvironments/aca-bbce
resourceGroup: privateaca-bbce
privateLinkLocation: germanywestcentral
requestMessage: please approve
type: Microsoft.Cdn/profiles/origingroups/origins
weight: 500
Create a route
- Running ..
customDomains: []
deploymentStatus: NotStarted
enabledState: Enabled
forwardingProtocol: MatchRequest
httpsRedirect: Disabled
id: /subscriptions/$subscription/resourcegroups/privateaca-bbce/providers/Microsoft.Cdn/profiles/frontdoor-bbce/afdendpoints/default-endpointbbce/routes/bluegreen-route
linkToDefaultDomain: Enabled
name: bluegreen-route
originGroup:
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.Cdn/profiles/frontdoor-bbce/originGroups/default-origin-group
resourceGroup: privateaca-bbce
patternsToMatch:
- /*
provisioningState: Succeeded
resourceGroup: privateaca-bbce
ruleSets: []
supportedProtocols:
- Https
type: Microsoft.Cdn/profiles/afdendpoints/routes
Approve the private link connection
Private endpoint connection = /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.App/managedEnvironments/aca-bbce/privateEndpointConnections/8d371247-32da-444d-a937-7e6759373b2a-628062ee-17a0-40b4-aea2-4a8b5961a6f1
Approve the private link connection
id: /subscriptions/$subscription/resourceGroups/privateaca-bbce/providers/Microsoft.App/managedEnvironments/aca-bbce/privateEndpointConnections/8d371247-32da-444d-a937-7e6759373b2a-628062ee-17a0-40b4-aea2-4a8b5961a6f1
location: germanywestcentral
name: 8d371247-32da-444d-a937-7e6759373b2a-628062ee-17a0-40b4-aea2-4a8b5961a6f1
properties:
groupIds:
- managedEnvironments
privateEndpoint:
id: /subscriptions/c1bc5dd7-ea97-469c-89fa-8f26624902fd/resourceGroups/eafd-Prod-germanywestcentral/providers/Microsoft.Network/privateEndpoints/8d371247-32da-444d-a937-7e6759373b2a
resourceGroup: eafd-Prod-germanywestcentral
privateLinkServiceConnectionState:
actionsRequired: None
description: please approve
status: Approved
provisioningState: Succeeded
resourceGroup: privateaca-bbce
type: Microsoft.App/managedEnvironments/privateEndpointConnections
Frontdoor endpoint is: default-endpointbbce-frh3f4hnfah5ebfp.b01.azurefd.net
You can now test the deployment by running the following commands:
default= curl -s http://default-endpointbbce-frh3f4hnfah5ebfp.b01.azurefd.net/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment