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

🪲 Bug Report - Subscription resource provider registration error #64

Closed
BenjaminEngeset opened this issue Feb 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@BenjaminEngeset
Copy link

BenjaminEngeset commented Feb 8, 2024

Describe the bug

In the subscription resource provider registration logic, it very much looks like there is a bug that ends up causing an error.

The reason is because that output from Invoke-RegisterSubscriptionResourceProviders.ps1 is not existing since this section is not being invoked, as expected since I haven't passed in any features to register on the provider. The main.bicep on the other hand doesn't take this into consideration and will try to emit a non-existing value.

}
$DeploymentScriptOutputs["failedFeaturesRegistrations"] = $output
}

bicep-lz-vending/main.bicep

Lines 705 to 706 in 4e411ef

@sys.description('The resource providers features that failed to register')
output failedResourceProvidersFeatures string = !empty(resourceProviders) ? createSubscriptionResources.outputs.failedFeatures : ''

I also might suspect there is an additional bug, as it looks like there is missing a parameter in the script to pass features at all. Looking at the log a unknown parameter is passed to Invoke-RegisterSubscriptionResourceProviders.ps1 with no value and not declared as a parameter in the script either, hence ignored.

image

To Reproduce

Steps to reproduce the behaviour:

Example configuration that triggers the behaviour:

module sub001 'br/public:lz/sub-vending:1.5.1' = {
  name: 'd-org-001'
  params: {
    subscriptionAliasEnabled: true
    subscriptionBillingScope: subscriptionBillingScope
    subscriptionAliasName: subscriptionAliasName
    subscriptionDisplayName: subscriptionAliasName
    subscriptionTags: {
      example: 'true'
    }
    subscriptionWorkload: 'DevTest'
    subscriptionManagementGroupAssociationEnabled: true
    subscriptionManagementGroupId: 'my-mg'
  }
}

Expected behaviour

No error should be emitted.

Screenshots 📷

image

Correlation ID

2e19e2fa-54e9-4a37-b415-2b1ca5aa8274

Additional context

If needed, we can schedule a meeting to explain further.

@BenjaminEngeset BenjaminEngeset added the bug Something isn't working label Feb 8, 2024
@BenjaminEngeset BenjaminEngeset changed the title 🪲 Bug Report - Resource provider registration deployment script terminating error 🪲 Bug Report - Subscription resource provider registration error Feb 8, 2024
@jtracey93
Copy link
Collaborator

jtracey93 commented Feb 9, 2024

Hey @BenjaminEngeset,

Thanks for the issue. Looks the same as #63 which we are in the process of fixing when we cut the next release which we hope to be very soon.

Will close as duplicate

@jtracey93 jtracey93 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants