diff --git a/src/Bicep.Core.IntegrationTests/DecoratorTests.cs b/src/Bicep.Core.IntegrationTests/DecoratorTests.cs
index 7d94a8440d6..b4e037cf375 100644
--- a/src/Bicep.Core.IntegrationTests/DecoratorTests.cs
+++ b/src/Bicep.Core.IntegrationTests/DecoratorTests.cs
@@ -234,5 +234,110 @@ param inputb string
success.Should().BeFalse();
}
}
+
+ ///
+ /// https://github.com/Azure/bicep/issues/10970
+ ///
+ [TestMethod]
+ public void DecoratorsOnNestedChildResource_CanBeUsed()
+ {
+ var (template, diagnostics, _) = CompilationHelper.Compile(@"
+var dbs = [
+ 'db1'
+ 'db2'
+ 'db3'
+]
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ @description('Sql Databases')
+ resource sqlDatabase 'databases' = [for db in dbs: {
+ name: db
+ location: 'polandcentral'
+ }]
+
+ @description('Primary Sql Database')
+ resource primaryDb 'databases' = {
+ name: 'primary'
+ location: 'polandcentral'
+ }
+}");
+ using (new AssertionScope())
+ {
+ diagnostics.ExcludingLinterDiagnostics().Should().BeEmpty();
+ template.Should().NotBeNull()
+ .And.HaveValueAtPath("$.resources[0].copy.mode", "serial")
+ .And.HaveValueAtPath("$.resources[0].copy.batchSize", 1);
+ template.Should().NotBeNull()
+ .And.HaveValueAtPath("$.resources[0].metadata.description", "Sql Databases");
+ template.Should().NotBeNull()
+ .And.HaveValueAtPath("$.resources[1].metadata.description", "Primary Sql Database");
+ }
+ }
+
+ [TestMethod]
+ public void DecoratorDescriptionInResourceBody_ShouldPromptForDeclaration()
+ {
+ var (template, diagnostics, _) = CompilationHelper.Compile(@"
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @description('Primary Sql Database')
+}
+");
+ using (new AssertionScope())
+ {
+ diagnostics.ExcludingLinterDiagnostics().Should().HaveDiagnostics(new[]
+ {
+ ("BCP132", DiagnosticLevel.Error, "Expected a declaration after the decorator."),
+ });
+ template.Should().BeNull();
+ }
+ }
+
+ [TestMethod]
+ public void DecoratorBatchSizeInResourceBody_ShouldPromptForResourceDeclaration()
+ {
+ var (template, diagnostics, _) = CompilationHelper.Compile(@"
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @batchSize(1)
+}
+");
+ using (new AssertionScope())
+ {
+ diagnostics.ExcludingLinterDiagnostics().Should().HaveDiagnostics(new[]
+ {
+ ("BCP153", DiagnosticLevel.Error, "Expected a resource or module declaration after the decorator."),
+ });
+ template.Should().BeNull();
+ }
+ }
+
+ [TestMethod]
+ public void UnfinishedDecoratorInResourceBody_ShouldPromptForNamespaceOrDecoratorName()
+ {
+ var (template, diagnostics, _) = CompilationHelper.Compile(@"
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @
+}
+");
+ using (new AssertionScope())
+ {
+ diagnostics.ExcludingLinterDiagnostics().Should().HaveDiagnostics(new[]
+ {
+ ("BCP123", DiagnosticLevel.Error, "Expected a namespace or decorator name at this location."),
+ });
+ template.Should().BeNull();
+ }
+ }
}
}
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/arrayPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/arrayPlusSymbols.json
index 89797330113..8711de2b5e1 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/arrayPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/arrayPlusSymbols.json
@@ -5581,6 +5581,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/boolPropertyValuesPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/boolPropertyValuesPlusSymbols.json
index 32097d47043..b95921c20ac 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/boolPropertyValuesPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/boolPropertyValuesPlusSymbols.json
@@ -5545,6 +5545,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cleanupPreferencesPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cleanupPreferencesPlusSymbols.json
index 4c3bb34a685..0dbc1c7c7f5 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cleanupPreferencesPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cleanupPreferencesPlusSymbols.json
@@ -5573,6 +5573,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols.json
index 918a804763f..d6047258f4a 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols.json
@@ -5804,6 +5804,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for.json
index 7b0859b2f42..699df577358 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for.json
@@ -5804,6 +5804,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for_if.json
index bb731bc8428..8808af092c1 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_for_if.json
@@ -5804,6 +5804,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_if.json
index 85f8fe15664..4931003892b 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/cliPropertyAccessIndexesPlusSymbols_if.json
@@ -5804,6 +5804,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols.json
index d6f2b07aaef..274ec2bbac3 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for.json
index 20036e37d21..d8a8be35ae0 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for_if.json
index 09f8c0fa434..250ab24b4d6 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_for_if.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_if.json
index f8f256afa91..6caced34b6a 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/createModeIndexPlusSymbols_if.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes.json
index 53a64390629..96cabdc3c95 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes.json
@@ -6038,6 +6038,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for.json
index d2e70f4d673..107c3ce3416 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for.json
@@ -6038,6 +6038,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for_if.json
index cd1e504f85e..4c8420b7cd3 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_for_if.json
@@ -6038,6 +6038,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_if.json
index d08bfc62e48..f2555968d3b 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/defaultCreateModeIndexes_if.json
@@ -6038,6 +6038,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols.json
index 297b760a244..d62431e2a2a 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols.json
@@ -5559,6 +5559,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for.json
index 0311cb03e70..d36a51c485c 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for.json
@@ -5559,6 +5559,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for_if.json
index b9e638d0856..9dcb71e96a3 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_for_if.json
@@ -5559,6 +5559,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_if.json
index 25e18135b11..3e66e5f1a47 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/deploymentScriptKindsPlusSymbols_if.json
@@ -5559,6 +5559,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols.json
index d13b36cb7cd..f92b0190cae 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for.json
index f199f8f9898..18ea8d075bd 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for_if.json
index 3ed68be01e6..5c392f15f5b 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_for_if.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_if.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_if.json
index 0bf2b3f914f..1ac59794c91 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_if.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/missingDiscriminatorPropertyIndexPlusSymbols_if.json
@@ -5552,6 +5552,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbols.json
index efb1e563f98..4a2b8683b15 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbols.json
@@ -5531,6 +5531,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbolsWithRequiredProperties.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbolsWithRequiredProperties.json
index 96b3137ad5e..9c89db6df37 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbolsWithRequiredProperties.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/objectPlusSymbolsWithRequiredProperties.json
@@ -5561,6 +5561,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/storageSkuNamePlusSymbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/storageSkuNamePlusSymbols.json
index 3b9aa611e0a..8c2a00532ed 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/storageSkuNamePlusSymbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/storageSkuNamePlusSymbols.json
@@ -5657,6 +5657,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbols.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbols.json
index 95ed4939de0..a8cb67f8ee6 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbols.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbols.json
@@ -5548,6 +5548,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount1.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount1.json
index 8231f3768f8..f5fd1dcf656 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount1.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount1.json
@@ -5545,6 +5545,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount2.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount2.json
index 8231f3768f8..f5fd1dcf656 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount2.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccount2.json
@@ -5545,6 +5545,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccountRuleState.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccountRuleState.json
index 079160744e7..d4fcaae4dc3 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccountRuleState.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusAccountRuleState.json
@@ -5576,6 +5576,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayAndFor.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayAndFor.json
index 28448703c4c..48b37dbf4de 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayAndFor.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayAndFor.json
@@ -5612,6 +5612,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayWithoutFor.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayWithoutFor.json
index 0c3baa89fde..170aff30360 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayWithoutFor.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusArrayWithoutFor.json
@@ -5576,6 +5576,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusRule.json b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusRule.json
index 4465d5c8dcb..4b084dc5ed2 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusRule.json
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/Completions/symbolsPlusRule.json
@@ -5576,6 +5576,91 @@
"command": "editor.action.triggerParameterHints"
}
},
+ {
+ "label": "sqlServer1",
+ "kind": "interface",
+ "detail": "sqlServer1",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer1",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer1"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer2",
+ "kind": "interface",
+ "detail": "sqlServer2",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer2",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer2"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer3",
+ "kind": "interface",
+ "detail": "sqlServer3",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer3",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer3"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer4",
+ "kind": "interface",
+ "detail": "sqlServer4",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer4",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer4"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
+ {
+ "label": "sqlServer5",
+ "kind": "interface",
+ "detail": "sqlServer5",
+ "deprecated": false,
+ "preselect": false,
+ "sortText": "2_sqlServer5",
+ "insertTextFormat": "plainText",
+ "insertTextMode": "adjustIndentation",
+ "textEdit": {
+ "range": {},
+ "newText": "sqlServer5"
+ },
+ "commitCharacters": [
+ ":"
+ ]
+ },
{
"label": "startedTypingTypeWithQuotes",
"kind": "interface",
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.bicep b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.bicep
index 375241b4021..f244382a11f 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.bicep
@@ -1612,3 +1612,47 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
name: $account
}
}
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+resource sqlServer1 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer1'
+ location: 'polandcentral'
+
+ @
+}
+resource sqlServer2 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer2'
+ location: 'polandcentral'
+
+ @description('var')
+ var test = 'x'
+
+ @description('module')
+ module x 'module.bicep' = {
+ name: 'x'
+ }
+}
+resource sqlServer3 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer3'
+ location: 'polandcentral'
+
+ @description('mising resource keyword')
+
+}
+resource sqlServer4 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer4'
+ location: 'polandcentral'
+
+ @batchSize(1)
+
+}
+resource sqlServer5 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer5'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ resource sqlDatabase 'databases' = {
+ name: 'db'
+ location: 'polandcentral'
+ }
+}
\ No newline at end of file
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.diagnostics.bicep b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.diagnostics.bicep
index d9d4929e7d1..927ffef7e0a 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.diagnostics.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.diagnostics.bicep
@@ -2310,3 +2310,67 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
}
}
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+resource sqlServer1 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer1'
+ location: 'polandcentral'
+//@[012:027) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+
+ @
+//@[003:003) [BCP123 (Error)] Expected a namespace or decorator name at this location. (CodeDescription: none) ||
+}
+resource sqlServer2 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer2'
+//@[002:006) [BCP025 (Error)] The property "name" is declared multiple times in this object. Remove or rename the duplicate properties. (CodeDescription: none) |name|
+ location: 'polandcentral'
+//@[012:027) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+
+ @description('var')
+//@[002:021) [BCP132 (Error)] Expected a declaration after the decorator. (CodeDescription: none) |@description('var')|
+ var test = 'x'
+//@[002:002) [BCP236 (Error)] Expected a new line or comma character at this location. (CodeDescription: none) ||
+//@[006:010) [BCP018 (Error)] Expected the ":" character at this location. (CodeDescription: none) |test|
+//@[016:016) [BCP009 (Error)] Expected a literal value, an array, an object, a parenthesized expression, or a function call at this location. (CodeDescription: none) ||
+
+ @description('module')
+//@[002:024) [BCP132 (Error)] Expected a declaration after the decorator. (CodeDescription: none) |@description('module')|
+ module x 'module.bicep' = {
+//@[002:002) [BCP236 (Error)] Expected a new line or comma character at this location. (CodeDescription: none) ||
+//@[009:010) [BCP018 (Error)] Expected the ":" character at this location. (CodeDescription: none) |x|
+//@[029:029) [BCP009 (Error)] Expected a literal value, an array, an object, a parenthesized expression, or a function call at this location. (CodeDescription: none) ||
+ name: 'x'
+//@[004:008) [BCP025 (Error)] The property "name" is declared multiple times in this object. Remove or rename the duplicate properties. (CodeDescription: none) |name|
+ }
+}
+//@[000:001) [BCP007 (Error)] This declaration type is not recognized. Specify a metadata, parameter, variable, resource, or output declaration. (CodeDescription: none) |}|
+resource sqlServer3 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer3'
+ location: 'polandcentral'
+//@[012:027) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+
+ @description('mising resource keyword')
+//@[002:041) [BCP132 (Error)] Expected a declaration after the decorator. (CodeDescription: none) |@description('mising resource keyword')|
+
+}
+resource sqlServer4 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer4'
+ location: 'polandcentral'
+//@[012:027) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+
+ @batchSize(1)
+//@[002:015) [BCP153 (Error)] Expected a resource or module declaration after the decorator. (CodeDescription: none) |@batchSize(1)|
+
+}
+resource sqlServer5 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer5'
+ location: 'polandcentral'
+//@[012:027) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+
+ @batchSize(1)
+//@[002:015) [BCP155 (Error)] The decorator "batchSize" can only be attached to resource or module collections. (CodeDescription: none) |@batchSize(1)|
+ resource sqlDatabase 'databases' = {
+ name: 'db'
+ location: 'polandcentral'
+//@[014:029) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.formatted.bicep b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.formatted.bicep
index f03d32e168a..f2bf2dbf65c 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.formatted.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.formatted.bicep
@@ -1580,3 +1580,47 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
name: $account
}
}
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+resource sqlServer1 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer1'
+ location: 'polandcentral'
+
+ @
+ }
+resource sqlServer2 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer2'
+ location: 'polandcentral'
+
+ @description('var')
+ var test = 'x'
+
+ @description('module')
+ module x 'module.bicep' = {
+ name: 'x'
+ }
+}
+resource sqlServer3 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer3'
+ location: 'polandcentral'
+
+ @description('mising resource keyword')
+
+ }
+resource sqlServer4 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer4'
+ location: 'polandcentral'
+
+ @batchSize(1)
+
+ }
+resource sqlServer5 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer5'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ resource sqlDatabase 'databases' = {
+ name: 'db'
+ location: 'polandcentral'
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.pprint.bicep b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.pprint.bicep
index ff5ed777c8d..88711c507da 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.pprint.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.pprint.bicep
@@ -1647,3 +1647,45 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
name: $account
}
}
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+resource sqlServer1 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer1'
+ location: 'polandcentral'
+
+ @
+}
+resource sqlServer2 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer2'
+ location: 'polandcentral'
+
+ @description('var')
+ var test = 'x'
+
+ @description('module')
+ module x 'module.bicep' = {
+ name: 'x'
+ }
+}
+resource sqlServer3 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer3'
+ location: 'polandcentral'
+
+ @description('mising resource keyword')
+}
+resource sqlServer4 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer4'
+ location: 'polandcentral'
+
+ @batchSize(1)
+}
+resource sqlServer5 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sqlServer5'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ resource sqlDatabase 'databases' = {
+ name: 'db'
+ location: 'polandcentral'
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.symbols.bicep b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.symbols.bicep
index 769a0b4a6d2..5dcc27bd1db 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.symbols.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.symbols.bicep
@@ -2041,3 +2041,52 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
}
}
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+resource sqlServer1 'Microsoft.Sql/servers@2021-11-01' = {
+//@[009:019) Resource sqlServer1. Type: Microsoft.Sql/servers@2021-11-01. Declaration start char: 0, length: 119
+ name: 'sqlServer1'
+ location: 'polandcentral'
+
+ @
+}
+resource sqlServer2 'Microsoft.Sql/servers@2021-11-01' = {
+//@[009:019) Resource sqlServer2. Type: Microsoft.Sql/servers@2021-11-01. Declaration start char: 0, length: 231
+ name: 'sqlServer2'
+ location: 'polandcentral'
+
+ @description('var')
+ var test = 'x'
+
+ @description('module')
+ module x 'module.bicep' = {
+ name: 'x'
+ }
+}
+resource sqlServer3 'Microsoft.Sql/servers@2021-11-01' = {
+//@[009:019) Resource sqlServer3. Type: Microsoft.Sql/servers@2021-11-01. Declaration start char: 0, length: 159
+ name: 'sqlServer3'
+ location: 'polandcentral'
+
+ @description('mising resource keyword')
+
+}
+resource sqlServer4 'Microsoft.Sql/servers@2021-11-01' = {
+//@[009:019) Resource sqlServer4. Type: Microsoft.Sql/servers@2021-11-01. Declaration start char: 0, length: 133
+ name: 'sqlServer4'
+ location: 'polandcentral'
+
+ @batchSize(1)
+
+}
+resource sqlServer5 'Microsoft.Sql/servers@2021-11-01' = {
+//@[009:019) Resource sqlServer5. Type: Microsoft.Sql/servers@2021-11-01. Declaration start char: 0, length: 223
+ name: 'sqlServer5'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ resource sqlDatabase 'databases' = {
+//@[011:022) Resource sqlDatabase. Type: Microsoft.Sql/servers/databases@2021-11-01. Declaration start char: 2, length: 105
+ name: 'db'
+ location: 'polandcentral'
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.syntax.bicep b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.syntax.bicep
index 039ee435eff..aae37e0f707 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.syntax.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.syntax.bicep
@@ -1,5 +1,5 @@
-//@[000:51742) ProgramSyntax
+//@[000:52706) ProgramSyntax
//@[000:00002) ├─Token(NewLine) |\r\n|
// wrong declaration
//@[020:00022) ├─Token(NewLine) |\r\n|
@@ -12104,6 +12104,300 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
//@[003:00005) | ├─Token(NewLine) |\r\n|
}
//@[000:00001) | └─Token(RightBrace) |}|
+//@[001:00005) ├─Token(NewLine) |\r\n\r\n|
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+//@[084:00086) ├─Token(NewLine) |\r\n|
+resource sqlServer1 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:00119) ├─ResourceDeclarationSyntax
+//@[000:00008) | ├─Token(Identifier) |resource|
+//@[009:00019) | ├─IdentifierSyntax
+//@[009:00019) | | └─Token(Identifier) |sqlServer1|
+//@[020:00054) | ├─StringSyntax
+//@[020:00054) | | └─Token(StringComplete) |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:00056) | ├─Token(Assignment) |=|
+//@[057:00119) | └─ObjectSyntax
+//@[057:00058) | ├─Token(LeftBrace) |{|
+//@[058:00060) | ├─Token(NewLine) |\r\n|
+ name: 'sqlServer1'
+//@[002:00020) | ├─ObjectPropertySyntax
+//@[002:00006) | | ├─IdentifierSyntax
+//@[002:00006) | | | └─Token(Identifier) |name|
+//@[006:00007) | | ├─Token(Colon) |:|
+//@[008:00020) | | └─StringSyntax
+//@[008:00020) | | └─Token(StringComplete) |'sqlServer1'|
+//@[020:00022) | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[002:00027) | ├─ObjectPropertySyntax
+//@[002:00010) | | ├─IdentifierSyntax
+//@[002:00010) | | | └─Token(Identifier) |location|
+//@[010:00011) | | ├─Token(Colon) |:|
+//@[012:00027) | | └─StringSyntax
+//@[012:00027) | | └─Token(StringComplete) |'polandcentral'|
+//@[027:00031) | ├─Token(NewLine) |\r\n\r\n|
+
+ @
+//@[002:00005) | ├─MissingDeclarationSyntax
+//@[002:00003) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00003) | | | └─SkippedTriviaSyntax
+//@[003:00005) | | └─Token(NewLine) |\r\n|
+}
+//@[000:00001) | └─Token(RightBrace) |}|
//@[001:00003) ├─Token(NewLine) |\r\n|
+resource sqlServer2 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:00231) ├─ResourceDeclarationSyntax
+//@[000:00008) | ├─Token(Identifier) |resource|
+//@[009:00019) | ├─IdentifierSyntax
+//@[009:00019) | | └─Token(Identifier) |sqlServer2|
+//@[020:00054) | ├─StringSyntax
+//@[020:00054) | | └─Token(StringComplete) |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:00056) | ├─Token(Assignment) |=|
+//@[057:00231) | └─ObjectSyntax
+//@[057:00058) | ├─Token(LeftBrace) |{|
+//@[058:00060) | ├─Token(NewLine) |\r\n|
+ name: 'sqlServer2'
+//@[002:00020) | ├─ObjectPropertySyntax
+//@[002:00006) | | ├─IdentifierSyntax
+//@[002:00006) | | | └─Token(Identifier) |name|
+//@[006:00007) | | ├─Token(Colon) |:|
+//@[008:00020) | | └─StringSyntax
+//@[008:00020) | | └─Token(StringComplete) |'sqlServer2'|
+//@[020:00022) | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[002:00027) | ├─ObjectPropertySyntax
+//@[002:00010) | | ├─IdentifierSyntax
+//@[002:00010) | | | └─Token(Identifier) |location|
+//@[010:00011) | | ├─Token(Colon) |:|
+//@[012:00027) | | └─StringSyntax
+//@[012:00027) | | └─Token(StringComplete) |'polandcentral'|
+//@[027:00031) | ├─Token(NewLine) |\r\n\r\n|
+
+ @description('var')
+//@[002:00023) | ├─MissingDeclarationSyntax
+//@[002:00021) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00021) | | | └─FunctionCallSyntax
+//@[003:00014) | | | ├─IdentifierSyntax
+//@[003:00014) | | | | └─Token(Identifier) |description|
+//@[014:00015) | | | ├─Token(LeftParen) |(|
+//@[015:00020) | | | ├─FunctionArgumentSyntax
+//@[015:00020) | | | | └─StringSyntax
+//@[015:00020) | | | | └─Token(StringComplete) |'var'|
+//@[020:00021) | | | └─Token(RightParen) |)|
+//@[021:00023) | | └─Token(NewLine) |\r\n|
+ var test = 'x'
+//@[002:00002) | ├─SkippedTriviaSyntax
+//@[002:00016) | ├─ObjectPropertySyntax
+//@[002:00005) | | ├─IdentifierSyntax
+//@[002:00005) | | | └─Token(Identifier) |var|
+//@[006:00016) | | ├─SkippedTriviaSyntax
+//@[006:00010) | | | ├─Token(Identifier) |test|
+//@[011:00012) | | | ├─Token(Assignment) |=|
+//@[013:00016) | | | └─Token(StringComplete) |'x'|
+//@[016:00016) | | └─SkippedTriviaSyntax
+//@[016:00020) | ├─Token(NewLine) |\r\n\r\n|
+
+ @description('module')
+//@[002:00026) | ├─MissingDeclarationSyntax
+//@[002:00024) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00024) | | | └─FunctionCallSyntax
+//@[003:00014) | | | ├─IdentifierSyntax
+//@[003:00014) | | | | └─Token(Identifier) |description|
+//@[014:00015) | | | ├─Token(LeftParen) |(|
+//@[015:00023) | | | ├─FunctionArgumentSyntax
+//@[015:00023) | | | | └─StringSyntax
+//@[015:00023) | | | | └─Token(StringComplete) |'module'|
+//@[023:00024) | | | └─Token(RightParen) |)|
+//@[024:00026) | | └─Token(NewLine) |\r\n|
+ module x 'module.bicep' = {
+//@[002:00002) | ├─SkippedTriviaSyntax
+//@[002:00029) | ├─ObjectPropertySyntax
+//@[002:00008) | | ├─IdentifierSyntax
+//@[002:00008) | | | └─Token(Identifier) |module|
+//@[009:00029) | | ├─SkippedTriviaSyntax
+//@[009:00010) | | | ├─Token(Identifier) |x|
+//@[011:00025) | | | ├─Token(StringComplete) |'module.bicep'|
+//@[026:00027) | | | ├─Token(Assignment) |=|
+//@[028:00029) | | | └─Token(LeftBrace) |{|
+//@[029:00029) | | └─SkippedTriviaSyntax
+//@[029:00031) | ├─Token(NewLine) |\r\n|
+ name: 'x'
+//@[004:00013) | ├─ObjectPropertySyntax
+//@[004:00008) | | ├─IdentifierSyntax
+//@[004:00008) | | | └─Token(Identifier) |name|
+//@[008:00009) | | ├─Token(Colon) |:|
+//@[010:00013) | | └─StringSyntax
+//@[010:00013) | | └─Token(StringComplete) |'x'|
+//@[013:00015) | ├─Token(NewLine) |\r\n|
+ }
+//@[002:00003) | └─Token(RightBrace) |}|
+//@[003:00005) ├─Token(NewLine) |\r\n|
+}
+//@[000:00001) ├─SkippedTriviaSyntax
+//@[000:00001) | └─Token(RightBrace) |}|
+//@[001:00003) ├─Token(NewLine) |\r\n|
+resource sqlServer3 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:00159) ├─ResourceDeclarationSyntax
+//@[000:00008) | ├─Token(Identifier) |resource|
+//@[009:00019) | ├─IdentifierSyntax
+//@[009:00019) | | └─Token(Identifier) |sqlServer3|
+//@[020:00054) | ├─StringSyntax
+//@[020:00054) | | └─Token(StringComplete) |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:00056) | ├─Token(Assignment) |=|
+//@[057:00159) | └─ObjectSyntax
+//@[057:00058) | ├─Token(LeftBrace) |{|
+//@[058:00060) | ├─Token(NewLine) |\r\n|
+ name: 'sqlServer3'
+//@[002:00020) | ├─ObjectPropertySyntax
+//@[002:00006) | | ├─IdentifierSyntax
+//@[002:00006) | | | └─Token(Identifier) |name|
+//@[006:00007) | | ├─Token(Colon) |:|
+//@[008:00020) | | └─StringSyntax
+//@[008:00020) | | └─Token(StringComplete) |'sqlServer3'|
+//@[020:00022) | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[002:00027) | ├─ObjectPropertySyntax
+//@[002:00010) | | ├─IdentifierSyntax
+//@[002:00010) | | | └─Token(Identifier) |location|
+//@[010:00011) | | ├─Token(Colon) |:|
+//@[012:00027) | | └─StringSyntax
+//@[012:00027) | | └─Token(StringComplete) |'polandcentral'|
+//@[027:00031) | ├─Token(NewLine) |\r\n\r\n|
+
+ @description('mising resource keyword')
+//@[002:00045) | ├─MissingDeclarationSyntax
+//@[002:00041) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00041) | | | └─FunctionCallSyntax
+//@[003:00014) | | | ├─IdentifierSyntax
+//@[003:00014) | | | | └─Token(Identifier) |description|
+//@[014:00015) | | | ├─Token(LeftParen) |(|
+//@[015:00040) | | | ├─FunctionArgumentSyntax
+//@[015:00040) | | | | └─StringSyntax
+//@[015:00040) | | | | └─Token(StringComplete) |'mising resource keyword'|
+//@[040:00041) | | | └─Token(RightParen) |)|
+//@[041:00045) | | └─Token(NewLine) |\r\n\r\n|
+
+}
+//@[000:00001) | └─Token(RightBrace) |}|
+//@[001:00003) ├─Token(NewLine) |\r\n|
+resource sqlServer4 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:00133) ├─ResourceDeclarationSyntax
+//@[000:00008) | ├─Token(Identifier) |resource|
+//@[009:00019) | ├─IdentifierSyntax
+//@[009:00019) | | └─Token(Identifier) |sqlServer4|
+//@[020:00054) | ├─StringSyntax
+//@[020:00054) | | └─Token(StringComplete) |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:00056) | ├─Token(Assignment) |=|
+//@[057:00133) | └─ObjectSyntax
+//@[057:00058) | ├─Token(LeftBrace) |{|
+//@[058:00060) | ├─Token(NewLine) |\r\n|
+ name: 'sqlServer4'
+//@[002:00020) | ├─ObjectPropertySyntax
+//@[002:00006) | | ├─IdentifierSyntax
+//@[002:00006) | | | └─Token(Identifier) |name|
+//@[006:00007) | | ├─Token(Colon) |:|
+//@[008:00020) | | └─StringSyntax
+//@[008:00020) | | └─Token(StringComplete) |'sqlServer4'|
+//@[020:00022) | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[002:00027) | ├─ObjectPropertySyntax
+//@[002:00010) | | ├─IdentifierSyntax
+//@[002:00010) | | | └─Token(Identifier) |location|
+//@[010:00011) | | ├─Token(Colon) |:|
+//@[012:00027) | | └─StringSyntax
+//@[012:00027) | | └─Token(StringComplete) |'polandcentral'|
+//@[027:00031) | ├─Token(NewLine) |\r\n\r\n|
+
+ @batchSize(1)
+//@[002:00019) | ├─MissingDeclarationSyntax
+//@[002:00015) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00015) | | | └─FunctionCallSyntax
+//@[003:00012) | | | ├─IdentifierSyntax
+//@[003:00012) | | | | └─Token(Identifier) |batchSize|
+//@[012:00013) | | | ├─Token(LeftParen) |(|
+//@[013:00014) | | | ├─FunctionArgumentSyntax
+//@[013:00014) | | | | └─IntegerLiteralSyntax
+//@[013:00014) | | | | └─Token(Integer) |1|
+//@[014:00015) | | | └─Token(RightParen) |)|
+//@[015:00019) | | └─Token(NewLine) |\r\n\r\n|
-//@[000:00000) └─Token(EndOfFile) ||
+}
+//@[000:00001) | └─Token(RightBrace) |}|
+//@[001:00003) ├─Token(NewLine) |\r\n|
+resource sqlServer5 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:00223) ├─ResourceDeclarationSyntax
+//@[000:00008) | ├─Token(Identifier) |resource|
+//@[009:00019) | ├─IdentifierSyntax
+//@[009:00019) | | └─Token(Identifier) |sqlServer5|
+//@[020:00054) | ├─StringSyntax
+//@[020:00054) | | └─Token(StringComplete) |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:00056) | ├─Token(Assignment) |=|
+//@[057:00223) | └─ObjectSyntax
+//@[057:00058) | ├─Token(LeftBrace) |{|
+//@[058:00060) | ├─Token(NewLine) |\r\n|
+ name: 'sqlServer5'
+//@[002:00020) | ├─ObjectPropertySyntax
+//@[002:00006) | | ├─IdentifierSyntax
+//@[002:00006) | | | └─Token(Identifier) |name|
+//@[006:00007) | | ├─Token(Colon) |:|
+//@[008:00020) | | └─StringSyntax
+//@[008:00020) | | └─Token(StringComplete) |'sqlServer5'|
+//@[020:00022) | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[002:00027) | ├─ObjectPropertySyntax
+//@[002:00010) | | ├─IdentifierSyntax
+//@[002:00010) | | | └─Token(Identifier) |location|
+//@[010:00011) | | ├─Token(Colon) |:|
+//@[012:00027) | | └─StringSyntax
+//@[012:00027) | | └─Token(StringComplete) |'polandcentral'|
+//@[027:00031) | ├─Token(NewLine) |\r\n\r\n|
+
+ @batchSize(1)
+//@[002:00107) | ├─ResourceDeclarationSyntax
+//@[002:00015) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00015) | | | └─FunctionCallSyntax
+//@[003:00012) | | | ├─IdentifierSyntax
+//@[003:00012) | | | | └─Token(Identifier) |batchSize|
+//@[012:00013) | | | ├─Token(LeftParen) |(|
+//@[013:00014) | | | ├─FunctionArgumentSyntax
+//@[013:00014) | | | | └─IntegerLiteralSyntax
+//@[013:00014) | | | | └─Token(Integer) |1|
+//@[014:00015) | | | └─Token(RightParen) |)|
+//@[015:00017) | | ├─Token(NewLine) |\r\n|
+ resource sqlDatabase 'databases' = {
+//@[002:00010) | | ├─Token(Identifier) |resource|
+//@[011:00022) | | ├─IdentifierSyntax
+//@[011:00022) | | | └─Token(Identifier) |sqlDatabase|
+//@[023:00034) | | ├─StringSyntax
+//@[023:00034) | | | └─Token(StringComplete) |'databases'|
+//@[035:00036) | | ├─Token(Assignment) |=|
+//@[037:00090) | | └─ObjectSyntax
+//@[037:00038) | | ├─Token(LeftBrace) |{|
+//@[038:00040) | | ├─Token(NewLine) |\r\n|
+ name: 'db'
+//@[004:00014) | | ├─ObjectPropertySyntax
+//@[004:00008) | | | ├─IdentifierSyntax
+//@[004:00008) | | | | └─Token(Identifier) |name|
+//@[008:00009) | | | ├─Token(Colon) |:|
+//@[010:00014) | | | └─StringSyntax
+//@[010:00014) | | | └─Token(StringComplete) |'db'|
+//@[014:00016) | | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[004:00029) | | ├─ObjectPropertySyntax
+//@[004:00012) | | | ├─IdentifierSyntax
+//@[004:00012) | | | | └─Token(Identifier) |location|
+//@[012:00013) | | | ├─Token(Colon) |:|
+//@[014:00029) | | | └─StringSyntax
+//@[014:00029) | | | └─Token(StringComplete) |'polandcentral'|
+//@[029:00031) | | ├─Token(NewLine) |\r\n|
+ }
+//@[002:00003) | | └─Token(RightBrace) |}|
+//@[003:00005) | ├─Token(NewLine) |\r\n|
+}
+//@[000:00001) | └─Token(RightBrace) |}|
+//@[001:00001) └─Token(EndOfFile) ||
diff --git a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.tokens.bicep b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.tokens.bicep
index f2e0f77e30f..a24a2e50fe5 100644
--- a/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.tokens.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/InvalidResources_CRLF/main.tokens.bicep
@@ -7803,8 +7803,196 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' existing = {
}
//@[002:003) RightBrace |}|
//@[003:005) NewLine |\r\n|
+}
+//@[000:001) RightBrace |}|
+//@[001:005) NewLine |\r\n\r\n|
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+//@[084:086) NewLine |\r\n|
+resource sqlServer1 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:008) Identifier |resource|
+//@[009:019) Identifier |sqlServer1|
+//@[020:054) StringComplete |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:056) Assignment |=|
+//@[057:058) LeftBrace |{|
+//@[058:060) NewLine |\r\n|
+ name: 'sqlServer1'
+//@[002:006) Identifier |name|
+//@[006:007) Colon |:|
+//@[008:020) StringComplete |'sqlServer1'|
+//@[020:022) NewLine |\r\n|
+ location: 'polandcentral'
+//@[002:010) Identifier |location|
+//@[010:011) Colon |:|
+//@[012:027) StringComplete |'polandcentral'|
+//@[027:031) NewLine |\r\n\r\n|
+
+ @
+//@[002:003) At |@|
+//@[003:005) NewLine |\r\n|
+}
+//@[000:001) RightBrace |}|
+//@[001:003) NewLine |\r\n|
+resource sqlServer2 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:008) Identifier |resource|
+//@[009:019) Identifier |sqlServer2|
+//@[020:054) StringComplete |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:056) Assignment |=|
+//@[057:058) LeftBrace |{|
+//@[058:060) NewLine |\r\n|
+ name: 'sqlServer2'
+//@[002:006) Identifier |name|
+//@[006:007) Colon |:|
+//@[008:020) StringComplete |'sqlServer2'|
+//@[020:022) NewLine |\r\n|
+ location: 'polandcentral'
+//@[002:010) Identifier |location|
+//@[010:011) Colon |:|
+//@[012:027) StringComplete |'polandcentral'|
+//@[027:031) NewLine |\r\n\r\n|
+
+ @description('var')
+//@[002:003) At |@|
+//@[003:014) Identifier |description|
+//@[014:015) LeftParen |(|
+//@[015:020) StringComplete |'var'|
+//@[020:021) RightParen |)|
+//@[021:023) NewLine |\r\n|
+ var test = 'x'
+//@[002:005) Identifier |var|
+//@[006:010) Identifier |test|
+//@[011:012) Assignment |=|
+//@[013:016) StringComplete |'x'|
+//@[016:020) NewLine |\r\n\r\n|
+
+ @description('module')
+//@[002:003) At |@|
+//@[003:014) Identifier |description|
+//@[014:015) LeftParen |(|
+//@[015:023) StringComplete |'module'|
+//@[023:024) RightParen |)|
+//@[024:026) NewLine |\r\n|
+ module x 'module.bicep' = {
+//@[002:008) Identifier |module|
+//@[009:010) Identifier |x|
+//@[011:025) StringComplete |'module.bicep'|
+//@[026:027) Assignment |=|
+//@[028:029) LeftBrace |{|
+//@[029:031) NewLine |\r\n|
+ name: 'x'
+//@[004:008) Identifier |name|
+//@[008:009) Colon |:|
+//@[010:013) StringComplete |'x'|
+//@[013:015) NewLine |\r\n|
+ }
+//@[002:003) RightBrace |}|
+//@[003:005) NewLine |\r\n|
+}
+//@[000:001) RightBrace |}|
+//@[001:003) NewLine |\r\n|
+resource sqlServer3 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:008) Identifier |resource|
+//@[009:019) Identifier |sqlServer3|
+//@[020:054) StringComplete |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:056) Assignment |=|
+//@[057:058) LeftBrace |{|
+//@[058:060) NewLine |\r\n|
+ name: 'sqlServer3'
+//@[002:006) Identifier |name|
+//@[006:007) Colon |:|
+//@[008:020) StringComplete |'sqlServer3'|
+//@[020:022) NewLine |\r\n|
+ location: 'polandcentral'
+//@[002:010) Identifier |location|
+//@[010:011) Colon |:|
+//@[012:027) StringComplete |'polandcentral'|
+//@[027:031) NewLine |\r\n\r\n|
+
+ @description('mising resource keyword')
+//@[002:003) At |@|
+//@[003:014) Identifier |description|
+//@[014:015) LeftParen |(|
+//@[015:040) StringComplete |'mising resource keyword'|
+//@[040:041) RightParen |)|
+//@[041:045) NewLine |\r\n\r\n|
+
}
//@[000:001) RightBrace |}|
//@[001:003) NewLine |\r\n|
+resource sqlServer4 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:008) Identifier |resource|
+//@[009:019) Identifier |sqlServer4|
+//@[020:054) StringComplete |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:056) Assignment |=|
+//@[057:058) LeftBrace |{|
+//@[058:060) NewLine |\r\n|
+ name: 'sqlServer4'
+//@[002:006) Identifier |name|
+//@[006:007) Colon |:|
+//@[008:020) StringComplete |'sqlServer4'|
+//@[020:022) NewLine |\r\n|
+ location: 'polandcentral'
+//@[002:010) Identifier |location|
+//@[010:011) Colon |:|
+//@[012:027) StringComplete |'polandcentral'|
+//@[027:031) NewLine |\r\n\r\n|
-//@[000:000) EndOfFile ||
+ @batchSize(1)
+//@[002:003) At |@|
+//@[003:012) Identifier |batchSize|
+//@[012:013) LeftParen |(|
+//@[013:014) Integer |1|
+//@[014:015) RightParen |)|
+//@[015:019) NewLine |\r\n\r\n|
+
+}
+//@[000:001) RightBrace |}|
+//@[001:003) NewLine |\r\n|
+resource sqlServer5 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:008) Identifier |resource|
+//@[009:019) Identifier |sqlServer5|
+//@[020:054) StringComplete |'Microsoft.Sql/servers@2021-11-01'|
+//@[055:056) Assignment |=|
+//@[057:058) LeftBrace |{|
+//@[058:060) NewLine |\r\n|
+ name: 'sqlServer5'
+//@[002:006) Identifier |name|
+//@[006:007) Colon |:|
+//@[008:020) StringComplete |'sqlServer5'|
+//@[020:022) NewLine |\r\n|
+ location: 'polandcentral'
+//@[002:010) Identifier |location|
+//@[010:011) Colon |:|
+//@[012:027) StringComplete |'polandcentral'|
+//@[027:031) NewLine |\r\n\r\n|
+
+ @batchSize(1)
+//@[002:003) At |@|
+//@[003:012) Identifier |batchSize|
+//@[012:013) LeftParen |(|
+//@[013:014) Integer |1|
+//@[014:015) RightParen |)|
+//@[015:017) NewLine |\r\n|
+ resource sqlDatabase 'databases' = {
+//@[002:010) Identifier |resource|
+//@[011:022) Identifier |sqlDatabase|
+//@[023:034) StringComplete |'databases'|
+//@[035:036) Assignment |=|
+//@[037:038) LeftBrace |{|
+//@[038:040) NewLine |\r\n|
+ name: 'db'
+//@[004:008) Identifier |name|
+//@[008:009) Colon |:|
+//@[010:014) StringComplete |'db'|
+//@[014:016) NewLine |\r\n|
+ location: 'polandcentral'
+//@[004:012) Identifier |location|
+//@[012:013) Colon |:|
+//@[014:029) StringComplete |'polandcentral'|
+//@[029:031) NewLine |\r\n|
+ }
+//@[002:003) RightBrace |}|
+//@[003:005) NewLine |\r\n|
+}
+//@[000:001) RightBrace |}|
+//@[001:001) EndOfFile ||
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.bicep
index 944748ba929..50052f165c1 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.bicep
@@ -490,3 +490,23 @@ output p4_res1childprop string = p4_child1.properties.someProp
output p4_res1childname string = p4_child1.name
output p4_res1childtype string = p4_child1.type
output p4_res1childid string = p4_child1.id
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+var dbs = ['db1', 'db2','db3']
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ @description('Sql Databases')
+ resource sqlDatabases 'databases' = [for db in dbs: {
+ name: db
+ location: 'polandcentral'
+ }]
+
+ @description('Primary Sql Database')
+ resource primaryDb 'databases' = {
+ name: 'primary-db'
+ location: 'polandcentral'
+ }
+}
\ No newline at end of file
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.diagnostics.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.diagnostics.bicep
index f8ea8cff839..3104cc5c592 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.diagnostics.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.diagnostics.bicep
@@ -532,3 +532,25 @@ output p4_res1childname string = p4_child1.name
output p4_res1childtype string = p4_child1.type
output p4_res1childid string = p4_child1.id
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+var dbs = ['db1', 'db2','db3']
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+//@[12:27) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+
+ @batchSize(1)
+ @description('Sql Databases')
+ resource sqlDatabases 'databases' = [for db in dbs: {
+ name: db
+ location: 'polandcentral'
+//@[14:29) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+ }]
+
+ @description('Primary Sql Database')
+ resource primaryDb 'databases' = {
+ name: 'primary-db'
+ location: 'polandcentral'
+//@[14:29) [no-hardcoded-location (Warning)] A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'polandcentral' (CodeDescription: bicep core(https://aka.ms/bicep/linter/no-hardcoded-location)) |'polandcentral'|
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.formatted.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.formatted.bicep
index d29e6f9a269..5a4ed14402f 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.formatted.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.formatted.bicep
@@ -486,3 +486,23 @@ output p4_res1childprop string = p4_child1.properties.someProp
output p4_res1childname string = p4_child1.name
output p4_res1childtype string = p4_child1.type
output p4_res1childid string = p4_child1.id
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+var dbs = [ 'db1', 'db2', 'db3' ]
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ @description('Sql Databases')
+ resource sqlDatabases 'databases' = [for db in dbs: {
+ name: db
+ location: 'polandcentral'
+ }]
+
+ @description('Primary Sql Database')
+ resource primaryDb 'databases' = {
+ name: 'primary-db'
+ location: 'polandcentral'
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.ir.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.ir.bicep
index 943c3670d51..972bd5c269b 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.ir.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.ir.bicep
@@ -1,5 +1,9 @@
-//@[000:12777) ProgramExpression
+//@[000:13313) ProgramExpression
+//@[000:00000) | └─ResourceDependencyExpression [UNPARENTED]
+//@[000:00000) | └─ResourceReferenceExpression [UNPARENTED]
+//@[000:00000) | └─ResourceDependencyExpression [UNPARENTED]
+//@[000:00000) | └─ResourceReferenceExpression [UNPARENTED]
//@[000:00000) | └─ResourceDependencyExpression [UNPARENTED]
//@[000:00000) | └─ResourceReferenceExpression [UNPARENTED]
//@[000:00000) | └─ResourceDependencyExpression [UNPARENTED]
@@ -1331,3 +1335,46 @@ output p4_res1childid string = p4_child1.id
//@[031:00043) └─PropertyAccessExpression { PropertyName = id }
//@[031:00040) └─ResourceReferenceExpression
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+var dbs = ['db1', 'db2','db3']
+//@[000:00030) ├─DeclaredVariableExpression { Name = dbs }
+//@[010:00030) | └─ArrayExpression
+//@[011:00016) | ├─StringLiteralExpression { Value = db1 }
+//@[018:00023) | ├─StringLiteralExpression { Value = db2 }
+//@[024:00029) | └─StringLiteralExpression { Value = db3 }
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:00416) ├─DeclaredResourceExpression
+//@[056:00416) | └─ObjectExpression
+ name: 'sql-server-name'
+ location: 'polandcentral'
+//@[002:00027) | └─ObjectPropertyExpression
+//@[002:00010) | ├─StringLiteralExpression { Value = location }
+//@[012:00027) | └─StringLiteralExpression { Value = polandcentral }
+
+ @batchSize(1)
+//@[002:00156) ├─DeclaredResourceExpression
+ @description('Sql Databases')
+//@[015:00030) | ├─StringLiteralExpression { Value = Sql Databases }
+ resource sqlDatabases 'databases' = [for db in dbs: {
+//@[038:00106) | ├─ForLoopExpression
+//@[049:00052) | | ├─VariableReferenceExpression { Variable = dbs }
+//@[054:00105) | | └─ObjectExpression
+ name: db
+ location: 'polandcentral'
+//@[004:00029) | | └─ObjectPropertyExpression
+//@[004:00012) | | ├─StringLiteralExpression { Value = location }
+//@[014:00029) | | └─StringLiteralExpression { Value = polandcentral }
+ }]
+
+ @description('Primary Sql Database')
+//@[002:00136) ├─DeclaredResourceExpression
+//@[015:00037) | ├─StringLiteralExpression { Value = Primary Sql Database }
+ resource primaryDb 'databases' = {
+//@[035:00096) | ├─ObjectExpression
+ name: 'primary-db'
+ location: 'polandcentral'
+//@[004:00029) | | └─ObjectPropertyExpression
+//@[004:00012) | | ├─StringLiteralExpression { Value = location }
+//@[014:00029) | | └─StringLiteralExpression { Value = polandcentral }
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.json b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.json
index d2050e29ec1..0ecd8c8815b 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.json
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.json
@@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "dev",
- "templateHash": "14326560630100309498"
+ "templateHash": "9175006065683431096"
}
},
"parameters": {
@@ -52,9 +52,44 @@
}
],
"canHaveDuplicatesAcrossScopes": "hello",
- "duplicatesEverywhere": "hello"
+ "duplicatesEverywhere": "hello",
+ "dbs": [
+ "db1",
+ "db2",
+ "db3"
+ ]
},
"resources": [
+ {
+ "copy": {
+ "name": "sqlDatabases",
+ "count": "[length(variables('dbs'))]",
+ "mode": "serial",
+ "batchSize": 1
+ },
+ "type": "Microsoft.Sql/servers/databases",
+ "apiVersion": "2021-11-01",
+ "name": "[format('{0}/{1}', 'sql-server-name', variables('dbs')[copyIndex()])]",
+ "location": "polandcentral",
+ "dependsOn": [
+ "[resourceId('Microsoft.Sql/servers', 'sql-server-name')]"
+ ],
+ "metadata": {
+ "description": "Sql Databases"
+ }
+ },
+ {
+ "type": "Microsoft.Sql/servers/databases",
+ "apiVersion": "2021-11-01",
+ "name": "[format('{0}/{1}', 'sql-server-name', 'primary-db')]",
+ "location": "polandcentral",
+ "dependsOn": [
+ "[resourceId('Microsoft.Sql/servers', 'sql-server-name')]"
+ ],
+ "metadata": {
+ "description": "Primary Sql Database"
+ }
+ },
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
@@ -588,6 +623,12 @@
"type": "Microsoft.Rp1/resource1/child1",
"apiVersion": "2020-06-01",
"name": "[format('{0}/{1}', 'res1', 'child1')]"
+ },
+ {
+ "type": "Microsoft.Sql/servers",
+ "apiVersion": "2021-11-01",
+ "name": "sql-server-name",
+ "location": "polandcentral"
}
],
"outputs": {
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.pprint.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.pprint.bicep
index 2ca29c51647..757bef8ac34 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.pprint.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.pprint.bicep
@@ -511,3 +511,25 @@ output p4_res1childprop string = p4_child1.properties.someProp
output p4_res1childname string = p4_child1.name
output p4_res1childtype string = p4_child1.type
output p4_res1childid string = p4_child1.id
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+var dbs = ['db1', 'db2', 'db3']
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ @description('Sql Databases')
+ resource sqlDatabases 'databases' = [
+ for db in dbs: {
+ name: db
+ location: 'polandcentral'
+ }
+ ]
+
+ @description('Primary Sql Database')
+ resource primaryDb 'databases' = {
+ name: 'primary-db'
+ location: 'polandcentral'
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.sourcemap.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.sourcemap.bicep
index 15a3fefb0e8..fc1a435ed92 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.sourcemap.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.sourcemap.bicep
@@ -798,7 +798,7 @@ resource duplicateInGlobalAndOneLoop 'Microsoft.Network/virtualNetworks@2020-06-
// duplicate in global and multiple loop scopes are allowed (inner hides the outer)
var duplicatesEverywhere = 'hello'
-//@ "duplicatesEverywhere": "hello"
+//@ "duplicatesEverywhere": "hello",
resource duplicateInGlobalAndTwoLoops 'Microsoft.Network/virtualNetworks@2020-06-01' = [for duplicatesEverywhere in range(0, 3): {
//@ {
//@ "copy": {
@@ -1081,7 +1081,7 @@ resource p3_child1 'Microsoft.Rp1/resource1/child1@2020-06-01' = {
//@ "type": "Microsoft.Rp1/resource1/child1",
//@ "apiVersion": "2020-06-01",
//@ "name": "[format('{0}/{1}', 'res1', 'child1')]"
-//@ }
+//@ },
parent: p3_res1
name: 'child1'
}
@@ -1139,3 +1139,63 @@ output p4_res1childid string = p4_child1.id
//@ "value": "[tenantResourceId('Microsoft.Rp1/resource1/child1', 'res1', 'child1')]"
//@ }
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+var dbs = ['db1', 'db2','db3']
+//@ "dbs": [
+//@ "db1",
+//@ "db2",
+//@ "db3"
+//@ ]
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+//@ {
+//@ "type": "Microsoft.Sql/servers",
+//@ "apiVersion": "2021-11-01",
+//@ "name": "sql-server-name",
+//@ }
+ name: 'sql-server-name'
+ location: 'polandcentral'
+//@ "location": "polandcentral"
+
+ @batchSize(1)
+ @description('Sql Databases')
+//@ "description": "Sql Databases"
+ resource sqlDatabases 'databases' = [for db in dbs: {
+//@ {
+//@ "copy": {
+//@ "name": "sqlDatabases",
+//@ "count": "[length(variables('dbs'))]",
+//@ "mode": "serial",
+//@ "batchSize": 1
+//@ },
+//@ "type": "Microsoft.Sql/servers/databases",
+//@ "apiVersion": "2021-11-01",
+//@ "name": "[format('{0}/{1}', 'sql-server-name', variables('dbs')[copyIndex()])]",
+//@ "dependsOn": [
+//@ "[resourceId('Microsoft.Sql/servers', 'sql-server-name')]"
+//@ ],
+//@ "metadata": {
+//@ }
+//@ },
+ name: db
+ location: 'polandcentral'
+//@ "location": "polandcentral",
+ }]
+
+ @description('Primary Sql Database')
+//@ "description": "Primary Sql Database"
+ resource primaryDb 'databases' = {
+//@ {
+//@ "type": "Microsoft.Sql/servers/databases",
+//@ "apiVersion": "2021-11-01",
+//@ "name": "[format('{0}/{1}', 'sql-server-name', 'primary-db')]",
+//@ "dependsOn": [
+//@ "[resourceId('Microsoft.Sql/servers', 'sql-server-name')]"
+//@ ],
+//@ "metadata": {
+//@ }
+//@ },
+ name: 'primary-db'
+ location: 'polandcentral'
+//@ "location": "polandcentral",
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbolicnames.json b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbolicnames.json
index 534bd121284..962a56a6d9d 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbolicnames.json
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbolicnames.json
@@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "dev",
- "templateHash": "8982011885688931227"
+ "templateHash": "5796807527518784233"
}
},
"parameters": {
@@ -53,9 +53,44 @@
}
],
"canHaveDuplicatesAcrossScopes": "hello",
- "duplicatesEverywhere": "hello"
+ "duplicatesEverywhere": "hello",
+ "dbs": [
+ "db1",
+ "db2",
+ "db3"
+ ]
},
"resources": {
+ "sqlServer::sqlDatabases": {
+ "copy": {
+ "name": "sqlDatabases",
+ "count": "[length(variables('dbs'))]",
+ "mode": "serial",
+ "batchSize": 1
+ },
+ "type": "Microsoft.Sql/servers/databases",
+ "apiVersion": "2021-11-01",
+ "name": "[format('{0}/{1}', 'sql-server-name', variables('dbs')[copyIndex()])]",
+ "location": "polandcentral",
+ "dependsOn": [
+ "sqlServer"
+ ],
+ "metadata": {
+ "description": "Sql Databases"
+ }
+ },
+ "sqlServer::primaryDb": {
+ "type": "Microsoft.Sql/servers/databases",
+ "apiVersion": "2021-11-01",
+ "name": "[format('{0}/{1}', 'sql-server-name', 'primary-db')]",
+ "location": "polandcentral",
+ "dependsOn": [
+ "sqlServer"
+ ],
+ "metadata": {
+ "description": "Primary Sql Database"
+ }
+ },
"basicStorage": {
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
@@ -638,6 +673,12 @@
"dependsOn": [
"p4_res1"
]
+ },
+ "sqlServer": {
+ "type": "Microsoft.Sql/servers",
+ "apiVersion": "2021-11-01",
+ "name": "sql-server-name",
+ "location": "polandcentral"
}
},
"outputs": {
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbols.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbols.bicep
index 43f054c909b..ca280aa5fc0 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbols.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.symbols.bicep
@@ -588,3 +588,27 @@ output p4_res1childtype string = p4_child1.type
output p4_res1childid string = p4_child1.id
//@[07:021) Output p4_res1childid. Type: string. Declaration start char: 0, length: 43
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+var dbs = ['db1', 'db2','db3']
+//@[04:007) Variable dbs. Type: ['db1', 'db2', 'db3']. Declaration start char: 0, length: 30
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+//@[09:018) Resource sqlServer. Type: Microsoft.Sql/servers@2021-11-01. Declaration start char: 0, length: 416
+ name: 'sql-server-name'
+ location: 'polandcentral'
+
+ @batchSize(1)
+ @description('Sql Databases')
+ resource sqlDatabases 'databases' = [for db in dbs: {
+//@[43:045) Local db. Type: 'db1' | 'db2' | 'db3'. Declaration start char: 43, length: 2
+//@[11:023) Resource sqlDatabases. Type: Microsoft.Sql/servers/databases@2021-11-01[]. Declaration start char: 2, length: 154
+ name: db
+ location: 'polandcentral'
+ }]
+
+ @description('Primary Sql Database')
+ resource primaryDb 'databases' = {
+//@[11:020) Resource primaryDb. Type: Microsoft.Sql/servers/databases@2021-11-01. Declaration start char: 2, length: 134
+ name: 'primary-db'
+ location: 'polandcentral'
+ }
+}
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.syntax.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.syntax.bicep
index cfa303608a3..094227013e2 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.syntax.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.syntax.bicep
@@ -1,5 +1,5 @@
-//@[000:12777) ProgramSyntax
+//@[000:13313) ProgramSyntax
//@[000:00002) ├─Token(NewLine) |\r\n|
@sys.description('this is basicStorage')
//@[000:00225) ├─ResourceDeclarationSyntax
@@ -3896,6 +3896,169 @@ output p4_res1childid string = p4_child1.id
//@[040:00041) | ├─Token(Dot) |.|
//@[041:00043) | └─IdentifierSyntax
//@[041:00043) | └─Token(Identifier) |id|
-//@[043:00045) ├─Token(NewLine) |\r\n|
+//@[043:00047) ├─Token(NewLine) |\r\n\r\n|
+
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+//@[084:00086) ├─Token(NewLine) |\r\n|
+var dbs = ['db1', 'db2','db3']
+//@[000:00030) ├─VariableDeclarationSyntax
+//@[000:00003) | ├─Token(Identifier) |var|
+//@[004:00007) | ├─IdentifierSyntax
+//@[004:00007) | | └─Token(Identifier) |dbs|
+//@[008:00009) | ├─Token(Assignment) |=|
+//@[010:00030) | └─ArraySyntax
+//@[010:00011) | ├─Token(LeftSquare) |[|
+//@[011:00016) | ├─ArrayItemSyntax
+//@[011:00016) | | └─StringSyntax
+//@[011:00016) | | └─Token(StringComplete) |'db1'|
+//@[016:00017) | ├─Token(Comma) |,|
+//@[018:00023) | ├─ArrayItemSyntax
+//@[018:00023) | | └─StringSyntax
+//@[018:00023) | | └─Token(StringComplete) |'db2'|
+//@[023:00024) | ├─Token(Comma) |,|
+//@[024:00029) | ├─ArrayItemSyntax
+//@[024:00029) | | └─StringSyntax
+//@[024:00029) | | └─Token(StringComplete) |'db3'|
+//@[029:00030) | └─Token(RightSquare) |]|
+//@[030:00032) ├─Token(NewLine) |\r\n|
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:00416) ├─ResourceDeclarationSyntax
+//@[000:00008) | ├─Token(Identifier) |resource|
+//@[009:00018) | ├─IdentifierSyntax
+//@[009:00018) | | └─Token(Identifier) |sqlServer|
+//@[019:00053) | ├─StringSyntax
+//@[019:00053) | | └─Token(StringComplete) |'Microsoft.Sql/servers@2021-11-01'|
+//@[054:00055) | ├─Token(Assignment) |=|
+//@[056:00416) | └─ObjectSyntax
+//@[056:00057) | ├─Token(LeftBrace) |{|
+//@[057:00059) | ├─Token(NewLine) |\r\n|
+ name: 'sql-server-name'
+//@[002:00025) | ├─ObjectPropertySyntax
+//@[002:00006) | | ├─IdentifierSyntax
+//@[002:00006) | | | └─Token(Identifier) |name|
+//@[006:00007) | | ├─Token(Colon) |:|
+//@[008:00025) | | └─StringSyntax
+//@[008:00025) | | └─Token(StringComplete) |'sql-server-name'|
+//@[025:00027) | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[002:00027) | ├─ObjectPropertySyntax
+//@[002:00010) | | ├─IdentifierSyntax
+//@[002:00010) | | | └─Token(Identifier) |location|
+//@[010:00011) | | ├─Token(Colon) |:|
+//@[012:00027) | | └─StringSyntax
+//@[012:00027) | | └─Token(StringComplete) |'polandcentral'|
+//@[027:00031) | ├─Token(NewLine) |\r\n\r\n|
-//@[000:00000) └─Token(EndOfFile) ||
+ @batchSize(1)
+//@[002:00156) | ├─ResourceDeclarationSyntax
+//@[002:00015) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00015) | | | └─FunctionCallSyntax
+//@[003:00012) | | | ├─IdentifierSyntax
+//@[003:00012) | | | | └─Token(Identifier) |batchSize|
+//@[012:00013) | | | ├─Token(LeftParen) |(|
+//@[013:00014) | | | ├─FunctionArgumentSyntax
+//@[013:00014) | | | | └─IntegerLiteralSyntax
+//@[013:00014) | | | | └─Token(Integer) |1|
+//@[014:00015) | | | └─Token(RightParen) |)|
+//@[015:00017) | | ├─Token(NewLine) |\r\n|
+ @description('Sql Databases')
+//@[002:00031) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00031) | | | └─FunctionCallSyntax
+//@[003:00014) | | | ├─IdentifierSyntax
+//@[003:00014) | | | | └─Token(Identifier) |description|
+//@[014:00015) | | | ├─Token(LeftParen) |(|
+//@[015:00030) | | | ├─FunctionArgumentSyntax
+//@[015:00030) | | | | └─StringSyntax
+//@[015:00030) | | | | └─Token(StringComplete) |'Sql Databases'|
+//@[030:00031) | | | └─Token(RightParen) |)|
+//@[031:00033) | | ├─Token(NewLine) |\r\n|
+ resource sqlDatabases 'databases' = [for db in dbs: {
+//@[002:00010) | | ├─Token(Identifier) |resource|
+//@[011:00023) | | ├─IdentifierSyntax
+//@[011:00023) | | | └─Token(Identifier) |sqlDatabases|
+//@[024:00035) | | ├─StringSyntax
+//@[024:00035) | | | └─Token(StringComplete) |'databases'|
+//@[036:00037) | | ├─Token(Assignment) |=|
+//@[038:00106) | | └─ForSyntax
+//@[038:00039) | | ├─Token(LeftSquare) |[|
+//@[039:00042) | | ├─Token(Identifier) |for|
+//@[043:00045) | | ├─LocalVariableSyntax
+//@[043:00045) | | | └─IdentifierSyntax
+//@[043:00045) | | | └─Token(Identifier) |db|
+//@[046:00048) | | ├─Token(Identifier) |in|
+//@[049:00052) | | ├─VariableAccessSyntax
+//@[049:00052) | | | └─IdentifierSyntax
+//@[049:00052) | | | └─Token(Identifier) |dbs|
+//@[052:00053) | | ├─Token(Colon) |:|
+//@[054:00105) | | ├─ObjectSyntax
+//@[054:00055) | | | ├─Token(LeftBrace) |{|
+//@[055:00057) | | | ├─Token(NewLine) |\r\n|
+ name: db
+//@[004:00012) | | | ├─ObjectPropertySyntax
+//@[004:00008) | | | | ├─IdentifierSyntax
+//@[004:00008) | | | | | └─Token(Identifier) |name|
+//@[008:00009) | | | | ├─Token(Colon) |:|
+//@[010:00012) | | | | └─VariableAccessSyntax
+//@[010:00012) | | | | └─IdentifierSyntax
+//@[010:00012) | | | | └─Token(Identifier) |db|
+//@[012:00014) | | | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[004:00029) | | | ├─ObjectPropertySyntax
+//@[004:00012) | | | | ├─IdentifierSyntax
+//@[004:00012) | | | | | └─Token(Identifier) |location|
+//@[012:00013) | | | | ├─Token(Colon) |:|
+//@[014:00029) | | | | └─StringSyntax
+//@[014:00029) | | | | └─Token(StringComplete) |'polandcentral'|
+//@[029:00031) | | | ├─Token(NewLine) |\r\n|
+ }]
+//@[002:00003) | | | └─Token(RightBrace) |}|
+//@[003:00004) | | └─Token(RightSquare) |]|
+//@[004:00008) | ├─Token(NewLine) |\r\n\r\n|
+
+ @description('Primary Sql Database')
+//@[002:00136) | ├─ResourceDeclarationSyntax
+//@[002:00038) | | ├─DecoratorSyntax
+//@[002:00003) | | | ├─Token(At) |@|
+//@[003:00038) | | | └─FunctionCallSyntax
+//@[003:00014) | | | ├─IdentifierSyntax
+//@[003:00014) | | | | └─Token(Identifier) |description|
+//@[014:00015) | | | ├─Token(LeftParen) |(|
+//@[015:00037) | | | ├─FunctionArgumentSyntax
+//@[015:00037) | | | | └─StringSyntax
+//@[015:00037) | | | | └─Token(StringComplete) |'Primary Sql Database'|
+//@[037:00038) | | | └─Token(RightParen) |)|
+//@[038:00040) | | ├─Token(NewLine) |\r\n|
+ resource primaryDb 'databases' = {
+//@[002:00010) | | ├─Token(Identifier) |resource|
+//@[011:00020) | | ├─IdentifierSyntax
+//@[011:00020) | | | └─Token(Identifier) |primaryDb|
+//@[021:00032) | | ├─StringSyntax
+//@[021:00032) | | | └─Token(StringComplete) |'databases'|
+//@[033:00034) | | ├─Token(Assignment) |=|
+//@[035:00096) | | └─ObjectSyntax
+//@[035:00036) | | ├─Token(LeftBrace) |{|
+//@[036:00038) | | ├─Token(NewLine) |\r\n|
+ name: 'primary-db'
+//@[004:00022) | | ├─ObjectPropertySyntax
+//@[004:00008) | | | ├─IdentifierSyntax
+//@[004:00008) | | | | └─Token(Identifier) |name|
+//@[008:00009) | | | ├─Token(Colon) |:|
+//@[010:00022) | | | └─StringSyntax
+//@[010:00022) | | | └─Token(StringComplete) |'primary-db'|
+//@[022:00024) | | ├─Token(NewLine) |\r\n|
+ location: 'polandcentral'
+//@[004:00029) | | ├─ObjectPropertySyntax
+//@[004:00012) | | | ├─IdentifierSyntax
+//@[004:00012) | | | | └─Token(Identifier) |location|
+//@[012:00013) | | | ├─Token(Colon) |:|
+//@[014:00029) | | | └─StringSyntax
+//@[014:00029) | | | └─Token(StringComplete) |'polandcentral'|
+//@[029:00031) | | ├─Token(NewLine) |\r\n|
+ }
+//@[002:00003) | | └─Token(RightBrace) |}|
+//@[003:00005) | ├─Token(NewLine) |\r\n|
+}
+//@[000:00001) | └─Token(RightBrace) |}|
+//@[001:00001) └─Token(EndOfFile) ||
diff --git a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.tokens.bicep b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.tokens.bicep
index af21d257072..0ebedc89003 100644
--- a/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.tokens.bicep
+++ b/src/Bicep.Core.Samples/Files/baselines/Resources_CRLF/main.tokens.bicep
@@ -2466,6 +2466,109 @@ output p4_res1childid string = p4_child1.id
//@[031:040) Identifier |p4_child1|
//@[040:041) Dot |.|
//@[041:043) Identifier |id|
-//@[043:045) NewLine |\r\n|
+//@[043:047) NewLine |\r\n\r\n|
-//@[000:000) EndOfFile ||
+// parent & nested child with decorators https://github.com/Azure/bicep/issues/10970
+//@[084:086) NewLine |\r\n|
+var dbs = ['db1', 'db2','db3']
+//@[000:003) Identifier |var|
+//@[004:007) Identifier |dbs|
+//@[008:009) Assignment |=|
+//@[010:011) LeftSquare |[|
+//@[011:016) StringComplete |'db1'|
+//@[016:017) Comma |,|
+//@[018:023) StringComplete |'db2'|
+//@[023:024) Comma |,|
+//@[024:029) StringComplete |'db3'|
+//@[029:030) RightSquare |]|
+//@[030:032) NewLine |\r\n|
+resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = {
+//@[000:008) Identifier |resource|
+//@[009:018) Identifier |sqlServer|
+//@[019:053) StringComplete |'Microsoft.Sql/servers@2021-11-01'|
+//@[054:055) Assignment |=|
+//@[056:057) LeftBrace |{|
+//@[057:059) NewLine |\r\n|
+ name: 'sql-server-name'
+//@[002:006) Identifier |name|
+//@[006:007) Colon |:|
+//@[008:025) StringComplete |'sql-server-name'|
+//@[025:027) NewLine |\r\n|
+ location: 'polandcentral'
+//@[002:010) Identifier |location|
+//@[010:011) Colon |:|
+//@[012:027) StringComplete |'polandcentral'|
+//@[027:031) NewLine |\r\n\r\n|
+
+ @batchSize(1)
+//@[002:003) At |@|
+//@[003:012) Identifier |batchSize|
+//@[012:013) LeftParen |(|
+//@[013:014) Integer |1|
+//@[014:015) RightParen |)|
+//@[015:017) NewLine |\r\n|
+ @description('Sql Databases')
+//@[002:003) At |@|
+//@[003:014) Identifier |description|
+//@[014:015) LeftParen |(|
+//@[015:030) StringComplete |'Sql Databases'|
+//@[030:031) RightParen |)|
+//@[031:033) NewLine |\r\n|
+ resource sqlDatabases 'databases' = [for db in dbs: {
+//@[002:010) Identifier |resource|
+//@[011:023) Identifier |sqlDatabases|
+//@[024:035) StringComplete |'databases'|
+//@[036:037) Assignment |=|
+//@[038:039) LeftSquare |[|
+//@[039:042) Identifier |for|
+//@[043:045) Identifier |db|
+//@[046:048) Identifier |in|
+//@[049:052) Identifier |dbs|
+//@[052:053) Colon |:|
+//@[054:055) LeftBrace |{|
+//@[055:057) NewLine |\r\n|
+ name: db
+//@[004:008) Identifier |name|
+//@[008:009) Colon |:|
+//@[010:012) Identifier |db|
+//@[012:014) NewLine |\r\n|
+ location: 'polandcentral'
+//@[004:012) Identifier |location|
+//@[012:013) Colon |:|
+//@[014:029) StringComplete |'polandcentral'|
+//@[029:031) NewLine |\r\n|
+ }]
+//@[002:003) RightBrace |}|
+//@[003:004) RightSquare |]|
+//@[004:008) NewLine |\r\n\r\n|
+
+ @description('Primary Sql Database')
+//@[002:003) At |@|
+//@[003:014) Identifier |description|
+//@[014:015) LeftParen |(|
+//@[015:037) StringComplete |'Primary Sql Database'|
+//@[037:038) RightParen |)|
+//@[038:040) NewLine |\r\n|
+ resource primaryDb 'databases' = {
+//@[002:010) Identifier |resource|
+//@[011:020) Identifier |primaryDb|
+//@[021:032) StringComplete |'databases'|
+//@[033:034) Assignment |=|
+//@[035:036) LeftBrace |{|
+//@[036:038) NewLine |\r\n|
+ name: 'primary-db'
+//@[004:008) Identifier |name|
+//@[008:009) Colon |:|
+//@[010:022) StringComplete |'primary-db'|
+//@[022:024) NewLine |\r\n|
+ location: 'polandcentral'
+//@[004:012) Identifier |location|
+//@[012:013) Colon |:|
+//@[014:029) StringComplete |'polandcentral'|
+//@[029:031) NewLine |\r\n|
+ }
+//@[002:003) RightBrace |}|
+//@[003:005) NewLine |\r\n|
+}
+//@[000:001) RightBrace |}|
+//@[001:001) EndOfFile ||
diff --git a/src/Bicep.Core.UnitTests/Registry/SourceArchiveTests.cs b/src/Bicep.Core.UnitTests/Registry/SourceArchiveTests.cs
index 6c2da48cdc8..605b77745a1 100644
--- a/src/Bicep.Core.UnitTests/Registry/SourceArchiveTests.cs
+++ b/src/Bicep.Core.UnitTests/Registry/SourceArchiveTests.cs
@@ -128,7 +128,7 @@ private ISourceFile CreateSourceFile(MockFileSystem fs, Uri projectFolderUri, st
SourceArchive.SourceKind_Bicep => SourceFileFactory.CreateSourceFile(uri, actualContents),
SourceArchive.SourceKind_TemplateSpec => SourceFileFactory.CreateTemplateSpecFile(uri, actualContents),
_ => throw new Exception($"Unrecognized source kind: {sourceKind}")
- }; ;
+ };
}
[TestMethod]
diff --git a/src/Bicep.Core/Parsing/BaseParser.cs b/src/Bicep.Core/Parsing/BaseParser.cs
index 24aac4bb6bc..6443cd5dee0 100644
--- a/src/Bicep.Core/Parsing/BaseParser.cs
+++ b/src/Bicep.Core/Parsing/BaseParser.cs
@@ -202,7 +202,7 @@ public SyntaxBase Expression(ExpressionFlags expressionFlags)
public abstract ProgramSyntax Program();
- protected abstract SyntaxBase Declaration();
+ protected abstract SyntaxBase Declaration(params string[] expectedKeywords);
private SyntaxBase Array()
{
@@ -210,7 +210,7 @@ private SyntaxBase Array()
var itemsOrTokens = HandleArrayOrObjectElements(
closingTokenType: TokenType.RightSquare,
- parseChildElement: () => ArrayItem());
+ parseChildElement: ArrayItem);
var closeBracket = Expect(TokenType.RightSquare, b => b.ExpectedCharacter("]"));
@@ -369,10 +369,7 @@ private SyntaxBase ForVariableBlock()
private SyntaxBase FunctionArgument(ExpressionFlags expressionFlags)
{
- var expression = this.WithRecovery(() =>
- {
- return this.Expression(expressionFlags);
- }, RecoveryFlags.None, TokenType.NewLine, TokenType.Comma, TokenType.RightParen);
+ var expression = this.WithRecovery(() => Expression(expressionFlags), RecoveryFlags.None, TokenType.NewLine, TokenType.Comma, TokenType.RightParen);
// always return a function argument syntax, even if we have skipped trivia
// this simplifies calculations done to show argument completions and signature help
@@ -1019,15 +1016,18 @@ private SyntaxBase ObjectProperty(ExpressionFlags expressionFlags)
// Nested resource declarations may be allowed - but we need lookahead to avoid
// treating 'resource' as a reserved property name.
if (HasExpressionFlag(expressionFlags, ExpressionFlags.AllowResourceDeclarations) &&
- CheckKeyword(LanguageConstants.ResourceKeyword) &&
-
- // You are here: |resource ...
+ (Check(TokenType.At)
+ // You are here: |@batchSize(1)
+ // resource ...
//
- // If we see a non-identifier then it's not a resource declaration,
- // fall back to the property parser.
- Check(this.reader.PeekAhead(), TokenType.Identifier))
+ // If we see a decorator declaration then we need to expect a declaration that follows it
+ || (CheckKeyword(LanguageConstants.ResourceKeyword) &&
+ // You are here: |resource ...
+ //
+ // If we see an identifier then it's a resource declaration. Otherwise, fall back to the property parser.
+ Check(this.reader.PeekAhead(), TokenType.Identifier))))
{
- return this.Declaration();
+ return this.Declaration(LanguageConstants.ResourceKeyword);
}
var key = this.WithRecovery(
diff --git a/src/Bicep.Core/Parsing/ParamsParser.cs b/src/Bicep.Core/Parsing/ParamsParser.cs
index c1c090fdb3d..0f590224e62 100644
--- a/src/Bicep.Core/Parsing/ParamsParser.cs
+++ b/src/Bicep.Core/Parsing/ParamsParser.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Collections.Immutable;
+using System.Linq;
using Bicep.Core.Syntax;
namespace Bicep.Core.Parsing
@@ -44,17 +45,17 @@ public override ProgramSyntax Program()
return programSyntax;
}
- protected override SyntaxBase Declaration() =>
+ protected override SyntaxBase Declaration(params string[] expectedKeywords) =>
this.WithRecovery(
() =>
{
var leadingNodes = DecorableSyntaxLeadingNodes().ToImmutableArray();
- Token current = reader.Peek();
+ var current = reader.Peek();
return current.Type switch
{
- TokenType.Identifier => current.Text switch
+ TokenType.Identifier => ValidateKeyword(current.Text) switch
{
LanguageConstants.UsingKeyword => this.UsingDeclaration(),
LanguageConstants.ParameterKeyword => this.ParameterAssignment(),
@@ -63,9 +64,11 @@ protected override SyntaxBase Declaration() =>
_ => throw new ExpectedTokenException(current, b => b.UnrecognizedParamsFileDeclaration()),
},
TokenType.NewLine => this.NewLine(),
-
_ => throw new ExpectedTokenException(current, b => b.UnrecognizedParamsFileDeclaration()),
};
+
+ string? ValidateKeyword(string keyword) =>
+ expectedKeywords.Length == 0 || expectedKeywords.Contains(keyword) ? keyword : null;
},
RecoveryFlags.None,
TokenType.NewLine);
diff --git a/src/Bicep.Core/Parsing/Parser.cs b/src/Bicep.Core/Parsing/Parser.cs
index 0c79b4835c5..e0b3dae60be 100644
--- a/src/Bicep.Core/Parsing/Parser.cs
+++ b/src/Bicep.Core/Parsing/Parser.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Collections.Immutable;
+using System.Linq;
using Bicep.Core.Navigation;
using Bicep.Core.Syntax;
@@ -46,17 +47,17 @@ public override ProgramSyntax Program()
return programSyntax;
}
- protected override SyntaxBase Declaration() =>
+ protected override SyntaxBase Declaration(params string[] expectedKeywords) =>
this.WithRecovery(
() =>
{
var leadingNodes = DecorableSyntaxLeadingNodes().ToImmutableArray();
- Token current = reader.Peek();
+ var current = reader.Peek();
return current.Type switch
{
- TokenType.Identifier => current.Text switch
+ TokenType.Identifier => ValidateKeyword(current.Text) switch
{
LanguageConstants.TargetScopeKeyword => this.TargetScope(leadingNodes),
LanguageConstants.MetadataKeyword => this.MetadataDeclaration(leadingNodes),
@@ -80,6 +81,9 @@ protected override SyntaxBase Declaration() =>
? new MissingDeclarationSyntax(leadingNodes)
: throw new ExpectedTokenException(current, b => b.UnrecognizedDeclaration()),
};
+
+ string? ValidateKeyword(string keyword) =>
+ expectedKeywords.Length == 0 || expectedKeywords.Contains(keyword) ? keyword : null;
},
RecoveryFlags.None,
TokenType.NewLine);
diff --git a/src/Bicep.Core/TypeSystem/TypeAssignmentVisitor.cs b/src/Bicep.Core/TypeSystem/TypeAssignmentVisitor.cs
index 37430f11d59..d2659dcd0f9 100644
--- a/src/Bicep.Core/TypeSystem/TypeAssignmentVisitor.cs
+++ b/src/Bicep.Core/TypeSystem/TypeAssignmentVisitor.cs
@@ -1125,6 +1125,11 @@ public override void VisitSkippedTriviaSyntax(SkippedTriviaSyntax syntax)
public override void VisitObjectSyntax(ObjectSyntax syntax)
=> AssignType(syntax, () =>
{
+ foreach (var missingDeclarationSyntax in syntax.Children.OfType())
+ {
+ VisitMissingDeclarationSyntax(missingDeclarationSyntax);
+ }
+
var errors = new List();
var duplicatedProperties = syntax.Properties