Skip to content

reference an existing Group by name #3207

Discussion options

You must be logged in to vote

Bicep needs the name of the Microsoft.ApiManagement/service parent resource, in order to uniquely identify the group. You have two options:

  • Format the name manually:

    var parentName = 'myService'
    resource mygroup 'Microsoft.ApiManagement/service/groups@2021-01-01-preview' existing = {
      name: '${parentName}/MyGroup'
    }
  • Declare the parent service independently:

    resource myService 'Microsoft.ApiManagement/service@2021-01-01-preview' existing = {
      name: 'myService'
    }
    
    resource mygroup 'Microsoft.ApiManagement/service/groups@2021-01-01-preview' existing = {
      parent: myService
      name: 'MyGroup'
    }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brwilkinson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants