Skip to content

[Bug Report]: cdn/profile/endpoint - dependsOn missing for endpoint_origins on endpoint #4459

Closed

Description

Describe the bug

While deploying a cdn profile with endpoint, both the origin and endpoint are deployed at the same time and cause the endpoint_origins to failed with a not found error on the endpoint. I fixed the issus on my local repository with dependsOn: [ endpoint ] on endpoint_origin in the module cdn/profile/endpoint/main.bicep

To reproduce

Create a cdn profile with an endpoint

Code snippet

var location = 'CanadaCentral'
var cdneName  = 'endpointname01' 
var cdnpName = 'profilename01'
var url = '[teststorageaccount].blob.core.windows.net'

module profile 'modules/cdn/profile/main.bicep' = {  
  name: '${uniqueString(deployment().name, location)}-test-cdnpafd'
  params: {
    name: cdnpName
    sku: 'Standard_Microsoft'
    endpointProperties: {
      name: cdneName
      location: location
      isCompressionEnabled: false
      isHttpAllowed: false
      isHttpsAllowed: true
      origins: [
        {
          name: 'cdneporitest01'
          properties: {
            hostName:  url
            httpPort: 80
            httpsPort: 443
            originHostHeader: url
            enabled: true
            weight: 1000
            priority: 1  
          }
        }  
      ]
    }
    location: 'global'
  }
}

Relevant log output

details":[{"code":"NotFound","message":"The resource cannot be found."},{"code":"NotFound","message":"The requested resource was not found."

Activity

  1. added
    bug
    on Jan 19, 2024
  2. AlexanderSehr commented on Feb 1, 2024

    @AlexanderSehr
    Contributor

    Hey Carlo Di-Bernardo (@dibcar) thank you for opening this issue (as sorry for the late response). As the module was not migrated to AVM yet, I'll go ahead an implement it on the CARML-side. Thank you :)

  3. AlexanderSehr commented on Feb 1, 2024

    @AlexanderSehr
    Contributor

    Alright, the PR is up and linked to this issue. I solved it slightly differently as I noticed the implementation was not consistent with our other modules in that it should have referenced the endpoint name like endpointName: endpoint.name not only being less dependend on the template input, but also introducing an implicit dependency.

  4. moved this from Needs triage to Closed in Bug boardon Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

  • Status
    Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions