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

Is there way to have multiple blueprint file? #21

Open
azsec opened this issue Jan 4, 2020 · 5 comments
Open

Is there way to have multiple blueprint file? #21

azsec opened this issue Jan 4, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@azsec
Copy link

azsec commented Jan 4, 2020

Given the fact that a large blueprint requires a very long list of parameters in blueprint.json. Would it be ideal to have each artifact a blueprint file so we could manage easier? I think that could be technically done by refactoring/extending the current Az.Blueprint module?

@alex-frankel
Copy link
Contributor

I'm not sure I'm following - today each artifact is in it's own file. Can you elaborate a bit?

@azsec
Copy link
Author

azsec commented Jan 7, 2020

Thank for your reply @alex-frankel . With the current design, there is one blueprint definition file that stores all parameters. Would it be an ideal approach if we could have each artifact a blueprint definition. For example I could manage my VM artifact's parameters in something called blueprint.vm.json ?

In artifacts.vm.json

{
    "kind": "template",
    "id": "/providers/Microsoft.Blueprint/blueprints/azsec_foundation/artifacts/vm_blueprint",
    "type": "Microsoft.Blueprint/blueprints/artifacts",
    "name": "vm_blueprint",
    "properties": {
        "resourceGroup": "vmResourceGroup",
        "displayName": "VM template",
        "description": "A blueprint to deploy VM",
        "template": {
            "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
            "contentVersion": "1.0.0.0",
            "parameters": {
                "vmName": {
                    "type": "string",
                    "metadata": {
                        "displayName": "Virtual Machine Name",
                        "description": "Specify Name for the virtual machine"
                    }
                }
            },
            "variables": {

            },
            "resources": [

            ],
            "outputs": {

            }
        },
        "parameters": {
            "vmName": {
                "value": "[parameters('g_vmName')]"
            }            
        },
        "dependsOn": [
            
        ]
    }
}

In blueprint.vm.json:

{
    "id": "/providers/Microsoft.Blueprint/blueprints/azsec_foundation",
    "type": "Microsoft.Blueprint/blueprints",
    "name": "azsec_foundation",
    "properties": {
        "targetScope": "subscription",
        "displayName": "Azure Blueprint",
        "description": "Azure Blueprint provides foundation templates for a new project",
        "parameters": {
            "g_vmName": {
                "type": "string",
                "metadata": {
                    "displayName": "Virtual Machine Name",
                    "description": "Specify Name for the virtual machine"
                }
            }
        },
        "resourceGroups": {
            
        }
    }
}

So I could manage blueprint parameter for each of artifact separately. Given the fact that in a large blueprint the blueprint definition (blueprint.json) is a long list of params :)

This is the best example of managing a long list of param https://github.com/Azure/azure-blueprints/blob/master/samples/001-builtins/iso_27001_shared_services/blueprint.json

@alex-frankel
Copy link
Contributor

I see - so instead of having a single blueprint.json, you want one for each artifact. Is that right?

If that's the case, this is not a change we are likely to make in the short term unfortunately.

@azsec
Copy link
Author

azsec commented Jan 8, 2020

Yes it is what I'd like - so hopefully we would have an easier way for managing large blueprint in the future. Thanks for the reply @alex-frankel

@alex-frankel alex-frankel added the enhancement New feature or request label Jan 9, 2020
@tikicoder
Copy link

You can create multiple blueprints. Also you could create a process for merging the blueprints. For me I use everything as yaml and convert to json and build out the structure. I have the yaml broken out into groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants