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

enable naming rule overrides per resource #42012

Merged
merged 4 commits into from
Feb 15, 2024
Merged

enable naming rule overrides per resource #42012

merged 4 commits into from
Feb 15, 2024

Conversation

m-nash
Copy link
Member

@m-nash m-nash commented Feb 15, 2024

fixes #41972

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

@m-nash m-nash linked an issue Feb 15, 2024 that may be closed by this pull request
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Provisioning

@m-nash m-nash merged commit fbef263 into feature/cdk Feb 15, 2024
17 checks passed
@m-nash m-nash deleted the mnash-41972 branch February 15, 2024 18:14
stringBuilder.Append(c);
}
}
stringBuilder.Append('-');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use this in a Storage Account name. Only lowercase letters and numbers.

Comment on lines +56 to +68
char c = span[i];
if (!char.IsLetterOrDigit(c))
{
continue;
}
if (char.IsDigit(c) && !char.IsLower(c))
{
stringBuilder.Append(char.ToLower(c));
}
else
{
stringBuilder.Append(c);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a logic error here and you'll never actually lowercase any letters.

JoshLove-msft added a commit that referenced this pull request Mar 23, 2024
* pull in bicep serialization from feature/cdk-hack

* update cognitiveservices

* update keyvault

* update cognitiveservices

* update keyvault

* update resourcemanager

* update resources

* update search

* update sqlmanagement

* update websites

* update resourcemanager api

* update keyvault api

* Use generated bicep serialization

* Handwrite bicep for ManagedServiceIdentity

* regen API

* remove search cdk hacks

* Add BicepModelReaderWriterOptions

* regen api

* Fix type of parameteroverrides property

* Use IDictionary

* Update autorest (#41916)

* Update to alpha autorest

* Regenerate

* Update RM version (#41918)

* add initial cdk

* add ability to specify tenant id (#41937)

use dummy value in tests for tenant id

* respect tenantId parameter in Tenant (#41940)

* allow you to specify sub id (#41944)

* update to be able to customize env name (#41947)

* add ci (#41934)

* add ci

* update api, changelog, readme

* fix ci issues

* update api

* update api

* update api

* use env name in tag

* update so all constructs inherit env name

* use root guid instead of env variable in child resources

* regen infra

* Generate Storage RM (#41949)

* Update package refs and regen bicep (#41954)

* Fix KeyVault access policy param (#41955)

* Fix KeyVault access policy param

* Fix

* add simple storage examples (#41956)

* add simple storage examples

* update api

* remove dashes from guid (#41959)

* Use linq expressions for parameter assignment (#41963)

* Use linq expressions for parameter assignment

* Fix test

* export API

* Make output API match on type and add lambda support (#41988)

* Make output API match on type and add lambda support

* API

* PR fb

* enable naming rule overrides per resource (#42012)

* add name rule override ability in resource

* remove lang override

* update api

* update name of blob service (#42015)

* hard code blob service name

* update after merge

* update api

* update to add bicep serialization for appconfiguration (#42016)

* add support for appconfiguration (#42019)

* Update to use bicep path generator (#42045)

* Update Generator Version 3.0.0-beta.20240216.2 (#42039)

* Update Generator Version 3.0.0-alpha.20240216.2

* keep local change and just update autorest

* regen app config with paths

* regen resources

* regen keyvault

* regen sqlmanagement

* regen websites

* regen storage

* regen resourcemanager

---------

Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: azure-sdk <[email protected]>

* update alpha bilds (#42067)

* Update AppConfiguration to include endpoint output (#42047)

* add support for appconfiguration

* wip

* updates after merge

* regen after bump

* Write bicep into modules based on scope hierarchy rather than user constructs (#42029)

* Write bicep into modules based on scope hierarchy rather than user constructs

* Clean up

* remove dead code

* Add override logic for ManagedService

* PR fb

* deleted files

* API

* Fix getResources

* tests

* Fix outputs

* remove commented code

* remove blank refdocs

* using

* Pass recursive as true

* revert recursive change

* PR fb

* pass true as recursive arg

* Fix recursive call and don't mutate Parameter

* API

* fix comments

* readonly

* add construct tests

* Fix enumeration

* Add parameter and outputs tests

* save

* update get parameters

* update api

* update after merge

* Fix outputs/parameters

* avoid dupes

* fix test

* api

---------

Co-authored-by: m-nash <[email protected]>

* Fix parameter issues (#42070)

* Add support for indexers in assign param (#42084)

* add support for indexers in assign param

* update api

* update keyvault for aspire use cases (#42086)

* update keyvault for aspire use cases

* update api

* Validate bicep (#42088)

* add bicep validation

* Add bicep validation

* delete main.json

* Update refs autorest (#42139)

* regen

* regen

* Update refs autorest (#42142)

* regen

* regen

* websites

* Update refs (#42143)

* Update refs

* fix app config

* Validate bicep using ARM (#42147)

* Save

* Validate bicep against ARM endpoint

* revert workaround

* trailing space

* Pass parameters in Validate call

* remove comment

* fix tests

* Fix deploymentscript (#42166)

* Update DeploymentScript to not use placeholders

* remove unnecessary parm

* remove using

* Support using generic subscription reference (#42179)

* Support using generic subscription reference

* api

* Remove env var fallback for subscription (#42208)

* Remove env var fallback for subscription

* Update ref docs

* Generate bicep serialization for Authorization RP (#42240)

* Generate bicep serialization for Authorization RP

* wirepath

* Support anonymous resource groups (#42233)

* Support anonymous resource groups

* remove roleassignment

* PR fb

* Revert constructScope switch statement change

* make property internal

* api

* PR fb

* const

* make internal

* remove comment

* Use tenant function and resourceGroup().location (#42257)

* Use tenant function and resourceGroup().location

* PR fb

* remove find infra

* Use bicep function for storage account name (#42271)

* Use bicep function for storage account name

* lambda

* revert param rename

* Add location parameter for prompt mode (#42286)

* Add location parameter for prompt mode

* Remove var

* make internal and more tests

* remove unused

* Role assignment support (#42297)

* save

* add roleassignment

* support role assignment

* revert sln change

* updat tests

* fix

* pr fb

* regen

* Add back env var support for subs, PR fb

* regen

* fix tests

* regen

* Storage kind fix roleassignment namespacefix (#42320)

* Fixes bug with StorageAccount not using kind argument.
Fixes bug where role assignments where using the wrong ARM namespace.

* regen bicep

---------

Co-authored-by: jolov <[email protected]>

* Ensure unique bicep names for role assignments and expose principalType parameter (#42326)

* Ensure unique bicep names for role assignments and expose principalType parameter

* ref docs

* Ensure role assignment name is unique (#42331)

* Allow same param to be used for multiple properties (#42330)

* Env name/sql server name/storage access tier fixes (#42336)

* - Don't append env name for child resources.
- storage access tier fix
- sql server name fix

* api

* SQL server fixes (#42341)

* SQL server fixes

* regen

* add parent param to sqlfirewallrule

* regen

* Integrate with test framework (#42343)

* save

* integrate with test framework

* remove env var

* assets

* Disable in CI for now

* KeyVault updates (#42368)

* KeyVault updates

* fix

* assets

* Generate bicep for additional libraries needed for Aspire (#42375)

* Generate bicep for additional libraries needed for Aspire

* more

* cognitive

* fix

* Add Redis resources (#42380)

* Add Redis resources

* API

* Use listkeys (#42383)

* Use listkeys

* regen

* add param

* Postgres support (#42384)

* postgres

* postgres support

* Allow duplicate property assignment and support existing resources (#42416)

* Allow duplicate property assignment and support existing resources

* API

* PR fb

* update FromExisting to always treat as expression (#42434)

* update FromExisting to always treat as expression
add FromExisting to all resources

* update api

* Cosmosdb (#42463)

* Add Cosmos

* regen

* update test

* postgres fixes

* fix test

* Pass defaults for sku

* fixes

* make parent required for child resources in FromExisting

* Add Cognitive Services support (#42477)

* postgres fixes (#42520)

* postgres fixes

* Don't auto add params

* use const

* api

* change default api version

* regen api (#42523)

* Add Service Bus resources (#42532)

* Add ServiceBus resources

* api

* fix

* cspell

* update autorest

* regen using latest alpha autorest.csharp

* sb

* websites

* remove npx cache

* Update package refs (#42579)

* Support adding outputs that use interpolated strings (#42597)

* Support adding outputs that use interpolated strings

* Add single quotes within API

* revert change to auto-add single quotes

* regen search

* regen signalr

* Use globally unique name for top level resources (#42613)

* Use globally unique name for top level resources

* api

* Add event hubs bicep serialization (#42615)

* Add role definition and skuname (#42631)

* Add role definition and skuname

* api

* Add search resource (#42610)

* Add search resource

* update test

* update test case

* assets

* Add EventHubs resources (#42636)

* Add EventHubs resources

* rename

* Add test cases

* Add SignalR resource (#42643)

* Add SignalR resource

* api

* Rename

* api

* cspell

* cspell

* Generate bicep for mysql (#42659)

* Fix API versions and remove output from AppConfig resource (#42669)

* Fix API versions and remove output from AppConfig resource

* api

* use api version from arm libraries

* assets

* Generate app insights bicep serialization (#42702)

* App insights resource (#42706)

* App insights resource

* record test

* Update FromExisting test

* bicep file

* api

* api

* set workspace id in test

* assets

* Generate bicep serialization for container apps (#42678)

* Generate bicep serialization for container apps

* bump autorest

* regen

* regen RM

* regen

* revert nuget.config

* use correct autorest

* changetrackingdictionary suppression

* add helper suppression

* regen

* Add operational insights resource (#42744)

* Add operational insights resource

* fix test and cspell false positive

* pr fb

* Op fix (#42750)

* fix resource type

* rerecord

* Add bicep serialization for managed identity (#42762)

* User assigned identities (#42768)

* Add user assigned identity resource

* bicep

* regen

* regen

* regen

* remove flag for container apps

* remove bicep serialization from mysql and containerapps

* regen containerregistry and add helper suppression for postgres

* regen postgres

* container registry

* Update RM version

* regen

* Update property name

* rename

* ignore

* regen

---------

Co-authored-by: m-nash <[email protected]>
Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: azure-sdk <[email protected]>
Co-authored-by: Mitch Denny <[email protected]>
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

Successfully merging this pull request may close these issues.

Add sanitizer to StorageAccount resource name
4 participants