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

Implement common az resource aliases for intellisense #6387

Closed
ucheNkadiCode opened this issue Mar 31, 2022 · 10 comments · Fixed by #13721
Closed

Implement common az resource aliases for intellisense #6387

ucheNkadiCode opened this issue Mar 31, 2022 · 10 comments · Fixed by #13721
Assignees
Labels
devdiv Related to Bicep tooling efforts in DevDiv
Milestone

Comments

@ucheNkadiCode
Copy link
Contributor

ucheNkadiCode commented Mar 31, 2022

There are two ways that we want to provide suggestions in order to achieve #6249. Ultimately this would include adding tags such as "k8s", "kubernetes", or "cluster" to the description metadata of specific resources and snippets.
The first would be considered snippet suggestions

  • "res-aks-cluster"
    image

The second would be resource suggestions
image

Again we would accomplish improving the searchability through tags.

Do you have any examples of resources or snippets that are named confusingly? What tags/searchable terms would you expect for res-ask-cluster? What tags would you expect for Microsoft.Web/sites@2018-11-01?

@ucheNkadiCode ucheNkadiCode added the discussion This is a discussion issue and not a change proposal. label Mar 31, 2022
@ghost ghost added the Needs: Triage 🔍 label Mar 31, 2022
@ucheNkadiCode ucheNkadiCode added devdiv Related to Bicep tooling efforts in DevDiv and removed Needs: Triage 🔍 labels Mar 31, 2022
@BernieWhite
Copy link

RBAC

resource rbac 'Microsoft.Authorization/roleAssignments@2021-04-01-preview' = {
  name: guid(storageAccount.id, principalId, roleDefinitionId)
  scope: storageAccount
  properties: {
    principalId: principalId
    roleDefinitionId: roleDefinitionId
    principalType: principalType
    description: description
  }
}

@Jaykul
Copy link
Contributor

Jaykul commented Mar 31, 2022

It would be wonderful if "serverFarms" was (searchable as) "appServicePlan" or "appService" or "asp"

@ChrisSidebotham
Copy link

I would be great to have a similar snippet for cosmosDbAccounts instead of Microsoft.DocumentDB/Accounts

@Jaykul
Copy link
Contributor

Jaykul commented Mar 31, 2022

What about snippets for the new public module resources? How would you pick when to use one versus the other?
Should you let the community write snippet collections, instead of spending your time on it?

@azMantas
Copy link
Contributor

I would like to see logAnalytics as a searchable term for Microsoft.OperationalInsights/workspaces

@ucheNkadiCode
Copy link
Contributor Author

ucheNkadiCode commented Apr 1, 2022

What about snippets for the new public module resources? How would you pick when to use one versus the other? Should you let the community write snippet collections, instead of spending your time on it?

Wassup @Jaykul , thanks for your question. Community members are always welcome to contribute! We're just trying to take a look at a first pass of adding functionality to support easier searching through resources. @alex-frankel What do you think about "searchability" of public resources? This is a good question

@alex-frankel
Copy link
Collaborator

One thing we are planning to do for discovering public modules is to support completions for registry references.

This will show up when you type:

module foo '

At which point br/public should show up in the list. Selecting that alias would then show the full list of available modules, similar to this list:
image

Do we think that goes far enough to help with discovery?

@alex-frankel alex-frankel removed the discussion This is a discussion issue and not a change proposal. label Oct 17, 2022
@puicchan puicchan added this to the v0.26 milestone Feb 1, 2024
@StephenWeatherford
Copy link
Contributor

@puicchan Need list of aliases to support, thanks.

@StephenWeatherford
Copy link
Contributor

StephenWeatherford commented Feb 22, 2024

Snippet keywords

Snippet name Add keyword Notes
res-aks-cluster k8s,kubernetes Uche(above) image
image
image
image
image
image

Resource keywords

RP Add keyword/alias
microsoft.web/sites appservice, webapp, function
microsoft.web/serverfarms appserviceplan
microsoft.app containerapp
microsoft.cache redis
microsoft.ContainerService aks

@StephenWeatherford
Copy link
Contributor

Microsoft.Web/sites: webapp
Microsoft.Web/serverfarms: hosting plan

@StephenWeatherford StephenWeatherford modified the milestones: v0.26, v0.27 Mar 6, 2024
@StephenWeatherford StephenWeatherford changed the title Snippet and Resource Suggestions Discussion We should be finding some resources by common terms/aliases (e.g. find serverfarms by typing in appserviceplan) Mar 6, 2024
@StephenWeatherford StephenWeatherford changed the title We should be finding some resources by common terms/aliases (e.g. find serverfarms by typing in appserviceplan) Implement common az resource aliases for intellisense Mar 7, 2024
StephenWeatherford added a commit that referenced this issue Apr 4, 2024
Fixes #6387
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/13721)

---------

Co-authored-by: Stephen Weatherford <Stephen.Weatherford.com>
StephenWeatherford added a commit that referenced this issue Apr 11, 2024
…er keyword support for resource snippets (#13731)

Another part of #6387

1) Hopefully fix update baselines script (unrelated)
2) vscode handles spaces between than commas
3) prioritize the actual resource name over the keywords by placing them
first
4) Added a couple more aliases
5) Implement filtering for snippets:
  a) add snippet description to filter
b) add resource types and keywords for all resources used in the snippet


###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/13731)

---------

Co-authored-by: Stephen Weatherford <Stephen.Weatherford.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devdiv Related to Bicep tooling efforts in DevDiv
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants