Skip to content

Commit

Permalink
removing cosmos due to new restrictions on test subscription (#4704)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhvb1989 authored Jan 17, 2025
1 parent ad53ef2 commit 0978fb2
Show file tree
Hide file tree
Showing 10 changed files with 768 additions and 1,985 deletions.

Large diffs are not rendered by default.

2,555 changes: 748 additions & 1,807 deletions cli/azd/test/functional/testdata/recordings/Test_CLI_Aspire_Deploy.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
// the back-end API the front end will call
var apiservice = builder.AddProject<Projects.AspireAzdTests_ApiService>("apiservice");

var cosmos = builder.AddAzureCosmosDB("cosmos");
var cosmosDb = cosmos.AddDatabase("db3");

// worker with no bindings
var workerProj = builder.AddProject<Projects.AspireAzdTests_Worker>("worker");

Expand All @@ -40,7 +37,6 @@
.WithReference(markdownBlobs)
.WithReference(messageQueue)
.WithReference(apiservice)
.WithReference(cosmosDb)
.WithReference(workerProj)
.WithEnvironment("GOVERSION", goVersion);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<AspireVersion>9.0.0-rc.1.24511.1</AspireVersion>
<AspireVersion>9.0.0</AspireVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ properties:
value: pubsub:6379
- name: connectionstrings--requestlog
value: '{{ .Env.STORAGE_TABLEENDPOINT }}'
- name: connectionstrings--cosmos
keyVaultUrl: '{{ .Env.SERVICE_BINDING_KVF2EDECB5_ENDPOINT }}secrets/connectionString'
identity: {{ .Env.AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID }}
template:
containers:
- image: {{ .Image }}
Expand Down Expand Up @@ -63,8 +60,6 @@ properties:
secretRef: connectionstrings--pubsub
- name: ConnectionStrings__requestlog
secretRef: connectionstrings--requestlog
- name: ConnectionStrings__cosmos
secretRef: connectionstrings--cosmos
scale:
minReplicas: 1
tags:
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ module resources 'resources.bicep' = {
}
}

module cosmos 'cosmos/cosmos.module.bicep' = {
name: 'cosmos'
scope: rg
params: {
keyVaultName: resources.outputs.SERVICE_BINDING_KVF2EDECB5_NAME
location: location
}
}
module storage 'storage/storage.module.bicep' = {
name: 'storage'
scope: rg
Expand All @@ -65,8 +57,6 @@ output AZURE_CONTAINER_REGISTRY_NAME string = resources.outputs.AZURE_CONTAINER_
output AZURE_CONTAINER_APPS_ENVIRONMENT_NAME string = resources.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_NAME
output AZURE_CONTAINER_APPS_ENVIRONMENT_ID string = resources.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_ID
output AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN string = resources.outputs.AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN
output SERVICE_BINDING_KVF2EDECB5_ENDPOINT string = resources.outputs.SERVICE_BINDING_KVF2EDECB5_ENDPOINT
output SERVICE_BINDING_KVF2EDECB5_NAME string = resources.outputs.SERVICE_BINDING_KVF2EDECB5_NAME
output STORAGE_BLOBENDPOINT string = storage.outputs.blobEndpoint
output STORAGE_QUEUEENDPOINT string = storage.outputs.queueEndpoint
output STORAGE_TABLEENDPOINT string = storage.outputs.tableEndpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,38 +81,6 @@ resource explicitContributorUserRoleAssignment 'Microsoft.Authorization/roleAssi
}
}

resource kvf2edecb5 'Microsoft.KeyVault/vaults@2023-07-01' = {
name: replace('kvf2edecb5-${resourceToken}', '-', '')
location: location
properties: {
sku: {
name: 'standard'
family: 'A'
}
tenantId: subscription().tenantId
enableRbacAuthorization: true
}
}

resource kvf2edecb5RoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(kvf2edecb5.id, managedIdentity.id, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483'))
scope: kvf2edecb5
properties: {
principalId: managedIdentity.properties.principalId
principalType: 'ServicePrincipal'
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')
}
}

resource kvf2edecb5UserReadRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(kvf2edecb5.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6'))
scope: kvf2edecb5
properties: {
principalId: principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')
}
}

output MANAGED_IDENTITY_CLIENT_ID string = managedIdentity.properties.clientId
output MANAGED_IDENTITY_NAME string = managedIdentity.name
output MANAGED_IDENTITY_PRINCIPAL_ID string = managedIdentity.properties.principalId
Expand All @@ -124,6 +92,4 @@ output AZURE_CONTAINER_REGISTRY_NAME string = containerRegistry.name
output AZURE_CONTAINER_APPS_ENVIRONMENT_NAME string = containerAppEnvironment.name
output AZURE_CONTAINER_APPS_ENVIRONMENT_ID string = containerAppEnvironment.id
output AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN string = containerAppEnvironment.properties.defaultDomain
output SERVICE_BINDING_KVF2EDECB5_ENDPOINT string = kvf2edecb5.properties.vaultUri
output SERVICE_BINDING_KVF2EDECB5_NAME string = kvf2edecb5.name

Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@
}
}
},
"cosmos": {
"type": "azure.bicep.v0",
"connectionString": "{cosmos.secretOutputs.connectionString}",
"path": "cosmos.module.bicep",
"params": {
"keyVaultName": ""
}
},
"worker": {
"type": "project.v0",
"path": "../AspireAzdTests.Worker/AspireAzdTests.Worker.csproj",
Expand All @@ -101,7 +93,6 @@
"ConnectionStrings__messages": "{messages.connectionString}",
"services__apiservice__http__0": "{apiservice.bindings.http.url}",
"services__apiservice__https__0": "{apiservice.bindings.https.url}",
"ConnectionStrings__cosmos": "{cosmos.connectionString}",
"GOVERSION": "{goversion.value}"
},
"bindings": {
Expand Down

0 comments on commit 0978fb2

Please sign in to comment.