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

Decompiler should support *.properties.templateLink.relativePath #1990

Closed
alex-frankel opened this issue Mar 23, 2021 · 4 comments
Closed

Decompiler should support *.properties.templateLink.relativePath #1990

alex-frankel opened this issue Mar 23, 2021 · 4 comments
Labels
enhancement New feature or request Needs: Triage 🔍

Comments

@alex-frankel
Copy link
Collaborator

These are ARM Templates authored with the new syntax that we debuted with Template Specs

Discovered through #1932.

@alex-frankel alex-frankel added the enhancement New feature or request label Mar 23, 2021
@ghost ghost added the Needs: Triage 🔍 label Mar 23, 2021
@anthony-c-martin
Copy link
Member

This was fixed in #1850 - included in the v0.3.126 release. I tested the template linked in #1932, and I get the following Bicep output:

param region_primary string = 'australiaeast'
param appServicePlan_namePrimary string
param appServicePlan_Kind string
param appServicePlan_sku object
param appServicePlan_properties object
param webPortal_namePrimary string
param sqlServer_namePrimary string
param sqlServer_properties object
param sqlDb_namePrimary string
param sqlDb_properties object
param sqlDb_sku object
param sqlDb_kind string
param appInsights_namePrimary string
param appInsights_immediatePurge bool
param appInsights_retentionDays int
param webApp_namePrimary string

module createAppInsights '?' /*TODO: replace with correct path to artifacts/appInsights.json*/ = {
  name: 'createAppInsights'
  params: {
    appInsights_namePrimary: appInsights_namePrimary
    appInsights_immediatePurge: appInsights_immediatePurge
    appInsights_retentionDays: appInsights_retentionDays
    region_primary: region_primary
  }
}

module createAppServicePlan '?' /*TODO: replace with correct path to artifacts/appServicePlan.json*/ = {
  name: 'createAppServicePlan'
  params: {
    region_primary: region_primary
    appServicePlan_namePrimary: appServicePlan_namePrimary
    appServicePlan_Kind: appServicePlan_Kind
    appServicePlan_sku: appServicePlan_sku
    appServicePlan_properties: appServicePlan_properties
  }
}

module createSqlDatabase '?' /*TODO: replace with correct path to artifacts/sqlServer.json*/ = {
  name: 'createSqlDatabase'
  params: {
    region_primary: region_primary
    sqlServer_namePrimary: sqlServer_namePrimary
    sqlServer_properties: sqlServer_properties
    sqlDb_namePrimary: sqlDb_namePrimary
    sqlDb_properties: sqlDb_properties
    sqlDb_sku: sqlDb_sku
    sqlDb_kind: sqlDb_kind
  }
}

module createWebApp '?' /*TODO: replace with correct path to artifacts/webAppAspNet.json*/ = {
  name: 'createWebApp'
  params: {
    region_primary: region_primary
    appServicePlan_namePrimary: appServicePlan_namePrimary
    webApp_namePrimary: webApp_namePrimary
  }
  dependsOn: [
    createAppServicePlan
  ]
}

@brwilkinson
Copy link
Collaborator

brwilkinson commented Apr 1, 2021

Can we also support variable substitution on the path ?

i.e. I don't want to hard code the '../templates-base/01-azuredeploy-OMS.bicep'

I would prefer to maintain a single lookup table at the variables for all references, then just lookup the path via the variable:

DeploymentInfoObject.OMS

image

WHY?

It's easier to maintain all of the paths together... and clone new deployments for new resource types.

image

@anthony-c-martin
Copy link
Member

anthony-c-martin commented Apr 1, 2021

Can we also support variable substitution on the path ?

@brwilkinson, would you mind creating a new issue for this - just to make sure it doesn't get lost!

I would expect this to come for free with the implementation of #444, but it's definitely something we would want to keep track of to ensure it works as expected.

@brwilkinson
Copy link
Collaborator

Thanks @anthony-c-martin will do.

I just wanted to check if it was something that you were interested ... thanks for the prompt response 🙂

@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

3 participants