Azure Template with UI VirtualNetworkCombo hangs in "Loading..." - azure-resource-manager

Created an Azure template with the Microsoft.Network.VirtualNetworkCombo type element. The new operation works fine. But two out of three existing Virtual Networks when selected show "Loading..." in each of the subnet dropdowns.
Screen snapshot
I cannot figure out why 2 of 3 existing Virtual Networks get stuck in the "Loading..." state. Does anyone know what would exhibit this behavior?
Update
It has something to do with adding IPv6 address space (10:8:2::/64). Virtual Networks/subnets without IPv6 address space display fine.
Perhaps it is something to do with the constraints minAddressPrefixSize "/29" specifications for the subnets?
I sure hope the answer isn't IPv6 is not supported...

I have tested in my environment it is working fine for me.
in createUiDefinition.json i have passed the below code in "steps": [ ]
{
"name": "NetoworkConfig",
"label": "NetworkSettings",
"subLabel": {
"preValidation": "Configure the storage settings",
"postValidation": "Done"
},
"bladeTitle": "Networking",
"elements": [
{
"name": "Configure Vnet Settings",
"type": "Microsoft.Network.VirtualNetworkCombo",
"label": {
"virtualNetwork": "Virtual network",
"subnets": "Subnets"
},
"toolTip": {
"virtualNetwork": "",
"subnets": ""
},
"defaultValue": {
"addressPrefixSize": "/16"
},
"constraints": {
"minAddressPrefixSize": "/16"
},
"options": {
"hideExisting": false
},
"subnets": {
"subnet1": {
"label": "First subnet",
"defaultValue": {
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/24",
"minAddressCount": 12,
"requireContiguousAddresses": true
}
},
"subnet2": {
"label": "Second subnet",
"defaultValue": {
"addressPrefixSize": "/26"
},
"constraints": {
"minAddressPrefixSize": "/26",
"minAddressCount": 8,
"requireContiguousAddresses": true
}
}
},
"visible": true
}
]
}
Output--
Reference : https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/publish-service-catalog-app?tabs=azure-powershell

Related

Creating Policy for AAS (Azure Analysis Services)

Does anyone have experience in writing Azure Policy for Analysis Services? I am stuck on getting one completed. I am attempting to create policy that enforces what IPs can be added to the public IP side. So far I have this and it does work:
{
"parameters": {
"allowedAddressRanges": {
"type": "Array",
"metadata": {
"displayName": "Address Range",
"description": "The list of allowed external IP address ranges"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.AnalysisServices/servers"
},
{
"not": {
"field": "Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*]",
"in": "[parameters('allowedAddressRanges')]"
}
}
]
},
"then": {
"effect": "audit"
}
}
}
Do I need to go further down the alias path to something like:
"Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeStart"
This is an old thread but since it hasn't been answered yet, perhaps someone can benefit from my findings. Looking at the aliases available for Azure Analysis Services we can notice the following :
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*]
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].firewallRuleName
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeStart
Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeEnd
Based on the notation above, I had to go down until "rangeStart" and "rangeEnd". This is what works for me:
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.AnalysisServices/servers"
},
{
"not": {
"anyOf": [
{
"field": "Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeStart",
"in": "[parameters('allowedAddressRanges')]"
},
{
"field": "Microsoft.AnalysisServices/servers/ipV4FirewallSettings.firewallRules[*].rangeEnd",
"in": "[parameters('allowedAddressRanges')]"
}
]
}
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny"
},
"allowedAddressRanges": {
"type": "Array",
"metadata": {
"displayName": "Address Range",
"description": "The list of allowed IP address ranges"
},
"allowedValues": [
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0"
],
"defaultValue": [
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0",
"0.0.0.0"
]
}
}
}
reference: https://learn.microsoft.com/en-us/azure/templates/microsoft.analysisservices/servers#IPv4FirewallRule

Internal server error when deploying ARM Template

I am deploying an arm template that contains the following resources
Microsoft.Storage/storageAccount
Microsoft.Sql/servers
Microsoft.Sql/servers/auditPolicies
Now everything worked until I started changing the values for the auditPolicies object. Here are the steps I took until the InternalServerError occurred.
Added the auditState property and set its value to Disabled. Deployment Successful.
Changed the auditState property to Enabled. Deployment failed. Error states that the storageAccountName is required.
Added storageAccountName and set its value to the name of the storage account. Deployment failed. Error states that storageAccountKey.
Added storageAccountKey and set its value to key1 of the storage account's keys object. Deployment failed. Internal Server Error - "An Error has occurred while saving Auditing settings, please try again later". Additionally, the errors cause the deployment to run indefinitely. Though I am not concerned about that aspect.
The following is the complete template.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"app-name-prefix": {
"type": "string",
"minLength": 1
},
"app-locations": {
"type": "array",
"minLength": 1
},
"app-friendly-names": {
"type": "array",
"minLength": 1
},
"db-user-admin-username": {
"type": "securestring"
},
"db-user-admin-password": {
"type": "securestring"
},
"database-audit-enabled": {
"defaultValue": "Enabled",
"allowedValues": [
"Enabled",
"Disabled"
],
"type": "string"
},
"storage-kind": {
"defaultValue": "BlobStorage",
"allowedValues": [
"StorageV2",
"BlobStorage"
],
"type": "string"
},
"storage-sku": {
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
],
"type": "string"
}
},
"variables": {
"db-service-name": "[concat(parameters('app-name-prefix'), '-database-service-')]",
"storage-name": "[concat(toLower(parameters('app-name-prefix')), 'auditstorage')]"
},
"resources": [
{
"name": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "[parameters('storage-sku')]"
},
"kind": "[parameters('storage-kind')]",
"apiVersion": "2018-02-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy": {
"count": "[length(parameters('app-locations'))]",
"name": "storageCopy"
},
"properties": {
"supportsHttpsTrafficOnly": true,
"accessTier": "Hot",
"encryption": {
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
},
"keySource": "Microsoft.Storage"
}
}
},
{
"type": "Microsoft.Sql/servers",
"name": "[concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()])]",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"copy": {
"name": "databaseServiceCopy",
"count": "[length(parameters('app-locations'))]"
},
"properties": {
"administratorLogin": "[parameters('db-user-admin-username')]",
"administratorLoginPassword": "[parameters('db-user-admin-password')]",
"version": "12.0"
},
"resources": [
{
"type": "auditingPolicies",
"name": "Default",
"apiVersion": "2014-04-01",
"location": "[parameters('app-locations')[copyIndex()]]",
"properties": {
"auditingState": "[parameters('database-audit-enabled')]",
"storageAccountName": "[concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()])]",
"storageAccountKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
]
}
]
}
]
}
What am I missing that will help resolve this issue? What do I need to do to stop this internal server error?
I have added the complete template as was requested by #Pete
I have found the answer after connecting with Azure Support.
The resource type: Microsoft.Sql/servers/auditingPolicies is no longer supported and in the next few weeks Azure Resource Manager will no longer support this completely.
This resource type refers directly to table auditing, which has been reported as being deprecated for blob auditing. Though the documentation at this time does not directly report it. The docs will be updated in the coming days after this post, by the owners.
To enable the auditing you need to use the Microsoft.Sql/servers/auditingSettings object. The documentation on this is coming and until it does you will be directed to documentation for the database version of this resource type Microsoft.Sql/servers/databases/auditingSettings.
Auditing settings work much like the Auto-Tuning advisors. You can set either server or database level settings. The server settings will be inherited by the database if the database has not been configured directly.
This is a sample of the auditingSettings object that I use instead of the auditingPolicies object above. It is nested just the same.
{
"apiVersion": "2017-03-01-preview",
"type": "auditingSettings",
"name": "DefaultAuditingSettings",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', concat(variables('db-service-name'), parameters('app-friendly-names')[copyIndex()]))]",
"storageCopy"
],
"properties": {
"state": "Enabled",
"storageEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts', '/', variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').primaryEndpoints.blob]",
"storageAccountAccessKey": "[listKeys(concat(variables('storage-name'), parameters('app-friendly-names')[copyIndex()]), '2018-02-01').keys[0].value]",
"storageAccountSubscriptionId": "[subscription().subscriptionId]",
"isStorageSecondaryKeyInUse": false,
"retentionDays": "30"
}
}

I am not seeing dialogState in Alexa's event in AWS lambda logs, for a multiturn dialog?

I created an intent with slots in Alexa. This triggers an AWS lambda written in Python. I am logging the 'event'. I expect event['request']['dialogState'] to be present but it is not. Am I missing something?
Event:
{u'session': {u'application': {u'applicationId': u'amzn1.ask.skill.b2a191bb-7ee2-4fa7-aa7b-456d4bd2ee35'}, u'sessionId': u'Sessi onId.afb747ea-01ae-4094-ba10-ac49405a99df', u'user': {u'userId': u'amzn1.ask.account.BFHTSNCIVD2HA563BEPLRW5TSCESQEZXCIULPPB2ULOZBIJRCPM 5Z5NWOWH3HWNOZRTY4WT3FZFVGWWPKRSKC4ZNDSB2EYB45TYQ3RNY67CZPGF4GBMV6CL57C5MJVPIQPH25DQWGXGALDBCBRHMG5IA3Y26UHI7MHPIV3665ZU5OESS3UBADD7MDYQ BWJZFB3XHJS6IM2Y5UTQ', u'accessToken': None}, u'new': False, u'attributes': {}}, u'request': {u'locale': u'en-US', u'type': u'IntentRequ est', u'intent': {u'slots': {u'ncpu': {u'name': u'ncpu'}, u'nmem': {u'name': u'nmem'}}, u'name': u'CreateVM'}, u'requestId': u'EdwReques tId.c9de162a-d606-43a1-9257-b7367c9da5de', u'timestamp': u'2017-10-24T09:43:17Z'}, u'version': u'1.0', u'context': {u'AudioPlayer': {u'p layerActivity': u'IDLE'}, u'System': {u'device': {u'supportedInterfaces': {}}, u'application': {u'applicationId': u'amzn1.ask.skill.b2a1 91bb-7ee2-4fa7-aa7b-456d4bd2ee35'}, u'user': {u'userId': u'amzn1.ask.account.BFHTSNCIVD2HA563BEPLRW5TSCESQEZXCIULPPB2ULOZBIJRCPM5Z5NWOWH 3HWNOZRTY4WT3FZFVGWWPKRSKC4ZNDSB2EYB45TYQ3RNY67CZPGF4GBMV6CL57C5MJVPIQPH25DQWGXGALDBCBRHMG5IA3Y26UHI7MHPIV3665ZU5OESS3UBADD7MDYQBWJZFB3X HJS6IM2Y5UTQ'}}}}
You can not test you skills inside of the Amazon developer portal because these will not return a Dialogstate for your dialog. If you want to test your skill i suggest you go to echosim.io or get an echo dot to experiment with.
If you don't want to test with echosim.io or a real echo device and you have your skill code inside of AWS Lambda you can always test your code there with the test command.
Example:
{
"session": {
"new": true,
"sessionId": "SessionId.******************0ed735901",
"application": {
"applicationId": "amzn1.ask.skill.e96d9***********3ee1b958e6ca"
},
"attributes": {},
"user": {
"userId": "amzn1.ask.account.AGMQGVEZFE355BBMXYBQGFN7TRN5E5CSGUU5Y3AUNEBT3DOZ7IOQ3K7G3RGIOI7BEJVLVR4CWSARSTMAF5RNA4QW************DURTSESLYMYDVIQLWA2LF6PHG3KB3UEOLZWYBBWLRKCFFMG7JFP7TNKCS2RQ4KOGPIMOT2PGQT3S2HAOBNJSAA
}
},
"request": {
"type": "IntentRequest",
"dialogState": "IN_PROGRESS",
"requestId": "EdwRequestId.5b2a45f7-e4bb-44cd-ba9f-1cfe138d577f",
"intent": {
"name": "SearchIntent",
"slots": {
"AnswerTime": {
"name": "AnswerTime",
"value": "Nope"
},
"FirstTime": {
"name": "FirstTime",
"value": "02:00"
},
"SecondTime": {
"name": "SecondTime"
},
"Date": {
"name": "Date",
"value": "2017-10-20"
},
"Name": {
"name": "Name",
"value": "Liam De Lee"
}
}
},
"locale": "en-US",
"timestamp": "2017-10-19T13:29:17Z"
},
"context": {
"AudioPlayer": {
"playerActivity": "IDLE"
},
"System": {
"application": {
"applicationId": "amzn1.ask.skill.e96d95e0-8cbd-41d2-a280-3ee1b958e6ca"
},
"user": {
"userId": "amzn1.ask.account.AGMQGVEZFE355BBMXYBQGFN7TRN5E5CSGUU5Y3AUNEBT3DOZ7IOQ3K7G3RGIOI7BEJVLVR4CWSARSTMAF5RNA4QW************DURTSESLYMYDVIQLWA2LF6PHG3KB3UEOLZWYBBWLRKCFFMG7JFP7TNKCS2RQ4KOGPIMOT2PGQT3S2HAOBNJSAA"
},
"device": {
"supportedInterfaces": {}
}
}
},
"version": "1.0"
}
Note: Service Simulator does not currently support testing audio
player directives, dialog model, customer permissions and customer
account linking.
Amazon developer portal.

copyIndex() inside a listKeys()

We're trying to deploy an ARM template which deploys a Stream Analytics job with n Event Hubs outputs depending on an input parameter.
Right now we're having success with all but the listKeys() function inside the outputs property copy loop function which gets each Event Hub's primary keys:
"sharedAccessPolicyKey": "[listKeys(resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('clientEventHubNamespace'), parameters('clients')[copyIndex('outputs')].id, variables('clientEventHubClientSharedAccessName')), '2015-08-01').primaryKey]"
We get the error:
17:44:31 - Error: Code=InvalidTemplate; Message=Deployment template
validation failed: 'The template resource
'tailor-router-axgf7t3gtspue' at line '129' and column '10' is not
valid: The template function 'copyIndex' is not expected at this
location. The function can only be used in a resource with copy
specified. Please see https://aka.ms/arm-copy for usage details..
Please see https://aka.ms/arm-template-expressions for usage
details.'.
However, if we change this to be a specific index:
"sharedAccessPolicyKey": "[listKeys(resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('clientEventHubNamespace'), parameters('clients')[0].id, variables('clientEventHubClientSharedAccessName')), '2015-08-01').primaryKey]"
it works.
Is copyIndex('propertyName') inside a listKeys() a supported function?
If not, is there a workaround that would achieve the same effect?
Kind regards,
Nick
Stream Analytics job resource definition:
{
"apiVersion": "2016-03-01",
"type": "Microsoft.StreamAnalytics/StreamingJobs",
"name": "[variables('routerStreamAnalyticsName')]",
"location": "[variables('location')]",
"dependsOn": [ "clientsEventHubCopy" ],
"tags": {
"boundedContext": "[variables('boundedContextName')]"
},
"properties": {
"sku": {
"name": "[parameters('routerStreamAnalyticsSkuTier')]"
},
"outputErrorPolicy": "drop",
"eventsOutOfOrderPolicy": "adjust",
"eventsOutOfOrderMaxDelayInSeconds": 0,
"eventsLateArrivalMaxDelayInSeconds": 5,
"dataLocale": "en-US",
"compatibilityLevel": "1.0",
"inputs": [
{
"name": "input0",
"properties": {
"type": "stream",
"serialization": {
"type": "Avro"
},
"datasource": {
"type": "Microsoft.ServiceBus/EventHub",
"properties": {
"serviceBusNamespace": "[parameters('input0EventHubNamespace')]",
"sharedAccessPolicyName": "[parameters('input0EventHubSharedAccessPolicyName')]",
"sharedAccessPolicyKey": "[parameters('input0EventHubSharedAccessPolicyKey')]",
"eventHubName": "[parameters('input0EventHubName')]"
}
}
}
}
],
"transformation": {
"name": "routing",
"properties": {
"streamingUnits": "[parameters('routerStreamAnalyticsSkuTier')]",
"query": "omitted"
}
},
"copy": [
{
"name": "outputs",
"count": "[length(parameters('clients'))]",
"input": {
"name": "[parameters('clients')[copyIndex('outputs')].id]",
"properties": {
"datasource": {
"type": "Microsoft.ServiceBus/EventHub",
"properties": {
"serviceBusNamespace": "[variables('clientEventHubNamespace')]",
"sharedAccessPolicyName": "[variables('clientEventHubClientSharedAccessName')]",
"sharedAccessPolicyKey": "[listKeys(resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('clientEventHubNamespace'), parameters('clients')[copyIndex('outputs')].id, variables('clientEventHubClientSharedAccessName')), '2015-08-01').primaryKey]",
"eventHubName": "[parameters('clients')[copyIndex('outputs')].id]"
}
},
"serialization": {
"type": "Avro"
}
}
}
}
]
}
},
Thanks for reporting this and sorry for the inconvenience.
I just talked to the ARM team, we had an issue when copyindex was inside the index tags eg 'array[copyindex()]'. It should be fixed now.
Let us know how it goes.
Thanks,
JS - Azure Stream Analytics

"AnonymousModel" Embedded Models in "Application Model" with Push Component and Postgre

How is it possible to use the Application Model with APNS settings and Postgre.
The Application Models has embedded Models.
I'm right that in tranditional databases the embedded models are simply saved as object?
The String field of pushsettings has a varchar(1024).
The Push Example does this:
pushSettings: {
apns: {
certData: config.push.apnsCertData,
keyData: config.push.apnsKeyData,
feedbackOptions: {
batchFeedback: true,
interval: 300
}
},
gcm: {
serverApiKey: config.push.gcmServerApiKey
}
}
}
the certData and keyData are to long for the 1024 chars.
So how to use this correct with Postgres?
Right now the only thing I see is to extend the application model and set the pushSettings field to a larger value, but I am not able to get this work too.
Please Please help me
Regards
I mananged to get it work like I thought in first place.
The extended application Model json:
{
"name": "application",
"base": "Application",
"properties": {
"pushSettings": {
"postgresql": {
"dataType": "text",
"dataLength": null,
"nullable": "YES"
},
"apns": {
"production": {
"type": "boolean",
"description": [
"Production or development mode. It denotes what default APNS",
"servers to be used to send notifications.",
"See API documentation for more details."
]
},
"certData": {
"type": "string",
"description": "The certificate data loaded from the cert.pem file"
},
"keyData": {
"type": "string",
"description": "The key data loaded from the key.pem file"
},
"pushOptions": {
"type": {
"gateway": "string",
"port": "number"
}
},
"feedbackOptions": {
"type": {
"gateway": "string",
"port": "number",
"batchFeedback": "boolean",
"interval": "number"
}
}
},
"gcm": {
"serverApiKey": "string"
}
}

Resources