seb brochet

My feedback

  1. 229 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    16 comments  ·  Storage » General  ·  Flag idea as inappropriate…  ·  Admin →
    seb brochet supported this idea  · 
  2. 220 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Service Fabric  ·  Flag idea as inappropriate…  ·  Admin →
    seb brochet supported this idea  · 
  3. 67 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    8 comments  ·  Azure Resource Manager  ·  Flag idea as inappropriate…  ·  Admin →

    This is something we’re thinking about, but would like to ensure that we’re providing a sufficiently robust set of capabilities within the template language syntax itself.

    What scenarios are “overly complicated and hard to maintain”? This will help us understand where we need to invest.

    seb brochet supported this idea  · 
    seb brochet commented  · 

    As a workaround to generate ARM templates programmatically, I've started to create some jinja2 macros (project is here: https://github.com/sebbrochet/azure-jinja2).

    And this is the kind of syntax you get:

    {% import 'azure-jinja2/macros/storage_account.json.j2' as storage_account %}
    {% import 'azure-jinja2/macros/virtual_network.json.j2' as virtual_network %}
    {% import 'azure-jinja2/macros/public_ip_address.json.j2' as public_ip_address %}
    {% import 'azure-jinja2/macros/network_interface.json.j2' as network_interface %}
    {% import 'azure-jinja2/macros/quick_virtual_machine.json.j2' as quick_virtual_machine %}
    {% import 'azure-jinja2/macros/security_rules.json.j2' as security_rules %}
    {% import 'azure-jinja2/macros/network_security_group.json.j2' as network_security_group %}

    "resources" : [
    {{ virtual_network.from_vars() }},
    {{ public_ip_address.from_vars() }},

    {% set jumbox_security_rules %}
    [ {{ security_rules.SSH() }}, {{ security_rules.HTTPS() }} ]
    {% endset %}
    {{ network_security_group.from_vars(securityRules = jumbox_security_rules) }},

    {{ quick_virtual_machine.from_vars('jumpbox', withPublicIP = "true", withSSHKey = "true", withNSG = "true") }},

    {% for name in ['docker1', 'docker2', 'docker3'] %}
    {% set vm_name %}{{ name }}{% endset %}
    {{ quick_virtual_machine.from_vars(vm_name, withSSHKey = "true") }}
    {% if not loop.last %},{% endif %}
    {% endfor %}
    ]

  4. 11 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  Azure Resource Manager  ·  Flag idea as inappropriate…  ·  Admin →
    seb brochet commented  · 

    I've also some issues with the current JSON-based language to describe ARM templates.
    I've started to design some jinja2 macros to ease ARM templates creation.
    You can have a look here: https://github.com/sebbrochet/azure-jinja2

    And a taste on it in this project: https://github.com/sebbrochet/azure-docker-playground/blob/master/vm_creation/jinja2/includes/resources.json.j2

    Let me know if you find it useful...

Feedback and Knowledge Base