Skip to content

[Issue] Deployment name is constant around all the provisions of an agent. #9210

Description

@mohitpavan

Looks like deployment name is encoded from the agent name given in the yaml file, so if i deploy it into different regioon, we are facinig errors like this:

ERROR: deployment failed: error deploying infrastructure: provisioning deploy failed: arm_deployment_create: PUT https://management.azure.com/subscriptions/7c71b563-0dc0-4bc0-bcf6-06f8f0516c7a/providers/Microsoft.Resources/deployments/azd-foundry-bat-python-maf-dev-43398679
--------------------------------------------------------------------------------
RESPONSE 409: 409 Conflict
ERROR CODE: InvalidDeploymentLocation
--------------------------------------------------------------------------------
{
  "error": {
    "code": "InvalidDeploymentLocation",
    "message": "Invalid deployment location 'eastus'. The deployment 'AZD-FOUNDRY-BAT-PYTHON-MAF-DEV-43398679' already exists in location 'norwayeast'."
  }
}
--------------------------------------------------------------------------------

There were errors even with the deployment name crossed 64 characters, it will be better to give the deployment name dynamic using UTC or make the agent-name.sbstr(0,20) + smallGuuid(encoded) + region.shortName

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions