Currently, arm2pulumi produces code (C# tested) that isn't immediately useful and discards information.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccounts_mnuposloadqueueae_name": {
"defaultValue": "mnuposloadqueueae",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"name": "[parameters('storageAccounts_mnuposloadqueueae_name')]",
"location": "australiaeast",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"properties": {
"networkAcls": {
"bypass": "AzureServices",
"virtualNetworkRules": [],
"ipRules": [],
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": false,
"encryption": {
"services": {
"file": {
"keyType": "Account",
"enabled": true
},
"blob": {
"keyType": "Account",
"enabled": true
}
},
"keySource": "Microsoft.Storage"
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"cors": {
"corsRules": []
},
"deleteRetentionPolicy": {
"enabled": false
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/fileServices",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"cors": {
"corsRules": []
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"cors": {
"corsRules": []
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"cors": {
"corsRules": []
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/azure-webjobs-hosts')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"defaultEncryptionScope": "$account-encryption-key",
"denyEncryptionScopeOverride": false,
"publicAccess": "None"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/azure-webjobs-secrets')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"defaultEncryptionScope": "$account-encryption-key",
"denyEncryptionScopeOverride": false,
"publicAccess": "None"
}
},
{
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/mnuposloadapiae')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/fileServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"accessTier": "TransactionOptimized",
"shareQuota": 5120,
"enabledProtocols": "SMB"
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/createorder-handl')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/createorder-mock')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/createorder-mock-poison')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/createorder-null')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/pollordertatus')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/posorderupdate')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/posorderupdate-poison')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices/tables",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/AzureWebJobsHostLogs202007')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/tableServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices/tables",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/AzureWebJobsHostLogs202008')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/tableServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices/tables",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/AzureWebJobsHostLogs202009')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/tableServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices/tables",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/AzureWebJobsHostLogs202010')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/tableServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices/tables",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('storageAccounts_mnuposloadqueueae_name'), '/default/AzureWebJobsHostLogscommon')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/tableServices', parameters('storageAccounts_mnuposloadqueueae_name'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_mnuposloadqueueae_name'))]"
]
}
]
}
using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var storageAccountsMnuposloadqueueaeNameParam = config.Get("storageAccountsMnuposloadqueueaeNameParam") ?? "mnuposloadqueueae";
var blobServiceResource = null;
var containerResource = null;
var containerResource0 = null;
var fileServiceResource = null;
var resourceGroupNameParam = config.Require("resourceGroupNameParam");
var queueResource = new AzureNextGen.Storage.V20190601.Queue("queueResource", new AzureNextGen.Storage.V20190601.QueueArgs
{
Metadata = ,
QueueName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/createorder-handl",
ResourceGroupName = resourceGroupNameParam,
});
var queueResource0 = new AzureNextGen.Storage.V20190601.Queue("queueResource0", new AzureNextGen.Storage.V20190601.QueueArgs
{
Metadata = ,
QueueName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/createorder-mock",
ResourceGroupName = resourceGroupNameParam,
});
var queueResource1 = new AzureNextGen.Storage.V20190601.Queue("queueResource1", new AzureNextGen.Storage.V20190601.QueueArgs
{
Metadata = ,
QueueName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/createorder-mock-poison",
ResourceGroupName = resourceGroupNameParam,
});
var queueResource2 = new AzureNextGen.Storage.V20190601.Queue("queueResource2", new AzureNextGen.Storage.V20190601.QueueArgs
{
Metadata = ,
QueueName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/createorder-null",
ResourceGroupName = resourceGroupNameParam,
});
var queueResource3 = new AzureNextGen.Storage.V20190601.Queue("queueResource3", new AzureNextGen.Storage.V20190601.QueueArgs
{
Metadata = ,
QueueName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/pollordertatus",
ResourceGroupName = resourceGroupNameParam,
});
var queueResource4 = new AzureNextGen.Storage.V20190601.Queue("queueResource4", new AzureNextGen.Storage.V20190601.QueueArgs
{
Metadata = ,
QueueName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/posorderupdate",
ResourceGroupName = resourceGroupNameParam,
});
var queueResource5 = new AzureNextGen.Storage.V20190601.Queue("queueResource5", new AzureNextGen.Storage.V20190601.QueueArgs
{
Metadata = ,
QueueName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/posorderupdate-poison",
ResourceGroupName = resourceGroupNameParam,
});
var queueServiceResource = null;
var shareResource = null;
var storageAccountResource = new AzureNextGen.Storage.V20190601.StorageAccount("storageAccountResource", new AzureNextGen.Storage.V20190601.StorageAccountArgs
{
AccountName = storageAccountsMnuposloadqueueaeNameParam,
EnableHttpsTrafficOnly = false,
Encryption = new AzureNextGen.Storage.V20190601.Inputs.EncryptionArgs
{
KeySource = "Microsoft.Storage",
Services = new AzureNextGen.Storage.V20190601.Inputs.EncryptionServicesArgs
{
Blob = new AzureNextGen.Storage.V20190601.Inputs.EncryptionServiceArgs
{
Enabled = true,
KeyType = "Account",
},
File = new AzureNextGen.Storage.V20190601.Inputs.EncryptionServiceArgs
{
Enabled = true,
KeyType = "Account",
},
},
},
Kind = "Storage",
Location = "australiaeast",
NetworkRuleSet = new AzureNextGen.Storage.V20190601.Inputs.NetworkRuleSetArgs
{
Bypass = "AzureServices",
DefaultAction = "Allow",
IpRules = {},
VirtualNetworkRules = {},
},
ResourceGroupName = resourceGroupNameParam,
Sku = new AzureNextGen.Storage.V20190601.Inputs.SkuArgs
{
Name = "Standard_LRS",
Tier = "Standard",
},
});
var tableResource = new AzureNextGen.Storage.V20190601.Table("tableResource", new AzureNextGen.Storage.V20190601.TableArgs
{
ResourceGroupName = resourceGroupNameParam,
TableName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/AzureWebJobsHostLogs202007",
});
var tableResource0 = new AzureNextGen.Storage.V20190601.Table("tableResource0", new AzureNextGen.Storage.V20190601.TableArgs
{
ResourceGroupName = resourceGroupNameParam,
TableName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/AzureWebJobsHostLogs202008",
});
var tableResource1 = new AzureNextGen.Storage.V20190601.Table("tableResource1", new AzureNextGen.Storage.V20190601.TableArgs
{
ResourceGroupName = resourceGroupNameParam,
TableName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/AzureWebJobsHostLogs202009",
});
var tableResource2 = new AzureNextGen.Storage.V20190601.Table("tableResource2", new AzureNextGen.Storage.V20190601.TableArgs
{
ResourceGroupName = resourceGroupNameParam,
TableName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/AzureWebJobsHostLogs202010",
});
var tableResource3 = new AzureNextGen.Storage.V20190601.Table("tableResource3", new AzureNextGen.Storage.V20190601.TableArgs
{
ResourceGroupName = resourceGroupNameParam,
TableName = $"{storageAccountsMnuposloadqueueaeNameParam}/default/AzureWebJobsHostLogscommon",
});
var tableServiceResource = null;
}
}
and here is what I ended up with (transforming the Stack to ComponentResource to include in an existing Stack):
using Pulumi;
using Storage = Pulumi.AzureNextGen.Storage.V20190601;
class PosQueueSaArgs
{
public Input<string> ResourceGroupName { get; set; } = "autobots";
public Input<string> StorageAccountName { get; set; } = "mnuposautoqueueae";
}
class PosQueueSa : ComponentResource
{
public PosQueueSa(string name, PosQueueSaArgs args, ComponentResourceOptions? options = null)
: base("PQ", name, options)
{
//var config = new Config();
//var storageAccountName = config.Get("storageAccountName") ?? "mnuposautoqueueae";
//var blobServiceResource = null;
//var containerResource = null;
//var containerResource0 = null;
//var fileServiceResource = null;
//var resourceGroupName = config.Require("resourceGroupName");
//var queueServiceResource = null;
//var shareResource = null;
var storageAccountResource = new Storage.StorageAccount("storageAccountResource", new Storage.StorageAccountArgs
{
AccountName = args.StorageAccountName,
EnableHttpsTrafficOnly = false,
Encryption = new Storage.Inputs.EncryptionArgs
{
KeySource = "Microsoft.Storage",
Services = new Storage.Inputs.EncryptionServicesArgs
{
Blob = new Storage.Inputs.EncryptionServiceArgs
{
Enabled = true,
KeyType = "Account",
},
File = new Storage.Inputs.EncryptionServiceArgs
{
Enabled = true,
KeyType = "Account",
},
},
},
Kind = "Storage",
Location = "australiaeast",
NetworkRuleSet = new Storage.Inputs.NetworkRuleSetArgs
{
Bypass = "AzureServices",
DefaultAction = "Allow",
IpRules = {},
VirtualNetworkRules = {},
},
ResourceGroupName = args.ResourceGroupName,
Sku = new Storage.Inputs.SkuArgs
{
Name = "Standard_LRS",
//Tier = "Standard",
},
});
var queueResource = new Storage.Queue("queueResource", new Storage.QueueArgs
{
//Metadata = ,
AccountName = storageAccountResource.Name,
QueueName = "createorder-handl",
ResourceGroupName = args.ResourceGroupName,
});
var queueResource0 = new Storage.Queue("queueResource0", new Storage.QueueArgs
{
//Metadata = ,
AccountName = storageAccountResource.Name,
QueueName = "createorder-mock",
ResourceGroupName = args.ResourceGroupName,
});
var queueResource1 = new Storage.Queue("queueResource1", new Storage.QueueArgs
{
//Metadata = ,
AccountName = storageAccountResource.Name,
QueueName = "createorder-mock-poison",
ResourceGroupName = args.ResourceGroupName,
});
var queueResource2 = new Storage.Queue("queueResource2", new Storage.QueueArgs
{
//Metadata = ,
AccountName = storageAccountResource.Name,
QueueName = "createorder-null",
ResourceGroupName = args.ResourceGroupName,
});
var queueResource3 = new Storage.Queue("queueResource3", new Storage.QueueArgs
{
//Metadata = ,
AccountName = storageAccountResource.Name,
QueueName = "pollordertatus",
ResourceGroupName = args.ResourceGroupName,
});
var queueResource4 = new Storage.Queue("queueResource4", new Storage.QueueArgs
{
//Metadata = ,
AccountName = storageAccountResource.Name,
QueueName = "posorderupdate",
ResourceGroupName = args.ResourceGroupName,
});
var queueResource5 = new Storage.Queue("queueResource5", new Storage.QueueArgs
{
//Metadata = ,
AccountName = storageAccountResource.Name,
QueueName = "posorderupdate-poison",
ResourceGroupName = args.ResourceGroupName,
});
var tableResource = new Storage.Table("tableResource", new Storage.TableArgs
{
AccountName = storageAccountResource.Name,
ResourceGroupName = args.ResourceGroupName,
TableName = "AzureWebJobsHostLogs202007",
});
var tableResource0 = new Storage.Table("tableResource0", new Storage.TableArgs
{
AccountName = storageAccountResource.Name,
ResourceGroupName = args.ResourceGroupName,
TableName = "AzureWebJobsHostLogs202008",
});
var tableResource1 = new Storage.Table("tableResource1", new Storage.TableArgs
{
AccountName = storageAccountResource.Name,
ResourceGroupName = args.ResourceGroupName,
TableName = "AzureWebJobsHostLogs202009",
});
var tableResource2 = new Storage.Table("tableResource2", new Storage.TableArgs
{
AccountName = storageAccountResource.Name,
ResourceGroupName = args.ResourceGroupName,
TableName = "AzureWebJobsHostLogs202010",
});
var tableResource3 = new Storage.Table("tableResource3", new Storage.TableArgs
{
AccountName = storageAccountResource.Name,
ResourceGroupName = args.ResourceGroupName,
TableName = "AzureWebJobsHostLogscommon",
});
//var tableServiceResource = null;
}
}