-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adding tags parameters with radapp defaults to Azure Recipes #60
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,20 @@ param actorStateStore bool = false | |
@description('The name of the container to create within the Azure storage account and to reference within the Dapr component.') | ||
var containerName = context.resource.name | ||
|
||
@description('The user-defined tags that will be applied to the resource. Default is null') | ||
param tags object = {} | ||
|
||
@description('The Radius specific tags that will be applied to the resource') | ||
var radiusTags = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just attempted to deploy this Recipe and got this error message:
Looking in the Azure portal I also get the same error message: We should switch to using another character, maybe cc/ @rynowak There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AaronCrawfis I've changed the character now to a hyphen :) Question - Do the tests just work for the local recipes? If so, could we introduce tests to test the Azure/AWS recipes as part of the workflow? Initially I thought using ephemeral environments for each cloud to do this, but not 100% on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Currently yes, we just test local-dev Recipes as we can run them in-cluster without needing external cloud resources. We do want to add full integration tests for cloud resources, we just haven't gotten it setup yet. I opened #62 to track this work. |
||
'radapp.io-environment': context.environment.id | ||
'radapp.io-application': context.application == null ? '' : context.application.id | ||
'radapp.io-resource': context.resource.id | ||
} | ||
|
||
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = { | ||
name: 'recipe${uniqueString(context.resource.id, resourceGroup().id)}' | ||
location: location | ||
tags: union(tags, radiusTags) | ||
sku: { | ||
name: 'Standard_ZRS' | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AaronCrawfis did you want these to be the names or ids? We used names here
For @willvelida the id will be a long string like
/planes/radius/local/..../Applications.Core/applications/my-cool-app
.The name will be
my-cool-app
.There's also a special-case to handle where the application can be null. You can see how we handled that here: https://github.com/radius-project/recipes/blob/main/local-dev/rabbitmqqueues.bicep#L60
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are going to be used to identify an application within the Azure portal and not used for programmatic matching within a namespace, my preference is IDs. That way you can fully identity what's using this resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rynowak @AaronCrawfis I've kept the IDs in, but I've added null checking for the application. Hopefully this meets both requirements? 🙂