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

Split nested snippet into inner/outer #1157

Merged
merged 2 commits into from
Feb 2, 2021
Merged

Conversation

StephenWeatherford
Copy link
Contributor

What do you think? I pulled out the "parameters" from the template for outer-scoped, added "parameters" (as values) for inner-scoped, and added comments to make clear what they are. Should help steer users to inner-scoped when needed.

inner-scoped

image

    "resources": [
        {
            "name": "nestedDeployment1",
            "type": "Microsoft.Resources/deployments",
            "apiVersion": "2020-06-01",
            "properties": {
                "expressionEvaluationOptions": {
                    "scope": "inner"
                },
                "mode": "Incremental",
                "parameters": {
                },
                "template": {
                    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
                    "contentVersion": "1.0.0.0",
                    "parameters": {},
                    "variables": {},
                    "resources": [],
                    "outputs": {}
                }
            }
        }
   ],

outer-scoped

image

    "resources": [
        {
            "name": "nestedDeployment1",
            "type": "Microsoft.Resources/deployments",
            "apiVersion": "2020-06-01",
            "properties": {
                "expressionEvaluationOptions": {
                    "scope": "outer"
                },
                "mode": "Incremental",
                "template": {
                    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
                    "contentVersion": "1.0.0.0",
                    "variables": {},
                    "resources": [],
                    "outputs": {}
                }
            }
        }
    ],

@StephenWeatherford
Copy link
Contributor Author

I could also remove the "expressionEvaluationOptions" from the outer-scoped since it's the default (and used to not exist).

@MarcusFelling
Copy link
Contributor

I could also remove the "expressionEvaluationOptions" from the outer-scoped since it's the default (and used to not exist).

Yes, I'd say leave out all properties that are the default in snippets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants