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

Bicep script fails #18

Open
dtriana opened this issue May 24, 2023 · 0 comments
Open

Bicep script fails #18

dtriana opened this issue May 24, 2023 · 0 comments

Comments

@dtriana
Copy link

dtriana commented May 24, 2023

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Follow the instructions to run the Bicep Script

Any log messages given by the failure

Initially

C:\Code\cosmos-aks-samples\Bicep\modules\cosmos\cosmos.bicep(62,9) : Warning use-parent-property: Resource "sqlRoleDefinition" has its name formatted as a child of resource "databaseAccount". The syntax can be simplified by using the parent property. [https://aka.ms/bicep/linter/use-parent-property]
C:\Code\cosmos-aks-samples\Bicep\modules\cosmos\cosmos.bicep(78,9) : Warning use-parent-property: Resource "sqlRoleAssignment" has its name formatted as a child of resource "databaseAccount". The syntax can be simplified by using the parent property. [https://aka.ms/bicep/linter/use-parent-property]
C:\Code\cosmos-aks-samples\Bicep\modules\cosmos\cosmos.bicep(88,9) : Warning use-parent-property: Resource "database" has its name formatted as a child of resource "databaseAccount". The syntax can be simplified by using the parent property. [https://aka.ms/bicep/linter/use-parent-property]
C:\Code\cosmos-aks-samples\Bicep\modules\cosmos\cosmos.bicep(97,9) : Warning use-parent-property: Resource "container" has its name formatted as a child of resource "database". The syntax can be simplified by using the parent property. [https://aka.ms/bicep/linter/use-parent-property]

{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/d5321b42-b184-4a2c-a0fc-775c611da923/providers/Microsoft.Resources/deployments/CosmosDbAksDemo","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"DeploymentActive","message":"Unable to edit or replace deployment 'CosmosDbAksDemo': previous deployment from '5/24/2023 1:59:06 PM' is still active (expiration time is '5/31/2023 1:59:05 PM'). Please see https://aka.ms/arm-deploy-resources for usage details."}]}}

Then after making the changes suggested by the warnings on top

{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/d5321b42-b184-4a2c-a0fc-775c611da923/providers/Microsoft.Resources/deployments/CosmosDbAksDemo","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"InvalidTemplateDeployment","message":"The template deployment 'aksCluster' is not valid according to the validation procedure. The tracking id is '4aa357c7-51d5-4d76-9d09-0588992638fc'. See inner errors for details.","details":[{"code":"PodIdentityAddonFeatureFlagNotEnabled","message":"Provisioning of resource(s) for container service AksDemoCosmosDbaks in resource group AksDemoCosmosDb failed. Message: PodIdentity addon is not allowed since feature 'Microsoft.ContainerService/EnablePodIdentityPreview' is not enabled. Please see https://aka.ms/aks/previews for how to enable features.. Details: "}]},{"code":"ResourceDeploymentFailure","target":"/subscriptions/d5321b42-b184-4a2c-a0fc-775c611da923/resourceGroups/AksDemoCosmosDb/providers/Microsoft.Resources/deployments/cosmosDB","message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":[{"code":"DeploymentFailed","target":"/subscriptions/d5321b42-b184-4a2c-a0fc-775c611da923/resourceGroups/AksDemoCosmosDb/providers/Microsoft.Resources/deployments/cosmosDB","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","target":"/subscriptions/d5321b42-b184-4a2c-a0fc-775c611da923/resourceGroups/AksDemoCosmosDb/providers/Microsoft.Resources/deployments/cosmosDB","message":"{\r\n  \"code\": \"BadRequest\",\r\n  \"message\": \"The character 'A' at index 0 is not allowed in the DatabaseAccount name\\r\\nActivityId: c696292e-2709-46fd-97b3-06724e4153e8, Microsoft.Azure.Documents.Common/2.14.0\"\r\n}"}]}]}]}}

Seems like this feature is being deprecated, https://learn.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity , maybe that's why it doesn't work with Bicep?

Expected/desired behavior

Infra deployed

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Tried both, Cloud shell and Az CLI in terminal under win 11

Versions

Mention any other details that might be useful

To address the podidenity issue

az feature register --name EnablePodIdentityPreview --namespace Microsoft.ContainerService
az provider register -n Microsoft.ContainerService'

Then with that got another error about the AKS version, 1.22.11 no longer supported


Thanks! We'll be in touch soon.

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

1 participant