sparse-intern-71089
04/22/2021, 2:51 PMtall-librarian-49374
04/22/2021, 2:53 PMtall-librarian-49374
04/22/2021, 2:53 PMsteep-beard-51215
04/22/2021, 2:54 PMtall-librarian-49374
04/22/2021, 2:54 PMsteep-beard-51215
04/22/2021, 2:54 PMaz acr build
steep-beard-51215
04/22/2021, 2:55 PMcontainerregistry.TaskRun
but the output is
azure-native:containerregistry:TaskRun (container-build):
error: Code="InvalidRequestBody" Message="The request body is required for this request. Check if the body is not empty. If the request expects a polymorphic type, check if it has the discriminator property and is one of the described values." Target="request"
tall-librarian-49374
04/22/2021, 2:57 PMsteep-beard-51215
04/22/2021, 2:58 PMtall-librarian-49374
04/22/2021, 3:00 PMsteep-beard-51215
04/22/2021, 3:01 PM_, err = cr.NewTaskRun(ctx, "container-build", &cr.TaskRunArgs{
RegistryName: registry.Name,
ResourceGroupName: rg.Name,
Location: registry.Location,
RunRequest: cr.DockerBuildRequestArgs{
Target: pulumi.String("request"),
DockerFilePath: pulumi.String("build/package"),
IsPushEnabled: pulumi.Bool(true),
LogTemplate: pulumi.String("acr/tasks:{{.Run.OS}}"),
Platform: &cr.PlatformPropertiesArgs{
Os: cr.OSLinux,
},
Arguments: cr.ArgumentArray{
cr.ArgumentArgs{
Name: pulumi.String("ADOPTOPENJDK_VERSION"),
Value: pulumi.String("11-openj9"),
},
},
ImageNames: imageNames,
},
})
steep-beard-51215
04/22/2021, 3:02 PMIdentity: cr.IdentityPropertiesArgs{
Type: &cr.ResourceIdentityTypeSystemAssigned,
},
steep-beard-51215
04/22/2021, 3:03 PMResourceIdentityTypeSystemAssigned
is a const. It’s not possible to pass the reference using &
. We need to declare a variable something := cr.ResourceIdentityTypeSystemAssigned
and then use Type: &something
tall-librarian-49374
04/22/2021, 3:16 PMtall-librarian-49374
04/22/2021, 3:21 PMtall-librarian-49374
04/22/2021, 3:22 PMsteep-beard-51215
04/22/2021, 3:27 PMtall-librarian-49374
04/22/2021, 3:28 PMsteep-beard-51215
04/22/2021, 3:29 PMApplyT
from string
to map[string]cr.CustomRegistryCredentialsInput
registry.LoginServer.ApplyT(customRegistryCredentialsApplyFn).(cr.CustomRegistryCredentialsMapOutput)
panics (the function returns the raw map)steep-beard-51215
04/22/2021, 4:01 PMType: pulumi.String("DockerBuildRequest")
which is missing in the documentationsteep-beard-51215
04/22/2021, 4:02 PMtall-librarian-49374
04/22/2021, 6:42 PMtall-librarian-49374
04/22/2021, 6:42 PM