microscopic-appointment-31082
04/08/2022, 4:40 PMLogMetricTriggerArgs
with a ThresholdOperator
of ConditionOperator.GreaterThanOrEqual.ToString()
with a Threshold
of 1
The rule gets deployed but in Azure, the rule changes to simply be Greater than 1microscopic-appointment-31082
04/08/2022, 4:41 PMGreater Than or Equal
anyway, should I use Greater Than
0 instead?microscopic-appointment-31082
04/08/2022, 4:52 PMfast-dinner-32080
04/08/2022, 9:14 PMcuddly-football-51817
04/11/2022, 9:53 AMmicroscopic-appointment-31082
04/11/2022, 3:01 PMlittle-apartment-30401
04/11/2022, 3:10 PMmysterious-dusk-52695
04/12/2022, 3:59 AMpurple-train-14007
04/12/2022, 6:03 PMpurple-train-14007
04/12/2022, 6:03 PMpurple-train-14007
04/12/2022, 8:31 PMpurple-train-14007
04/12/2022, 8:31 PMpurple-train-14007
04/12/2022, 8:32 PMable-train-72108
04/13/2022, 12:52 AMrough-window-15889
04/13/2022, 5:44 PMwet-noon-14291
04/19/2022, 2:20 PMdamp-honey-93158
04/20/2022, 7:55 PMcold-insurance-72507
04/21/2022, 5:29 AMlatest
.
I expect that if I make a change to the app code this will be detected, and a new docker image is then created (maybe just a few layers).
This will trigger a change in the Template
of the container app, which leads to the creation of a new revision https://docs.microsoft.com/en-us/azure/container-apps/revisions .
Imagining to trigger the pulumi up
from an Azure DevOps pipeline with the Pulumi task, this should be almost perfect for the CI-CD.
So which is the problem: seems that Pulumi detects a change in the container app template also if there are no changes (at least not from the point of view of the source code).
For example, trying to do a pulumi preview
leads to the creation of a new docker image that is then pushed to the registry with the latest tag plus an identifier.
I think this is the culprit of the change in the container app template.
Could you please help me understand this? @tall-librarian-49374 what I’m missing this time 😅?
What i would like is an idempotent behavior, I want to create a revision only in case of a real change in the app source code.lively-whale-42645
04/22/2022, 4:30 PMrough-window-15889
05/03/2022, 4:22 PMmysterious-australia-14256
05/04/2022, 11:19 AMmysterious-australia-14256
05/04/2022, 4:47 PM{
"type": "Microsoft.Web/sites/host/functionKeys",
"apiVersion": "2018-11-01",
"name": "[concat(parameters('functionAppName'), '/default/keyname')]",
"properties": {
"name": "keyname"
}
}
straight-sunset-92336
05/05/2022, 1:45 PMconst managementGroup = new management.ManagementGroup("managementGroup", {
details: {
parent: {
id: "/providers/Microsoft.Management/managementGroups/<id of parent group>",
},
},
displayName: args.groupname,
groupId: groupid,
name: groupid,
});
groupid is prepared like this:
const groupid = randomUuid.id.apply(id => {
if (id === undefined) {
throw new Error("Id is undefined");
}
return id;
});
This is the error message I get:
error: cannot check existence of resource '/providers/Microsoft.Management/managementGroups/<group id of new group>': status code 403, {"error":{"code":"AuthorizationFailed","message":"The client '<my serviceprincipal object id>' with object id '<my serviceprincipal object id>' does not have authorization to perform action 'Microsoft.Management/managementGroups/read' over scope '/providers/Microsoft.Management/managementGroups/<group id of new group>' or the scope is invalid. If access was recently granted, please refresh your credentials."}}
The servicePrincipal has "Management Group Contributor" role on the Tenant Root Groupdamp-honey-93158
05/05/2022, 3:05 PMdamp-honey-93158
05/09/2022, 5:56 AMprivate string SubScope(string id) =>
$"{SubscriptionScope}/providers/Microsoft.Authorization/roleDefinitions/{id}";
incalculable-napkin-4298
05/09/2022, 12:02 PMbulky-kite-69343
05/09/2022, 6:08 PMcold-insurance-72507
05/12/2022, 9:16 AMaz acr build --registry myRegistry --image hello:v1 .
With this specific command the local build context is directly uploaded to the registry and the build will be done by ACR.
I see that we have https://www.pulumi.com/registry/packages/azure-native/api-docs/containerregistry/taskrun/
that can be configured with a DockerBuildRequestArgs
like this
var buildContextArchive = new FileArchive(buildContext);
const string buyBuildTaskRunName = "buy-build-task-run";
var buyBuildTaskRun = new TaskRun(buyBuildTaskRunName, new TaskRunArgs
{
TaskRunName = buyBuildTaskRunName,
RegistryName = containerRegistry.Name,
ResourceGroupName = resourceGroup.Name,
ForceUpdateTag = buyImageNameFull,
RunRequest = new DockerBuildRequestArgs
{
SourceLocation = "here I need the url after the uplaod of the local context",
DockerFilePath = "Dockerfile.buy",
ImageNames =
{
buyImageNameFull
},
IsPushEnabled = true,
NoCache = false,
Type = "DockerBuildRequest",
Platform = new PlatformPropertiesArgs
{
Architecture = "amd64",
Os = "Linux"
}
}
});
but the problem is that SourceLocation
must be a valid url so someway I need to uplaod the local context somewhere (doesn’t work with local hard drive paths). I do not want to point directly to the github repo url (imagine this inside an azure devops pipeline for example…the source code is local, already pulled by the pipeline)able-oyster-47333
05/15/2022, 5:14 PMrough-window-15889
05/16/2022, 4:30 PMrough-window-15889
05/16/2022, 4:30 PMclever-sunset-76585
05/16/2022, 6:32 PMpulumi stack output
and setting it as an output variable using https://docs.microsoft.com/en-us/azure/devops/pipelines/process/set-variables-scripts?view=azure-devops&tabs=bashrough-window-15889
05/16/2022, 6:41 PMclever-sunset-76585
05/16/2022, 6:43 PMrough-window-15889
05/16/2022, 6:45 PMclever-sunset-76585
05/16/2022, 6:45 PM