Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation Task #6029

Open
Durga-S1 opened this issue Nov 5, 2024 · 1 comment
Open

Automation Task #6029

Durga-S1 opened this issue Nov 5, 2024 · 1 comment
Assignees

Comments

@Durga-S1
Copy link

Durga-S1 commented Nov 5, 2024

Describe the Bug with repro steps

Customer has encountered while using the automation task in Logic App. When they switch to the code view and make some changes, then return to the designer, they receive an error message. customer is currently performing this task in the Logic App and the VM.

I have attempted to reproduce this issue in my lab, and it seems that this problem is indeed reproducible in both Logic App and the storage account.

What type of Logic App Is this happening in?

Consumption (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "contentVersion": "1.0.0.0",
        "triggers": {
            "Recurrence": {
                "type": "Recurrence",
                "recurrence": {
                    "frequency": "Month",
                    "interval": 1
                }
            }
        },
        "actions": {
            "Compose": {
                "type": "Compose",
                "inputs": "@body('Filter_array')",
                "runAfter": {
                    "Filter_array": [
                        "Succeeded"
                    ]
                }
            },
            "Filter_array": {
                "type": "Query",
                "inputs": {
                    "from": "@body('Invoke_resource_operation_in_provider')?['properties']?['rows']",
                    "where": "@equals(item()[3], toLower(parameters('ResourceId')))"
                },
                "runAfter": {
                    "Invoke_resource_operation_in_provider": [
                        "Succeeded"
                    ]
                }
            },
            "Invoke_resource_operation_in_provider": {
                "type": "ApiConnection",
                "inputs": {
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['arm']['connectionId']"
                        }
                    },
                    "method": "post",
                    "body": {
                        "dataSet": {
                            "aggregation": {
                                "totalCost": {
                                    "function": "Sum",
                                    "name": "PreTaxCost"
                                },
                                "totalCostUSD": {
                                    "function": "Sum",
                                    "name": "PreTaxCostUSD"
                                }
                            },
                            "granularity": "None",
                            "grouping": [
                                {
                                    "name": "ResourceGroupName",
                                    "type": "Dimension"
                                },
                                {
                                    "name": "ResourceId",
                                    "type": "Dimension"
                                },
                                {
                                    "name": "ChargeType",
                                    "type": "Dimension"
                                },
                                {
                                    "name": "PublisherType",
                                    "type": "Dimension"
                                }
                            ]
                        },
                        "timePeriod": {
                            "from": "@{addToTime(utcNow(), -1, 'Month')}",
                            "to": "@{utcNow()}"
                        },
                        "timeframe": "Custom",
                        "type": "ActualCost"
                    },
                    "path": "/subscriptions/@{encodeURIComponent(parameters('SubscriptionId'))}/providers/@{encodeURIComponent('Microsoft.CostManagement')}/@{encodeURIComponent('query')}",
                    "queries": {
                        "x-ms-api-version": "2019-11-01"
                    }
                },
                "runAfter": {}
            },
            "Send_an_email_(V2)": {
                "type": "ApiConnection",
                "inputs": {
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['office365']['connectionId']"
                        }
                    },
                    "method": "post",
                    "body": {
                        "To": "@parameters('EmailId')",
                        "Subject": "Monthly cost for resource",
                        "Body": "<p>The monthly cost for resource<strong> </strong><strong>@{first(body('Filter_array'))[3]}</strong><strong> </strong>is<strong>&nbsp;\n</strong><strong>@{first(body('Filter_array'))[0]}</strong><strong> </strong><strong>@{first(body('Filter_array'))[6]}</strong><strong></strong>.</p>"
                    },
                    "path": "/v2/Mail"
                },
                "runAfter": {
                    "Compose": [
                        "Succeeded"
                    ]
                }
            }
        },
        "outputs": {},
        "parameters": {
            "EmailId": {
                "defaultValue": "xxxxx@abc.com",
                "type": "String",
                "metadata": {
                    "required": true,
                    "displayName": "Email sent to",
                    "placeholder": "Enter the email address to send email."
                }
            },
            "ResourceId": {
                "defaultValue": "/subscriptions/cf191779-dce3-475f-bfd9-e03b26ead8c1/resourcegroups/Durga/providers/Microsoft.Storage/storageAccounts/taskautostorage",
                "type": "String",
                "metadata": {
                    "isLinkedResource": true,
                    "sourceParameter": "id"
                }
            },
            "SubscriptionId": {
                "defaultValue": "cf191779-dce3-475f-bfd9-e03b26ead8c1",
                "type": "String",
                "metadata": {
                    "isLinkedResource": true,
                    "sourceParameter": "subscriptionId"
                }
            },
            "$connections": {
                "type": "Object",
                "defaultValue": {}
            }
        }
    },
    "parameters": {
        "$connections": {
            "value": {
                "arm": {
                    "id": "/subscriptions/cf191779-dce3-475f-bfd9-e03b26ead8c1/providers/Microsoft.Web/locations/eastus/managedApis/arm",
                    "connectionId": "/subscriptions/cf191779-dce3-475f-bfd9-e03b26ead8c1/resourceGroups/Durga/providers/Microsoft.Web/connections/arm",
                    "connectionName": "arm"
                },
                "office365": {
                    "id": "/subscriptions/cf191779-dce3-475f-bfd9-e03b26ead8c1/providers/Microsoft.Web/locations/eastus/managedApis/office365",
                    "connectionId": "/subscriptions/cf191779-dce3-475f-bfd9-e03b26ead8c1/resourceGroups/Durga/providers/Microsoft.Web/connections/office365",
                    "connectionName": "office365"
                }
            }
        }
    }
}


ARM Template that contains the "Kind" Automation Task.

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "storageAccounts_taskautostorage_name": {
            "defaultValue": "taskautostorage",
            "type": "String"
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.Storage/storageAccounts",
            "apiVersion": "2023-05-01",
            "name": "[parameters('storageAccounts_taskautostorage_name')]",
            "location": "eastus",
            "sku": {
                "name": "Standard_RAGRS",
                "tier": "Standard"
            },
            "kind": "StorageV2",
            "properties": {
                "dnsEndpointType": "Standard",
                "defaultToOAuthAuthentication": false,
                "publicNetworkAccess": "Enabled",
                "allowCrossTenantReplication": false,
                "minimumTlsVersion": "TLS1_2",
                "allowBlobPublicAccess": false,
                "allowSharedKeyAccess": true,
                "largeFileSharesState": "Enabled",
                "networkAcls": {
                    "bypass": "AzureServices",
                    "virtualNetworkRules": [],
                    "ipRules": [],
                    "defaultAction": "Allow"
                },
                "supportsHttpsTrafficOnly": true,
                "encryption": {
                    "requireInfrastructureEncryption": false,
                    "services": {
                        "file": {
                            "keyType": "Account",
                            "enabled": true
                        },
                        "blob": {
                            "keyType": "Account",
                            "enabled": true
                        }
                    },
                    "keySource": "Microsoft.Storage"
                },
                "accessTier": "Hot"
            }
        },
        {
            "type": "Microsoft.Storage/storageAccounts/blobServices",
            "apiVersion": "2023-05-01",
            "name": "[concat(parameters('storageAccounts_taskautostorage_name'), '/default')]",
            "dependsOn": [
                "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_taskautostorage_name'))]"
            ],
            "sku": {
                "name": "Standard_RAGRS",
                "tier": "Standard"
            },
            "properties": {
                "containerDeleteRetentionPolicy": {
                    "enabled": true,
                    "days": 7
                },
                "cors": {
                    "corsRules": []
                },
                "deleteRetentionPolicy": {
                    "allowPermanentDelete": false,
                    "enabled": true,
                    "days": 7
                }
            }
        },
        {
            "type": "Microsoft.Storage/storageAccounts/fileServices",
            "apiVersion": "2023-05-01",
            "name": "[concat(parameters('storageAccounts_taskautostorage_name'), '/default')]",
            "dependsOn": [
                "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_taskautostorage_name'))]"
            ],
            "sku": {
                "name": "Standard_RAGRS",
                "tier": "Standard"
            },
            "properties": {
                "protocolSettings": {
                    "smb": {}
                },
                "cors": {
                    "corsRules": []
                },
                "shareDeleteRetentionPolicy": {
                    "enabled": true,
                    "days": 7
                }
            }
        },
        {
            "type": "Microsoft.Storage/storageAccounts/queueServices",
            "apiVersion": "2023-05-01",
            "name": "[concat(parameters('storageAccounts_taskautostorage_name'), '/default')]",
            "dependsOn": [
                "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_taskautostorage_name'))]"
            ],
            "properties": {
                "cors": {
                    "corsRules": []
                }
            }
        },
        {
            "type": "Microsoft.Storage/storageAccounts/tableServices",
            "apiVersion": "2023-05-01",
            "name": "[concat(parameters('storageAccounts_taskautostorage_name'), '/default')]",
            "dependsOn": [
                "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_taskautostorage_name'))]"
            ],
            "properties": {
                "cors": {
                    "corsRules": []
                }
            }
        }
    ]
}

Screenshots or Videos

Image

Image

Browser

Browser-Edge

Additional context

Interestingly, this issue occurs with the general designer, while the legacy designer works fine for them.

@Eric-B-Wu Eric-B-Wu self-assigned this Nov 5, 2024
@Durga-S1
Copy link
Author

Durga-S1 commented Nov 6, 2024

Hi Eric-B-Wu, Is there any update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants