Skip to content
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

Allow all type syntax in output declarations #10052

Merged
merged 4 commits into from
Mar 13, 2023
Merged

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Mar 8, 2023

Resolves #9570.

This PR allows any and all type syntax in output statements, including unions, typed arrays, user-defined objects, references to symbols defined in type statements, and constraint decorators. The two decorators that are still only permitted on param statements are @allowed (in lieu of which a union may be used) and @secure, which has an odd effect when used on an output in ARM. (Outputs with a type of secureString or secureObject are allowed, but their values get pruned from the deployment info, so they are not very useful.)

Most changes in this PR are baseline updates, as output statements now use the same type loader as param and type statements.

Depends on ARM w09.

Microsoft Reviewers: Open in CodeFlow

@jeskew jeskew marked this pull request as ready for review March 9, 2023 12:29
Copy link
Member

@anthony-c-martin anthony-c-martin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

# Conflicts:
#	src/Bicep.Core.IntegrationTests/UserDefinedTypeTests.cs
#	src/Bicep.Core.Samples/Files/TypeDeclarations_LF/main.ir.bicep
#	src/Bicep.Core.Samples/Files/TypeDeclarations_LF/main.json
#	src/Bicep.Core.Samples/Files/TypeDeclarations_LF/main.symbolicnames.json
#	src/Bicep.Core.Samples/Files/TypeDeclarations_LF/main.syntax.bicep
@jeskew jeskew merged commit 3ff07a8 into main Mar 13, 2023
@jeskew jeskew deleted the jeskew/output-constraints branch March 13, 2023 21:02
StephenWeatherford pushed a commit that referenced this pull request Mar 13, 2023
* Replace nerfed output type parser with invocation of param/typeAlias type parser

* Bump Azure.Deployments.* dependencies to latest

* Update to reconcile with latest Azure.Deployments.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow custom types on module outputs
2 participants