-
Notifications
You must be signed in to change notification settings - Fork 775
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
Feedback on Modules #490
Comments
Will can you provide a bit more context into what was awkward about passing outputs? Was it the syntax being too verbose? Was there not enough tooling support so you couldn't see which outputs were available for a given linked template? |
Passing parameters (outputs) back and forth between linked templates should be like calling a subroutine in a program, passing parameters and getting return values. This should be true even though the linked deployments are run in parallel. I know that you can work with dependencies but it is a bit awkward. |
Can you provide a little pseudo-code to express what your ideal would look like? Based on the current spec, passing values between modules will look something like this: In
Is that close to what you would be expecting? |
Sorry it took me so long to respond.
Not sure if that answers my question. Of course I may be asking the wrong question.
Maybe it would help if I described a project that I worked on involving linked templates. I am working from memory because I have changed jobs and no longer have access to the code.
In that project I created 36 VMs in 15 scale sets using 16 Linked Templates.
The first template deployment created the network resources (VNet/Subnets, etc.) and the storage accounts.
All the remining template deployments had to depend on those resources.
Each linked template of course ran a deployment in parallel depending on the main template and occasionally on resources created in the other linked templates.
Dependencies were based on the creation of Outputs in each template.
It seemed very difficult to handle the inter-template dependency references.
Bill
Bill Zack
Cloud Solutions Architect
Email<mailto:[email protected]>, Blog<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcloudyinnashville.com%2F&data=02%7C01%7C%7C38da79dfc0ea4c756ce908d7d45df8d8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637211372378165245&sdata=eDBSfIfCuuZpFGv3bKzREpt8ZXNXAU3uYta6hMdTsrA%3D&reserved=0>, LinkedIn<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fwilliamzack%2F&data=02%7C01%7C%7C38da79dfc0ea4c756ce908d7d45df8d8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637211372378175242&sdata=fkQ6rUPbpGRolVUeu%2FQi0HqnsN5BKsLUn42pfj9N9MU%3D&reserved=0>, Twitter<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FWilliamHZack&data=02%7C01%7C%7C38da79dfc0ea4c756ce908d7d45df8d8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637211372378185238&sdata=BVZrE5h1pMFa7pPnMnCWX7tAEsujE7pbIc1zCujxLjI%3D&reserved=0>
President, Nashville Microsoft Azure Users Group<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.nashazure.com%2F&data=02%7C01%7C%7C38da79dfc0ea4c756ce908d7d45df8d8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637211372378155262&sdata=kPbTfPGIGs8o2LDtq0qac8isdMyx%2FffiImQ03lOR6IQ%3D&reserved=0>
From: Alex Frankel <[email protected]>
Sent: Monday, September 21, 2020 2:25 PM
To: Azure/bicep <[email protected]>
Cc: Bill Zack <[email protected]>; Author <[email protected]>
Subject: Re: [Azure/bicep] Feedback on Modules (#490)
Can you provide a little pseudo-code to express what your ideal would look like?
Based on the current spec, passing values between modules will look something like this:
In main.bicep:
param namePrefix string
param location string
module dataTier './modules/dataTier.bicep' = {
namePrefix: namePrefix
location: location
size: 'Large'
}
module backend './modules/backend.bicep' = {
namePrefix: namePrefix
port: 80
size: 'Medium'
dataConnectionString: dataTier.outputs.connectionString // passing values between modules, dependency would be automatically determined
}
output backendUrl string = backend.outputs.backendUrl
Is that close to what you would be expecting?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fbicep%2Fissues%2F490%23issuecomment-696321459&data=02%7C01%7C%7C84a57de7a9fa4f4c810108d85e6407bd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637363130996175896&sdata=lsX70EfJr2axt2iUaY6uuKpCIo%2FdZCa3qirdXc2nFpU%3D&reserved=0>, or unsubscribe<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABEN2UEMRA6KSJLCQYGTKS3SG6SATANCNFSM4RNNZS2Q&data=02%7C01%7C%7C84a57de7a9fa4f4c810108d85e6407bd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637363130996185876&sdata=kmO3BrvaNmDmBjnt9citGR9xiE4A7o0VFZS00BHqLpk%3D&reserved=0>.
|
I'll add my 2c to this discussion... I'd really like modules to be able to output resources. |
I recently worked on a project to create a large environment creating 36 VMs via 16 linked ARM templates.
One of the awkward things to do with ARM is passing Outputs between linked template deployments.
I would hope that the implementation of "Modules" that was mentioned would make that a lot easier.
The text was updated successfully, but these errors were encountered: