-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use new metadata to persist parameters required for deploy
- Loading branch information
Showing
14 changed files
with
134 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cli/azd/test/functional/testdata/samples/aspire-full/Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<AspireVersion>8.2.0</AspireVersion> | ||
<AspireVersion>9.0.0-rc.1.24511.1</AspireVersion> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 17 additions & 23 deletions
40
cli/azd/test/functional/testdata/snaps/aspire-full/cosmos.module.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,48 @@ | ||
targetScope = 'resourceGroup' | ||
|
||
@description('') | ||
@description('The location for the resource(s) to be deployed.') | ||
param location string = resourceGroup().location | ||
|
||
@description('') | ||
param keyVaultName string | ||
|
||
|
||
resource keyVault_IeF8jZvXV 'Microsoft.KeyVault/vaults@2022-07-01' existing = { | ||
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = { | ||
name: keyVaultName | ||
} | ||
|
||
resource cosmosDBAccount_MZyw35gqp 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = { | ||
name: toLower(take('cosmos${uniqueString(resourceGroup().id)}', 24)) | ||
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-08-15' = { | ||
name: take('cosmos-${uniqueString(resourceGroup().id)}', 44) | ||
location: location | ||
tags: { | ||
'aspire-resource-name': 'cosmos' | ||
} | ||
kind: 'GlobalDocumentDB' | ||
properties: { | ||
databaseAccountOfferType: 'Standard' | ||
consistencyPolicy: { | ||
defaultConsistencyLevel: 'Session' | ||
} | ||
locations: [ | ||
{ | ||
locationName: location | ||
failoverPriority: 0 | ||
} | ||
] | ||
consistencyPolicy: { | ||
defaultConsistencyLevel: 'Session' | ||
} | ||
databaseAccountOfferType: 'Standard' | ||
} | ||
kind: 'GlobalDocumentDB' | ||
tags: { | ||
'aspire-resource-name': 'cosmos' | ||
} | ||
} | ||
|
||
resource cosmosDBSqlDatabase_tiaTwUqx8 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2023-04-15' = { | ||
parent: cosmosDBAccount_MZyw35gqp | ||
resource db3 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2024-08-15' = { | ||
name: 'db3' | ||
location: location | ||
properties: { | ||
resource: { | ||
id: 'db3' | ||
} | ||
} | ||
parent: cosmos | ||
} | ||
|
||
resource keyVaultSecret_Ddsc3HjrA 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = { | ||
parent: keyVault_IeF8jZvXV | ||
resource connectionString 'Microsoft.KeyVault/vaults/secrets@2023-07-01' = { | ||
name: 'connectionString' | ||
location: location | ||
properties: { | ||
value: 'AccountEndpoint=${cosmosDBAccount_MZyw35gqp.properties.documentEndpoint};AccountKey=${cosmosDBAccount_MZyw35gqp.listkeys(cosmosDBAccount_MZyw35gqp.apiVersion).primaryMasterKey}' | ||
value: 'AccountEndpoint=${cosmos.properties.documentEndpoint};AccountKey=${cosmos.listKeys().primaryMasterKey}' | ||
} | ||
parent: keyVault | ||
} | ||
|
40 changes: 17 additions & 23 deletions
40
cli/azd/test/functional/testdata/snaps/aspire-full/infra/cosmos/cosmos.module.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,48 @@ | ||
targetScope = 'resourceGroup' | ||
|
||
@description('') | ||
@description('The location for the resource(s) to be deployed.') | ||
param location string = resourceGroup().location | ||
|
||
@description('') | ||
param keyVaultName string | ||
|
||
|
||
resource keyVault_IeF8jZvXV 'Microsoft.KeyVault/vaults@2022-07-01' existing = { | ||
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = { | ||
name: keyVaultName | ||
} | ||
|
||
resource cosmosDBAccount_MZyw35gqp 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = { | ||
name: toLower(take('cosmos${uniqueString(resourceGroup().id)}', 24)) | ||
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-08-15' = { | ||
name: take('cosmos-${uniqueString(resourceGroup().id)}', 44) | ||
location: location | ||
tags: { | ||
'aspire-resource-name': 'cosmos' | ||
} | ||
kind: 'GlobalDocumentDB' | ||
properties: { | ||
databaseAccountOfferType: 'Standard' | ||
consistencyPolicy: { | ||
defaultConsistencyLevel: 'Session' | ||
} | ||
locations: [ | ||
{ | ||
locationName: location | ||
failoverPriority: 0 | ||
} | ||
] | ||
consistencyPolicy: { | ||
defaultConsistencyLevel: 'Session' | ||
} | ||
databaseAccountOfferType: 'Standard' | ||
} | ||
kind: 'GlobalDocumentDB' | ||
tags: { | ||
'aspire-resource-name': 'cosmos' | ||
} | ||
} | ||
|
||
resource cosmosDBSqlDatabase_tiaTwUqx8 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2023-04-15' = { | ||
parent: cosmosDBAccount_MZyw35gqp | ||
resource db3 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2024-08-15' = { | ||
name: 'db3' | ||
location: location | ||
properties: { | ||
resource: { | ||
id: 'db3' | ||
} | ||
} | ||
parent: cosmos | ||
} | ||
|
||
resource keyVaultSecret_Ddsc3HjrA 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = { | ||
parent: keyVault_IeF8jZvXV | ||
resource connectionString 'Microsoft.KeyVault/vaults/secrets@2023-07-01' = { | ||
name: 'connectionString' | ||
location: location | ||
properties: { | ||
value: 'AccountEndpoint=${cosmosDBAccount_MZyw35gqp.properties.documentEndpoint};AccountKey=${cosmosDBAccount_MZyw35gqp.listkeys(cosmosDBAccount_MZyw35gqp.apiVersion).primaryMasterKey}' | ||
value: 'AccountEndpoint=${cosmos.properties.documentEndpoint};AccountKey=${cosmos.listKeys().primaryMasterKey}' | ||
} | ||
parent: keyVault | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 27 additions & 33 deletions
60
cli/azd/test/functional/testdata/snaps/aspire-full/infra/storage/storage.module.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,67 @@ | ||
targetScope = 'resourceGroup' | ||
|
||
@description('') | ||
@description('The location for the resource(s) to be deployed.') | ||
param location string = resourceGroup().location | ||
|
||
@description('') | ||
param principalId string | ||
|
||
@description('') | ||
param principalType string | ||
|
||
|
||
resource storageAccount_1XR3Um8QY 'Microsoft.Storage/storageAccounts@2022-09-01' = { | ||
name: toLower(take('storage${uniqueString(resourceGroup().id)}', 24)) | ||
resource storage 'Microsoft.Storage/storageAccounts@2024-01-01' = { | ||
name: take('storage${uniqueString(resourceGroup().id)}', 24) | ||
kind: 'StorageV2' | ||
location: location | ||
tags: { | ||
'aspire-resource-name': 'storage' | ||
} | ||
sku: { | ||
name: 'Standard_GRS' | ||
} | ||
kind: 'StorageV2' | ||
properties: { | ||
accessTier: 'Hot' | ||
allowSharedKeyAccess: false | ||
minimumTlsVersion: 'TLS1_2' | ||
networkAcls: { | ||
defaultAction: 'Allow' | ||
} | ||
minimumTlsVersion: 'TLS1_2' | ||
allowSharedKeyAccess: false | ||
} | ||
tags: { | ||
'aspire-resource-name': 'storage' | ||
} | ||
} | ||
|
||
resource blobService_vTLU20GRg 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01' = { | ||
parent: storageAccount_1XR3Um8QY | ||
resource blobs 'Microsoft.Storage/storageAccounts/blobServices@2024-01-01' = { | ||
name: 'default' | ||
properties: { | ||
} | ||
parent: storage | ||
} | ||
|
||
resource roleAssignment_Gz09cEnxb 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
scope: storageAccount_1XR3Um8QY | ||
name: guid(storageAccount_1XR3Um8QY.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')) | ||
resource storage_StorageBlobDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(storage.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')) | ||
properties: { | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe') | ||
principalId: principalId | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe') | ||
principalType: principalType | ||
} | ||
scope: storage | ||
} | ||
|
||
resource roleAssignment_HRj6MDafS 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
scope: storageAccount_1XR3Um8QY | ||
name: guid(storageAccount_1XR3Um8QY.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')) | ||
resource storage_StorageTableDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(storage.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')) | ||
properties: { | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3') | ||
principalId: principalId | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3') | ||
principalType: principalType | ||
} | ||
scope: storage | ||
} | ||
|
||
resource roleAssignment_r0wA6OpKE 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
scope: storageAccount_1XR3Um8QY | ||
name: guid(storageAccount_1XR3Um8QY.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')) | ||
resource storage_StorageQueueDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = { | ||
name: guid(storage.id, principalId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')) | ||
properties: { | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88') | ||
principalId: principalId | ||
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88') | ||
principalType: principalType | ||
} | ||
scope: storage | ||
} | ||
|
||
output blobEndpoint string = storageAccount_1XR3Um8QY.properties.primaryEndpoints.blob | ||
output queueEndpoint string = storageAccount_1XR3Um8QY.properties.primaryEndpoints.queue | ||
output tableEndpoint string = storageAccount_1XR3Um8QY.properties.primaryEndpoints.table | ||
output blobEndpoint string = storage.properties.primaryEndpoints.blob | ||
|
||
output queueEndpoint string = storage.properties.primaryEndpoints.queue | ||
|
||
output tableEndpoint string = storage.properties.primaryEndpoints.table |
Oops, something went wrong.