-
Notifications
You must be signed in to change notification settings - Fork 8
Feat azd compatible #9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e08fdde
feat: azd compatible
john0isaac 14f252f
feat: azd compatible
john0isaac 7c4d73b
Merge branch 'feat-azd-compatible' of https://github.com/john0isaac/t…
john0isaac 8c140e7
Update README.md
john0isaac 30d91af
add reference to env var
john0isaac e06637f
Merge branch 'feat-azd-compatible' of https://github.com/john0isaac/t…
john0isaac 80574a4
fix cognitive service typo
john0isaac 6c70a10
add KV again
john0isaac 6c93ffa
add key vault for translate key - use it in application
john0isaac 5b2eb6b
feat: use app folder and revert core to original
john0isaac e33db6d
Add or update the Azure App Service build and deployment workflow config
john0isaac 677fe23
proper usage of key vault
john0isaac 5453e82
Merge branch 'feat-azd-compatible' of https://github.com/john0isaac/t…
john0isaac 81a94f8
remove az requirements
john0isaac 0d975ad
remove unnecessary things
john0isaac 5ce31f7
Update some wording
pamelafox b6a0993
ruff fix
pamelafox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
|
@@ -5,3 +5,4 @@ env | |
.coverage | ||
node_modules | ||
.venv | ||
.azure |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
param keyVaultName string | ||
param rgName string | ||
|
||
param name string | ||
param cognitiveServiceName string | ||
|
||
// Store Cognitive Service Key in Key Vault | ||
module cognitiveServiceSecret '../core/security/keyvault-secret.bicep' = { | ||
name: 'cognitiveServiceKey' | ||
params: { | ||
name: name | ||
keyVaultName : keyVaultName | ||
secretValue: listKeys(resourceId(subscription().subscriptionId, rgName, 'Microsoft.CognitiveServices/accounts', cognitiveServiceName), '2023-05-01').key1 | ||
} | ||
} |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@description('The name of the Cognitive Service.') | ||
param name string | ||
|
||
@description('The location into which your Azure resources should be deployed.') | ||
param location string = resourceGroup().location | ||
|
||
@description('The tags to apply to each resource.') | ||
param tags object = {} | ||
|
||
@description('The kind of Cognitive Service to create. See: https://learn.microsoft.com/en-us/azure/cognitive-services/create-account-bicep for available kinds.') | ||
@allowed([ 'CognitiveServices', 'ComputerVision', 'CustomVision.Prediction', 'CustomVision.Training', 'Face', 'FormRecognizer', 'SpeechServices', 'LUIS', 'QnAMaker', 'TextAnalytics', 'TextTranslation', 'AnomalyDetector', 'ContentModerator', 'Personalizer', 'OpenAI' ]) | ||
param kind string | ||
|
||
@description('The name of the SKU. Be aware that not all SKUs may be available for your Subscription. See: https://learn.microsoft.com/en-us/rest/api/cognitiveservices/accountmanagement/resource-skus') | ||
@allowed([ 'F0', 'S0', 'S1', 'S2', 'S3', 'S4' ]) | ||
param sku string | ||
|
||
param publicNetworkAccess string = 'Enabled' | ||
|
||
resource cognitiveService 'Microsoft.CognitiveServices/accounts@2023-05-01' = { | ||
name: name | ||
location: location | ||
tags: tags | ||
sku: { | ||
name: sku | ||
} | ||
kind: kind | ||
properties: { | ||
publicNetworkAccess: publicNetworkAccess | ||
|
||
} | ||
} | ||
|
||
@description('Resource Name') | ||
output name string = cognitiveService.name | ||
|
||
@description('Resource Id') | ||
output id string = cognitiveService.id | ||
|
||
@description('Endpoint') | ||
output endpoint string = cognitiveService.properties.endpoint |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ Flask | |
requests | ||
psycopg2 | ||
Flask-SQLAlchemy | ||
Flask-Migrate | ||
Flask-Migrate |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.