magnificent-eve-10499
02/07/2025, 1:19 AMpulumi up
call. For example can I create a resource, get some unique metadata from it, use that metadata for creating another resource that then provides me with what need to finish setting up the first resource? I am running into a problem where there a re 2 resources that are dependent on each other and the only way I can figure out to get this to work so far is to run pulumi up under one configuration and then re run it again with another configuration.little-cartoon-10569
02/07/2025, 1:52 AMmagnificent-eve-10499
02/07/2025, 1:53 AMlittle-cartoon-10569
02/07/2025, 1:53 AMmagnificent-eve-10499
02/07/2025, 1:53 AMmagnificent-eve-10499
02/07/2025, 1:53 AMlittle-cartoon-10569
02/07/2025, 1:54 AMmagnificent-eve-10499
02/07/2025, 1:55 AMlittle-cartoon-10569
02/07/2025, 1:56 AMmagnificent-eve-10499
02/07/2025, 1:56 AMlittle-cartoon-10569
02/07/2025, 1:57 AMmagnificent-eve-10499
02/07/2025, 1:57 AMlittle-cartoon-10569
02/07/2025, 1:58 AMmagnificent-eve-10499
02/07/2025, 2:00 AMmagnificent-eve-10499
02/07/2025, 2:01 AMlittle-cartoon-10569
02/07/2025, 2:17 AMmagnificent-eve-10499
02/07/2025, 2:18 AMlittle-cartoon-10569
02/07/2025, 2:24 AMmagnificent-eve-10499
02/07/2025, 2:27 AMazure-native:app/v20241002preview:ManagedCertificate (mapCert):
error: Status=400 Code="RequireCustomHostnameInEnvironment" Message="Creating managed certificate requires hostname '<http://map.example.com|map.example.com>' added as a custom hostname to a container app in environment 'marketing-env'"
magnificent-eve-10499
02/07/2025, 2:48 AMmagnificent-eve-10499
02/07/2025, 2:52 AMlittle-cartoon-10569
02/07/2025, 3:00 AMlittle-cartoon-10569
02/07/2025, 3:00 AMmagnificent-eve-10499
02/07/2025, 3:04 AMconst azureCustomDomainResource = new azure.containerapp.CustomDomain("azureCustomDomainResource", {
containerAppId: "string",
certificateBindingType: "string",
containerAppEnvironmentCertificateId: "string",
name: "string",
});
magnificent-eve-10499
02/07/2025, 3:05 AMlittle-cartoon-10569
02/07/2025, 3:07 AMlittle-cartoon-10569
02/07/2025, 3:07 AMapply()
, of course)magnificent-eve-10499
02/07/2025, 3:08 AMmagnificent-eve-10499
02/07/2025, 3:11 AMlittle-cartoon-10569
02/07/2025, 3:53 AMmagnificent-eve-10499
02/07/2025, 3:53 AMlittle-cartoon-10569
02/07/2025, 3:54 AMapply()
?magnificent-eve-10499
02/07/2025, 3:55 AMlittle-cartoon-10569
02/07/2025, 3:56 AMmagnificent-eve-10499
02/07/2025, 3:57 AMlittle-cartoon-10569
02/07/2025, 3:58 AMmagnificent-eve-10499
02/07/2025, 3:59 AMDiagnostics:
azure:containerapp:CustomDomain (mapCustomDomain):
error: azure:containerapp/customDomain:CustomDomain resource 'mapCustomDomain' has a problem: parsing "/subscriptions/[secret]/resourceGroups/marketingResGrp/providers/Microsoft.App/managedEnvironments/marketing-env/managedCertificates/map": parsing segment "staticCertificates": parsing the Certificate ID: the segment at position 8 didn't match
Expected a Certificate ID that matched:
> /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.App/managedEnvironments/managedEnvironmentName/certificates/certificateName
However this value was provided:
> /subscriptions/[secret]/resourceGroups/marketingResGrp/providers/Microsoft.App/managedEnvironments/marketing-env/managedCertificates/map
The parsed Resource ID was missing a value for the segment at position 8
(which should be the literal value "certificates").
. Examine values at 'mapCustomDomain.containerAppEnvironmentCertificateId'.
magnificent-eve-10499
02/07/2025, 4:02 AMlittle-cartoon-10569
02/07/2025, 4:05 AMmagnificent-eve-10499
02/07/2025, 4:10 AMlittle-cartoon-10569
02/07/2025, 4:12 AMmagnificent-eve-10499
02/07/2025, 3:47 PMpulumi up
.
1. create the managed env, networking, etc as normal
2. create the containerApp with custom domains that have the name
set and the bindingType
set to disabled
(no other properties in the customDomains should be set). it should have a dependency on the environment
3. Create the DNS records dependent on both the environment and the containerApp
4. create the managedCertificates needed with a dependency on the containerapp
5. At this point you have all the resources configured however the certificate is not bound to the container app and there is not a way to do this through the api. All of the outstanding terraform issues on github show this as unresolved. So the binding needs to be done through the cli using command.local.command
with az containerapp hostname bind
This needs to trigger
on the cert.systemData.LastModifiedAt
and depend on the containerApp, the Environment, and the Cert. If there are more than one cert being added then youe commands must be dependent on eachother so they fire in series and not in parallel.