From 35538fc6c9dd07740a9bb149cad708902e8f1b95 Mon Sep 17 00:00:00 2001 From: Heng Lu Date: Thu, 8 Aug 2024 12:59:43 +0800 Subject: [PATCH] update some templates --- internal/langserver/handlers/snippets/templates.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/langserver/handlers/snippets/templates.json b/internal/langserver/handlers/snippets/templates.json index 32705711..aa887f2d 100644 --- a/internal/langserver/handlers/snippets/templates.json +++ b/internal/langserver/handlers/snippets/templates.json @@ -3,11 +3,11 @@ "label": "azapi-aks-cluster", "documentation": { "kind": "markdown", - "value": "```terraform\nresource \"azapi_resource\" \"aksCluster\" {\n type = \"Microsoft.ContainerService/managedClusters@2021-03-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = \"name\"\n location = \"location\"\n\n identity {\n type = \"SystemAssigned\"\n }\n\n body = {\n properties = {\n kubernetesVersion = \"1.19.7\"\n dnsPrefix = \"dnsprefix\"\n enableRBAC = true\n agentPoolProfiles = [\n {\n name = \"agentpool\"\n count = 3\n vmSize = \"Standard_DS2_v2\"\n osType = \"Linux\"\n mode = \"System\"\n }\n ]\n linuxProfile = {\n adminUsername = \"adminUserName\"\n ssh = {\n publicKeys = [\n {\n keyData = \"REQUIRED\"\n }\n ]\n }\n }\n }\n }\n}\n```" + "value": "```terraform\nresource \"azapi_resource\" \"aksCluster\" {\n type = \"Microsoft.ContainerService/managedClusters@2021-03-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = \"name\"\n location = \"location\"\n\n identity {\n type = \"SystemAssigned\"\n }\n\n body = {\n properties = {\n kubernetesVersion = \"1.29.7\"\n dnsPrefix = \"dnsprefix\"\n enableRBAC = true\n agentPoolProfiles = [\n {\n name = \"agentpool\"\n count = 3\n vmSize = \"Standard_DS2_v2\"\n osType = \"Linux\"\n mode = \"System\"\n }\n ]\n linuxProfile = {\n adminUsername = \"adminUserName\"\n ssh = {\n publicKeys = [\n {\n keyData = \"REQUIRED\"\n }\n ]\n }\n }\n }\n }\n}\n```" }, "sortText": "2_azapi-aks-cluster", "textEdit": { - "newText": "resource \"azapi_resource\" \"${1:aksCluster}\" {\n type = \"Microsoft.ContainerService/managedClusters@2021-03-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = ${2:\"name\"}\n location = ${3:\"location\"}\n\n identity {\n type = \"SystemAssigned\"\n }\n\n body = {\n properties = {\n kubernetesVersion = ${4|\"1.19.7\",\"1.19.6\",\"1.18.14\",\"1.18.10\",\"1.17.16\",\"1.17.13\"|}\n dnsPrefix = ${5:\"dnsprefix\"}\n enableRBAC = true\n agentPoolProfiles = [\n {\n name = \"agentpool\"\n count = ${6:3}\n vmSize = ${7:\"Standard_DS2_v2\"}\n osType = \"Linux\"\n mode = \"System\"\n }\n ]\n linuxProfile = {\n adminUsername = ${8:\"adminUserName\"}\n ssh = {\n publicKeys = [\n {\n keyData = ${9:\"REQUIRED\"}\n }\n ]\n }\n }\n }\n }\n}" + "newText": "resource \"azapi_resource\" \"${1:aksCluster}\" {\n type = \"Microsoft.ContainerService/managedClusters@2021-03-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = ${2:\"name\"}\n location = ${3:\"location\"}\n\n identity {\n type = \"SystemAssigned\"\n }\n\n body = {\n properties = {\n kubernetesVersion = ${4|\"1.30.3\",\"1.30.2\",\"1.29.7\",\"1.29.6\",\"1.28.12\",\"1.28.11\"|}\n dnsPrefix = ${5:\"dnsprefix\"}\n enableRBAC = true\n agentPoolProfiles = [\n {\n name = \"agentpool\"\n count = ${6:3}\n vmSize = ${7:\"Standard_DS2_v2\"}\n osType = \"Linux\"\n mode = \"System\"\n }\n ]\n linuxProfile = {\n adminUsername = ${8:\"adminUserName\"}\n ssh = {\n publicKeys = [\n {\n keyData = ${9:\"REQUIRED\"}\n }\n ]\n }\n }\n }\n }\n}" } }, { @@ -817,11 +817,11 @@ "label": "azapi-rg", "documentation": { "kind": "markdown", - "value": "```terraform\nresource \"azapi_resource\" \"resourceGroup\" {\n type = \"Microsoft.Resources/resourceGroups@2021-04-01\"\n parent_id = \"The ID of `Subscription`\"\n name = \"name\"\n location = \"location\"\n body = {} # Resource group does not require additional properties in the body\n}\n\n```" + "value": "```terraform\nresource \"azapi_resource\" \"resourceGroup\" {\n type = \"Microsoft.Resources/resourceGroups@2021-04-01\"\n name = \"name\"\n location = \"location\"\n body = {} # Resource group does not require additional properties in the body\n}\n\n```" }, "sortText": "2_azapi-rg", "textEdit": { - "newText": "resource \"azapi_resource\" \"${1:resourceGroup}\" {\n type = \"Microsoft.Resources/resourceGroups@2021-04-01\"\n parent_id = \"The ID of `Subscription`\"\n name = ${2:\"name\"}\n location = ${3:\"location\"}\n body = {} # Resource group does not require additional properties in the body\n}\n" + "newText": "resource \"azapi_resource\" \"${1:resourceGroup}\" {\n type = \"Microsoft.Resources/resourceGroups@2021-04-01\"\n name = ${2:\"name\"}\n location = ${3:\"location\"}\n body = {} # Resource group does not require additional properties in the body\n}\n" } }, { @@ -1070,11 +1070,11 @@ "label": "azapi-vnet", "documentation": { "kind": "markdown", - "value": "```terraform\nresource \"azapi_resource\" \"virtualNetwork\" {\n type = \"Microsoft.Network/virtualNetworks@2019-11-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = \"name\"\n location = \"location\"\n body = {\n properties = {\n addressSpace = {\n addressPrefixes = [\n \"10.0.0.0/16\"\n ]\n }\n subnets = [\n {\n name = \"Subnet-1\"\n properties = {\n addressPrefix = \"10.0.0.0/24\"\n }\n }\n {\n name = \"Subnet-2\"\n properties = {\n addressPrefix = \"10.0.1.0/24\"\n }\n }\n ]\n }\n }\n}\n```" + "value": "```terraform\nresource \"azapi_resource\" \"virtualNetwork\" {\n type = \"Microsoft.Network/virtualNetworks@2019-11-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = \"name\"\n location = \"location\"\n body = {\n properties = {\n addressSpace = {\n addressPrefixes = [\n \"10.0.0.0/16\"\n ]\n }\n subnets = [\n {\n name = \"Subnet-1\"\n properties = {\n addressPrefix = \"10.0.0.0/24\"\n }\n },\n {\n name = \"Subnet-2\"\n properties = {\n addressPrefix = \"10.0.1.0/24\"\n }\n }\n ]\n }\n }\n}\n```" }, "sortText": "2_azapi-vnet", "textEdit": { - "newText": "resource \"azapi_resource\" \"${1:virtualNetwork}\" {\n type = \"Microsoft.Network/virtualNetworks@2019-11-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = ${2:\"name\"}\n location = ${3:\"location\"}\n body = {\n properties = {\n addressSpace = {\n addressPrefixes = [\n \"10.0.0.0/16\"\n ]\n }\n subnets = [\n {\n name = \"Subnet-1\"\n properties = {\n addressPrefix = \"10.0.0.0/24\"\n }\n }\n {\n name = \"Subnet-2\"\n properties = {\n addressPrefix = \"10.0.1.0/24\"\n }\n }\n ]\n }\n }\n}" + "newText": "resource \"azapi_resource\" \"${1:virtualNetwork}\" {\n type = \"Microsoft.Network/virtualNetworks@2019-11-01\"\n parent_id = \"The ID of `Microsoft.Resources/resourceGroups`\"\n name = ${2:\"name\"}\n location = ${3:\"location\"}\n body = {\n properties = {\n addressSpace = {\n addressPrefixes = [\n \"10.0.0.0/16\"\n ]\n }\n subnets = [\n {\n name = \"Subnet-1\"\n properties = {\n addressPrefix = \"10.0.0.0/24\"\n }\n },\n {\n name = \"Subnet-2\"\n properties = {\n addressPrefix = \"10.0.1.0/24\"\n }\n }\n ]\n }\n }\n}" } }, {