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

AppConfig for CDK #42623

Closed
Tracked by #42348
mitchdenny opened this issue Mar 12, 2024 · 1 comment
Closed
Tracked by #42348

AppConfig for CDK #42623

mitchdenny opened this issue Mar 12, 2024 · 1 comment
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Provisioning

Comments

@mitchdenny
Copy link
Contributor

mitchdenny commented Mar 12, 2024

The following does not work with AppConfig:

store.AssignProperty(x => x.SkuName, "standard");

This will emit Bicep with the sku name being set to to free.

We also need role definitions. Here is the Bicep we have in Aspire right now (not what CDK generates):

param configName string

param principalId string

param principalType string = 'ServicePrincipal'

param sku string = 'free'

param location string = resourceGroup().location

var resourceToken = uniqueString(resourceGroup().id)

resource appConfig 'Microsoft.AppConfiguration/configurationStores@2023-03-01'= {
  name: replace('${configName}-${resourceToken}', '-', '')
  location: location
  sku: {
    name: sku
  }
}

resource AppConfigRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(appConfig.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b'))
  scope: appConfig
  properties: {
    principalId: principalId
    principalType: principalType
    roleDefinitionId:  subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b')
  }
}

output appConfigEndpoint string = appConfig.properties.endpoint

Ideally we would be would have types that allow us to set config values as well during deployment although we don't have that on the Aspire API surface yet.

@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 12, 2024
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Provisioning and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Mar 12, 2024
@JoshLove-msft
Copy link
Member

Fixed in #42631

@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Provisioning
Projects
None yet
Development

No branches or pull requests

3 participants