Hi, I'm trying to set up Aiven SAML authentication...
# general
a
Hi, I'm trying to set up Aiven SAML authentication with Azure AD, both products supported by official Pulumi providers. The problem I'm facing is that I first need to create the aiven.AccountAuthentication resource, then create the azuread.AzureAdApp resource based on the previous step, then I need to modify the first resource with information I got from the second. Pulumi will complain if I try to mess with the same resource twice. Any ideas?
l
You'll need to provide various parameters as stack references / config values, probably. I do that across 2 projects using stack references and it works fine: 1. up the first project which uses a stack reference from the second project (which doesn't exist, so it returns undefined), and export a value, 2. up the 2nd project that uses that exported value via stack reference, and exports the value mentioned in point 1, 3. up the 1st project, which gets the value from point 2, and updates its resource.
You can do this all in one go if you use automation-api.
Just write that code as if it can get all values, and support the case when it doesn't get them all. Pulumi's declarative approach handles everything beyond that.