Comments (8)
What's the type of array items with this syntax?
// output with a value calculated by a loop (output copy loop in JSON):
output myLoopyOutput array = [for myItem in myArray {
myProperty: myItem.myOtherProperty
}]
How to declare an output for resourceIds in sqlDatabases?
resource[] sqlDatabases 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2020-03-01' [
for dbindex in length(param.databaseName) {
<db properties>
}
]
from bicep.
With this proposal, output declarations may scatter in a .arm file, right?
from bicep.
Same as parameters - yup.
from bicep.
The other part I forgot to mention was that we brought up the idea of enforcing order in a file (inputs at the top, etc.) at our discussions with DevDiv folks and they felt it was better left up to the user and the auto formatter. The main reason given was that when a user is merging two files together by concatenating them together, nothing will compile until they fix the order.
from bicep.
Discussion notes from 7/1/2020 team meeting about outputs:
- Need to figure out if condition is actually useful on outputs. How do you consume a condition if it may not exist?
- Does
secureString
andsecureObject
type in outputs allow passing the value around?
from bicep.
We have consensus on minimal output declarations, but need to investigate secure types and conditions to commit to syntax for those.
from bicep.
Conditions on outputs and secure types on outputs are not that useful, so we will not support them in the bicep language. There is no remaining scenario that would require a modifier syntax for outputs. Therefore the proposal is reduced to the following:
// output value referencing a resource identifier
output myEndpoint string = myResource.properties.endpoint
// hard-coded output
output myHardcodedOutput int = 42
// output with a value calculated by a loop (output copy loop in JSON):
output myLoopyOutput array = [for myItem in myArray {
myProperty: myItem.myOtherProperty
}]
As we appear to have team consensus on this syntax, I will send a spec pull request shortly and close this issue.
from bicep.
Created #67
from bicep.
Related Issues (20)
- Extend environment() function to expose Azure RBAC roles HOT 1
- Support nested loops HOT 3
- Reformat code
- Support for creation of Power Platform Connector while publishing API using Azure DevOps
- Configure deployment scopes using configuration files in VS Code deployment pane
- Implicit dependencies not consistenly waited for HOT 2
- Description for parameters * is not shown
- Imported user defined types from modules in private container registry cause fatal crash HOT 4
- "Microsoft.Maintenance/configurationAssignments" BICEP giving unexpected generic error suddenly withot code changes HOT 15
- Unable to access `existing` resource properties with `ThirdPartyResourceTypes`
- Deployment Pane: Add a quick way to reload parameters file
- Allow the use of utcNow() in bicepparam files
- Azure CLI/Bicep Deployment Ignores Inline Parameters when Supplied with bicepparam File HOT 3
- Bicep is not willing to deploy an almost empty file HOT 4
- Using a whole resource body type as a parameter type throws an unhandled exception
- Deployment Script WhatIf output HOT 2
- Bicep Application Gateway HOT 1
- Bicep what-if should catch changes to read-only properties
- Newline formatting - support both approaches HOT 1
- Azure Front Door standard - Not able to add multiple routes to the same front door end point. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bicep.