From 2a1717ff81e1090225668b6dd9f96e9008e5ae41 Mon Sep 17 00:00:00 2001 From: Henrik Jess Nielsen Date: Sun, 10 May 2026 16:23:02 +0200 Subject: [PATCH] feat: bake iac_source_catalog into Docker image; fix YAML smoke test; add .gitignore - Dockerfile: COPY iac_source_catalog.json in builder + final stage - push_catalogs.sh: cp iac_source_catalog.json to iLSP repo root before SCP - smoke_test_completions.py: detect WS CLOSE in _recv_until_id; 20s YAML init timeout; clearer error message - .gitignore: standard Python exclusions Fixes: iac_source_modules=0 (was never baked into image) --- .gitignore | 14 + Dockerfile | 2 + iac_source_catalog.json | 2298 +++++++++++++++++++++++++++++ scripts/push_catalogs.sh | 14 +- scripts/smoke_test_completions.py | 123 +- 5 files changed, 2445 insertions(+), 6 deletions(-) create mode 100644 .gitignore create mode 100644 iac_source_catalog.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..82c99b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +__pycache__/ +*.pyc +*.pyo +.pytest_cache/ +.eggs/ +*.egg-info/ +dist/ +build/ +.coverage +htmlcov/ +*.log +.env +.venv/ +venv/ diff --git a/Dockerfile b/Dockerfile index 906d33e..cc5a280 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ COPY pyproject.toml . COPY ilsp/ ilsp/ COPY bicep_modules_catalog.json . COPY pipeline_templates_catalog.json . +COPY iac_source_catalog.json . RUN pip install --upgrade pip build \ && python -m build --wheel --outdir /dist @@ -45,6 +46,7 @@ COPY --from=bicep-downloader /opt/bicep-langserver /opt/bicep-langserver COPY --from=builder /dist/*.whl /tmp/ COPY --from=builder /build/bicep_modules_catalog.json /bicep_modules_catalog.json COPY --from=builder /build/pipeline_templates_catalog.json /pipeline_templates_catalog.json +COPY --from=builder /build/iac_source_catalog.json /iac_source_catalog.json RUN pip3 install --no-cache-dir --break-system-packages /tmp/*.whl && rm /tmp/*.whl # Configuration defaults (override via Nomad env) diff --git a/iac_source_catalog.json b/iac_source_catalog.json new file mode 100644 index 0000000..f3c1368 --- /dev/null +++ b/iac_source_catalog.json @@ -0,0 +1,2298 @@ +{ + "synced_at": "2026-04-17T21:47:37.335550+00:00", + "source_root": "/Users/lrihni/IdeaProjects/Bitbucket/IaC_Modules", + "module_count": 26, + "types_catalog": { + "projectNameType": { + "kind": "type", + "signature": "string", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": 16, + "minValue": null, + "maxValue": null + }, + "environmentTypeEnum": { + "kind": "type", + "signature": "'DEV' | 'TEST' | 'PROD'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "dataSizeType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "getDataSizeBytes": { + "kind": "func", + "params": "dataSize dataSizeType", + "returns": "int", + "description": "" + }, + "appServiceConnectionStringItemType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "appServiceConnectionStringType": { + "kind": "type", + "signature": "{ *: appServiceConnectionStringItemType }", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "appServiceFileMountType": { + "kind": "type", + "signature": "{", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "appServiceSlotSettingsType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "Type describing the various ways the settings of a deployment slot can be overridden. Objects are not nullable, but empty objects will achieve the same result.", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "netFrameworkVersionEnum": { + "kind": "type", + "signature": "'v9.0' | 'v8.0' | 'v4.8'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "publicNetworkAccessSettingEnum": { + "kind": "type", + "signature": "'ON' | 'WHITELIST' | 'OFF'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "tlsVersionEnum": { + "kind": "type", + "signature": "'1.2' | '1.3'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "appInsightsSettingsType": { + "kind": "type", + "signature": "{", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "appServicePlanPlatformEnum": { + "kind": "type", + "signature": "'Linux' | 'Windows'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "CDNSkuEnum": { + "kind": "type", + "signature": "'Standard_Akamai' | 'Standard_Microsoft' | 'Standard_Verizon' | 'Premium_Verizon'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "configurationStoreValueType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "psqlDbBurstableSku": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "psqlDbGeneralPurposeSku": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "psqlDbMemoryOptimizedSku": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "privateDNSZoneInfoType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "redisCapcityType": { + "kind": "type", + "signature": "int", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": 0, + "maxValue": 6 + }, + "redisFamilyEnum": { + "kind": "type", + "signature": "'C' | 'P'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "redisSkuEnum": { + "kind": "type", + "signature": "'Basic' | 'Standard' | 'Premium'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "principalTypeEnum": { + "kind": "type", + "signature": "'Group' | 'ServicePrincipal'", + "sealed": false, + "description": "Use \"Group\" for Entra user groups. Use \"ServicePrincipal for other identities.", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "principalObjectType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "searchServiceSkuEnum": { + "kind": "type", + "signature": "'basic' | 'standard'", + "sealed": false, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "serviceBusTopicSubscriptionRuleType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "serviceBusTopicSubscriptionType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "serviceBusTopicType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "sqlDbBusinessCriticalSkuType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "sqlDbGeneralPurposeSkuType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "sqlDbHyperscaleSkuType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "sqlDbStandardSkuType": { + "kind": "type", + "signature": "{", + "sealed": true, + "description": "", + "discriminator": false, + "minLength": null, + "maxLength": null, + "minValue": null, + "maxValue": null + }, + "getDTUBasedDatabaseSku": { + "kind": "func", + "params": "dtus int", + "returns": "sqlDbStandardSkuType", + "description": "" + }, + "getGeneralPurposeDatabaseSku": { + "kind": "func", + "params": "vcores int, isServerLess bool", + "returns": "sqlDbGeneralPurposeSkuType", + "description": "" + }, + "getBusinessCriticalDatabaseSku": { + "kind": "func", + "params": "vcores int", + "returns": "sqlDbBusinessCriticalSkuType", + "description": "" + }, + "getHyperscaleDatabaseSku": { + "kind": "func", + "params": "vcores int, isServerLess bool", + "returns": "sqlDbHyperscaleSkuType", + "description": "" + } + }, + "modules": { + "appinsights": { + "repo": "iac-module-appinsights", + "bicep_path": "modules/appInsights.bicep", + "acr_path": "bicep/modules/appinsights", + "latest_version": "2.1.0", + "param_count": 5, + "required_params": 4, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the Application Insights." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The environment type." + }, + { + "name": "WorkspaceResourceId", + "type": "string", + "required": true, + "optional": false, + "description": "WorkspaceResourceId." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "instrumentationKey", + "type": "string" + }, + { + "name": "connectionString", + "type": "string" + }, + { + "name": "appInsightsSettings", + "type": "appInsightsSettingsType" + } + ], + "imports": [ + { + "symbols": [ + "appInsightsSettingsType", + "environmentTypeEnum", + "projectNameType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "appservice": { + "repo": "iac-module-appservice", + "bicep_path": "modules/appService.bicep", + "acr_path": "bicep/modules/appservice", + "latest_version": "2.3.2", + "param_count": 26, + "required_params": 5, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the App Service." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment. This must be DEV, TEST, or PROD." + }, + { + "name": "appServicePlanID", + "type": "string", + "required": true, + "optional": false, + "description": "ID of the App Service Plan" + }, + { + "name": "appInsightsSettings", + "type": "appInsightsSettingsType", + "required": true, + "optional": false, + "description": "Application Insights Settings." + }, + { + "name": "netFrameworkVersion", + "type": "netFrameworkVersionEnum", + "required": false, + "optional": true, + "description": ".Net Framework version" + }, + { + "name": "linuxFxVersion", + "type": "appServiceLinuxFxVersionEnum", + "required": false, + "optional": false, + "default": "'DOTNETCORE|8.0'", + "description": "Linux App Framework and version" + }, + { + "name": "appCommandLine", + "type": "string", + "required": false, + "optional": false, + "default": "''", + "description": "App command line to launch." + }, + { + "name": "clientAffinityEnabled", + "type": "bool", + "required": false, + "optional": false, + "default": "false", + "description": "Turn Affinity Cookie on-off." + }, + { + "name": "publicAccessSetting", + "type": "publicNetworkAccessSettingEnum", + "required": false, + "optional": false, + "default": "'ON'", + "description": "Public access setting. This does not affect the possibility of private access." + }, + { + "name": "publicIpWhitelist", + "type": "array", + "required": false, + "optional": false, + "default": "[]", + "description": "Array of objects. Expected keys are \"ipAddressRange\" and \"description\"" + }, + { + "name": "appServiceSubnetId", + "type": "string", + "required": false, + "optional": false, + "default": "''", + "description": "Virtual Network Subnet Id for outbound internal traffic." + }, + { + "name": "additionalAppSettings", + "type": "object", + "required": false, + "optional": false, + "default": "{}", + "description": "Additional app settings for App Service" + }, + { + "name": "additionalSlotSettings", + "type": "object", + "required": false, + "optional": false, + "default": "{}", + "description": "Additional production slot app settings for App Service" + }, + { + "name": "additionalConnectionStrings", + "type": "appServiceConnectionStringType", + "required": false, + "optional": false, + "default": "{}", + "description": "Additional connectionStrings settings for App Service" + }, + { + "name": "additionalSlotConnectionStrings", + "type": "appServiceConnectionStringType", + "required": false, + "optional": false, + "default": "{}", + "description": "Additional production slot connectionStrings settings for App Service" + }, + { + "name": "enableDatadog", + "type": "bool", + "required": false, + "optional": false, + "default": "false", + "description": "Enable Datadog integration" + }, + { + "name": "datadogApiKey", + "type": "string", + "required": false, + "optional": false, + "default": "''", + "description": "Name of the key vault containing the Datadog API Key", + "secure": true + }, + { + "name": "fileMountInfo", + "type": "appServiceFileMountType", + "required": false, + "optional": false, + "default": "{}", + "description": "A list of storage account file shared to mount." + }, + { + "name": "healthCheckPath", + "type": "string", + "required": false, + "optional": true, + "description": "Path for health check endpoint" + }, + { + "name": "hostNameBindings", + "type": "string[]", + "required": false, + "optional": false, + "default": "[]", + "description": "Add custom domains for App Service" + }, + { + "name": "allowedOrigins", + "type": "array", + "required": false, + "optional": false, + "default": "[]", + "description": "Gets or sets the list of origins that should be allowed to make cross-origin" + }, + { + "name": "useDeploymentSlot", + "type": "bool", + "required": false, + "optional": false, + "default": "false", + "description": "Add deployment slot" + }, + { + "name": "runFromPackage", + "type": "bool", + "required": false, + "optional": false, + "default": "true", + "description": "Mounts the application files as readonly. May improve deployment times and cold start time, but does not allow usage of local files." + }, + { + "name": "tlsVersion", + "type": "tlsVersionEnum", + "required": false, + "optional": false, + "default": "'1.3'" + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "appServiceAppHostName", + "type": "string" + }, + { + "name": "appServiceAppName", + "type": "string" + }, + { + "name": "appServiceId", + "type": "string" + }, + { + "name": "appServiceIdentityId", + "type": "string" + }, + { + "name": "appServicePrincipal", + "type": "principalObjectType" + }, + { + "name": "appServiceSlots", + "type": "object[]" + } + ], + "imports": [ + { + "symbols": [ + "getEnvironmentParameters" + ], + "from": "br/modules:lookup/environmentparameters:latest" + }, + { + "symbols": [ + "appInsightsSettingsType", + "appServiceConnectionStringType", + "appServiceFileMountType", + "appServiceLinuxFxVersionEnum", + "appServiceSlotSettingsType", + "environmentTypeEnum", + "netFrameworkVersionEnum", + "principalObjectType", + "projectNameType", + "publicNetworkAccessSettingEnum", + "tlsVersionEnum" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "appserviceplan": { + "repo": "iac-module-appserviceplan", + "bicep_path": "modules/appServicePlan.bicep", + "acr_path": "bicep/modules/appserviceplan", + "latest_version": "2.0.0", + "param_count": 7, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the App Service Plan." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "appServicePlanSkuName", + "type": "string", + "required": false, + "optional": false, + "default": "(environmentType == 'PROD') ? 'P1V3' : 'P0V3'", + "description": "The SKU of App Service Plan." + }, + { + "name": "appServicePlanInstanceCount", + "type": "int", + "required": false, + "optional": false, + "default": "1", + "description": "The number of App Service plan instances." + }, + { + "name": "appServicePlanPlatform", + "type": "appServicePlanPlatformEnum", + "required": false, + "optional": false, + "default": "'Linux'", + "description": "Select the OS type to deploy." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "appServicePlanID", + "type": "string" + } + ], + "imports": [ + { + "symbols": [ + "appServicePlanPlatformEnum", + "environmentTypeEnum", + "projectNameType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "cdn": { + "repo": "iac-module-cdn", + "bicep_path": "modules/cdn.bicep", + "acr_path": "bicep/modules/cdn", + "latest_version": "2.0.0", + "param_count": 7, + "required_params": 5, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the project." + }, + { + "name": "originName", + "type": "string", + "required": true, + "optional": false, + "description": "Name of the origin" + }, + { + "name": "hostName", + "type": "string", + "required": true, + "optional": false, + "description": "Url of the origin" + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "CDNSku", + "type": "CDNSkuEnum", + "required": false, + "optional": false, + "default": "'Standard_Microsoft'", + "description": "The CDN SKU." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "CDNSkuEnum, environmentTypeEnum, projectNameType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "configurationstores": { + "repo": "iac-module-configurationstores", + "bicep_path": "modules/configurationStores.bicep", + "acr_path": "bicep/modules/configurationstores", + "latest_version": "2.0.0", + "param_count": 5, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Specifies the name of the App Configuration store." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment. This must be DEV, TEST, or PROD." + }, + { + "name": "configSettings", + "type": "configurationStoreValueType[]", + "required": false, + "optional": false, + "default": "[]", + "description": "The key-value and content type resources" + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "configurationStoreValueType, environmentTypeEnum, projectNameType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "environmentparameters": { + "repo": "iac-module-environmentparameters", + "bicep_path": "lookup/environmentParameters.bicep", + "acr_path": "bicep/lookup/environmentparameters", + "latest_version": "2.2.0", + "param_count": 0, + "required_params": 0, + "params": [], + "outputs": [], + "imports": [ + { + "symbols": [ + "environmentTypeEnum, privateDNSZoneInfoType, principalObjectType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "functionapp": { + "repo": "iac-module-functionapp", + "bicep_path": "modules/functionApp.bicep", + "acr_path": "bicep/modules/functionapp", + "latest_version": "2.0.1", + "param_count": 14, + "required_params": 5, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the Function App Service." + }, + { + "name": "storageName", + "type": "string", + "required": false, + "optional": false, + "default": "''", + "description": "Storage name. Alternative to default name for Function App Service." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "appServicePlanID", + "type": "string", + "required": true, + "optional": false, + "description": "ID of the App Service Plan" + }, + { + "name": "appInsightsSettings", + "type": "appInsightsSettingsType", + "required": true, + "optional": false, + "description": "Application Insights Settings." + }, + { + "name": "linuxFxVersion", + "type": "functionAppLinuxFxVersionEnum", + "required": false, + "optional": false, + "default": "'DOTNET|8.0'", + "description": "Linux App Framework and version" + }, + { + "name": "additionalFunctionAppSettings", + "type": "object", + "required": false, + "optional": false, + "default": "{}", + "description": "Additional app settings for Function App Service" + }, + { + "name": "additionalFunctionConnectionStrings", + "type": "object", + "required": false, + "optional": false, + "default": "{}", + "description": "Additional connectionStrings settings for Function App Service" + }, + { + "name": "runtime", + "type": "string", + "required": false, + "optional": false, + "default": "'node'" + }, + { + "name": "publicAccessSetting", + "type": "publicNetworkAccessSettingEnum", + "required": false, + "optional": false, + "default": "'ON'", + "description": "Public access setting. This does not affect the possibility of private access." + }, + { + "name": "publicIpWhitelist", + "type": "array", + "required": false, + "optional": false, + "default": "[]", + "description": "Array of objects. Expected keys are \"ipAddressRange\" and \"description\"" + }, + { + "name": "appServiceSubnetId", + "type": "string", + "required": false, + "optional": false, + "default": "''", + "description": "Virtual Network Subnet Id for outbound internal traffic." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "functionAppId", + "type": "string" + }, + { + "name": "functionAppIdentityId", + "type": "string" + }, + { + "name": "functionAppPrincipal", + "type": "principalObjectType" + } + ], + "imports": [ + { + "symbols": [ + "appInsightsSettingsType", + "environmentTypeEnum", + "functionAppLinuxFxVersionEnum", + "principalObjectType", + "projectNameType", + "publicNetworkAccessSettingEnum" + ], + "from": "br/modules:util/types:latest" + }, + { + "symbols": [ + "getEnvironmentParameters" + ], + "from": "br/modules:lookup/environmentparameters:latest" + } + ] + }, + "keyvault": { + "repo": "iac-module-keyvault", + "bicep_path": "modules/keyVault.bicep", + "acr_path": "bicep/modules/keyvault", + "latest_version": "2.1.0", + "param_count": 8, + "required_params": 4, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of KeyVault" + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment. This must be DEV, TEST, or PROD." + }, + { + "name": "databaseSecret", + "type": "bool", + "required": false, + "optional": false, + "default": "false", + "description": "Create a secret password for the database" + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "keyVaultSku", + "type": "string", + "required": false, + "optional": false, + "default": "'standard'", + "description": "The SKU of KeyVault." + }, + { + "name": "accessType", + "type": "'Access Policy' | 'RBAC'", + "required": false, + "optional": false, + "default": "'Access Policy'", + "description": "Whether access policies or RBAC is used to grant access to the vault." + }, + { + "name": "additionalAccess", + "type": "array", + "required": true, + "optional": false, + "description": "List of objectIds that need read access to secrets. Only applies if `accessType` is \\'Access Policy\\'" + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "databaseSecret", + "type": "string" + }, + { + "name": "keyVaultName", + "type": "string" + } + ], + "imports": [ + { + "symbols": [ + "environmentTypeEnum, projectNameType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "networkhub": { + "repo": "iac-module-networkhub", + "bicep_path": "modules/hub/dnsForwarder.bicep", + "acr_path": "bicep/modules/networkhub", + "latest_version": "2.0.0", + "param_count": 10, + "required_params": 7, + "params": [ + { + "name": "projectName", + "type": "string", + "required": true, + "optional": false, + "description": "Name of the Virtual Machine." + }, + { + "name": "environmentType", + "type": "string", + "required": true, + "optional": false + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "Location for all resources." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + }, + { + "name": "subnetId", + "type": "string", + "required": true, + "optional": false, + "description": "Subnet resource id" + }, + { + "name": "vpnAddressPrefix", + "type": "string", + "required": true, + "optional": false, + "description": "CIDR block for VPN." + }, + { + "name": "dnsServerIp", + "type": "string", + "required": true, + "optional": false, + "description": "Private IP of the DNS server." + }, + { + "name": "adminUsername", + "type": "string", + "required": false, + "optional": false, + "default": "'azureuser'", + "description": "Admin username." + }, + { + "name": "sshPublicKey", + "type": "string", + "required": true, + "optional": false, + "description": "SSH Key or password for the Virtual Machine. SSH key is recommended.", + "secure": true + }, + { + "name": "vmSize", + "type": "string", + "required": false, + "optional": false, + "default": "'Standard_B1s'", + "description": "Virtual machine size" + } + ], + "outputs": [], + "imports": [] + }, + "networkipplan": { + "repo": "iac-module-networkipplan", + "bicep_path": "lookup/networkIpPlan.bicep", + "acr_path": "bicep/lookup/networkipplan", + "latest_version": "2.0.0", + "param_count": 0, + "required_params": 0, + "params": [], + "outputs": [], + "imports": [ + { + "symbols": [ + "environmentTypeEnum" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "networks2svpn": { + "repo": "iac-module-networks2svpn", + "bicep_path": "modules/networkS2SVpn.bicep", + "acr_path": "bicep/modules/networks2svpn", + "latest_version": "2.0.0", + "param_count": 8, + "required_params": 7, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the S2S Connection." + }, + { + "name": "environmentType", + "type": "string", + "required": true, + "optional": false + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + }, + { + "name": "vpnGatewayName", + "type": "string", + "required": true, + "optional": false, + "description": "The name of the Azure Virtual Network Gateway." + }, + { + "name": "remoteGatewayAddress", + "type": "string", + "required": true, + "optional": false, + "description": "The remote gateway IP address." + }, + { + "name": "remoteNetworkAddressPrefixes", + "type": "array", + "required": true, + "optional": false, + "description": "The remote network IP address ranges." + }, + { + "name": "preSharedKey", + "type": "string", + "required": true, + "optional": false, + "description": "The pre-shared key used for authentication", + "secure": true + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "projectNameType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "networkspoke": { + "repo": "iac-module-networkspoke", + "bicep_path": "modules/spoke/networkPeerings.bicep", + "acr_path": "bicep/modules/networkspoke", + "latest_version": "2.0.0", + "param_count": 4, + "required_params": 4, + "params": [ + { + "name": "vnet1Name", + "type": "string", + "required": true, + "optional": false, + "description": "Name of source VNET. Resides in the current resource group." + }, + { + "name": "vnet2Id", + "type": "string", + "required": true, + "optional": false, + "description": "Resource id of destination VNET." + }, + { + "name": "useRemoteVirtualGateway", + "type": "bool", + "required": true, + "optional": false, + "description": "Whether to use Vitrual Network Gateways in the remote VNET. This should be true when the destination VNET is the hub. Otherwise false." + }, + { + "name": "peeringName", + "type": "string", + "required": true, + "optional": false, + "description": "The name for the VNET peering." + } + ], + "outputs": [], + "imports": [] + }, + "postgresdatabase": { + "repo": "iac-module-postgresdatabase", + "bicep_path": "modules/postgreSql.bicep", + "acr_path": "bicep/modules/postgresdatabase", + "latest_version": "1.0.0", + "param_count": 9, + "required_params": 5, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the PostgreSQL server" + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "postgreSqlAdministratorLogin", + "type": "string", + "required": true, + "optional": false, + "description": "The administrator login username for the PostgreSQL server.", + "secure": true + }, + { + "name": "postgreSqlAdministratorPassword", + "type": "string", + "required": true, + "optional": false, + "description": "The administrator login password for the PostgreSQL server.", + "secure": true + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + }, + { + "name": "postgreSqlVersion", + "type": "string", + "required": false, + "optional": false, + "default": "'16'", + "description": "PostgreSQL version. Defaults to \"16\"." + }, + { + "name": "postgreSqlstorageSizeGB", + "type": "int", + "required": false, + "optional": false, + "default": "32", + "description": "PostgreSQL server size." + }, + { + "name": "postgreSqlSku", + "type": "psqlDbSkuType", + "required": false, + "optional": false, + "default": "{", + "description": "PostgreSQL standart sku" + } + ], + "outputs": [ + { + "name": "postgreSqlServerId", + "type": "string" + }, + { + "name": "databaseServerName", + "type": "string" + }, + { + "name": "databaseName", + "type": "string" + }, + { + "name": "databaseId", + "type": "string" + } + ], + "imports": [ + { + "symbols": [ + "environmentTypeEnum", + "projectNameType", + "psqlDbSkuType" + ], + "from": "br/modules:util/types:latest" + }, + { + "symbols": [ + "principals" + ], + "from": "br/modules:lookup/rbaclookup:latest" + } + ] + }, + "privateendpoints": { + "repo": "iac-module-privateendpoints", + "bicep_path": "modules/privateEndpoints.bicep", + "acr_path": "bicep/modules/privateendpoints", + "latest_version": "2.0.0", + "param_count": 7, + "required_params": 6, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the App Service." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "privateDNSZoneInfo", + "type": "privateDNSZoneInfoType", + "required": true, + "optional": false, + "description": "The private DNS zone information. The networkhubparameters module provides this." + }, + { + "name": "serviceId", + "type": "string", + "required": true, + "optional": false, + "description": "The name of the environment. This must be DEV, TEST, or PROD." + }, + { + "name": "virtualNetworkSubnetId", + "type": "string", + "required": true, + "optional": false, + "description": "The virtualNetwork id." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "environmentTypeEnum, projectNameType, privateDNSZoneInfoType" + ], + "from": "br/modules:util/types:latest" + }, + { + "symbols": [ + "getEnvironmentParameters" + ], + "from": "br/modules:lookup/environmentparameters:latest" + } + ] + }, + "rbaclookup": { + "repo": "iac-module-rbaclookup", + "bicep_path": "lookup/rbacLookup.bicep", + "acr_path": "bicep/lookup/rbaclookup", + "latest_version": "1.0.0", + "param_count": 0, + "required_params": 0, + "params": [], + "outputs": [], + "imports": [] + }, + "redis": { + "repo": "iac-module-redis", + "bicep_path": "modules/redis.bicep", + "acr_path": "bicep/modules/redis", + "latest_version": "2.0.0", + "param_count": 12, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Specify the name of the Azure Redis Cache to create." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "redisVersion", + "type": "string", + "required": false, + "optional": false, + "default": "'latest'", + "description": "Redis version. This should be in the form major[.minor] (only major is required) or the value latest which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is latest." + }, + { + "name": "publicNetworkAccess", + "type": "string", + "required": false, + "optional": false, + "default": "'Enabled'" + }, + { + "name": "enableNonSslPort", + "type": "bool", + "required": false, + "optional": false, + "default": "false", + "description": "Specify a boolean value that indicates whether to allow access via non-SSL ports." + }, + { + "name": "redisCacheCapacity", + "type": "redisCapcityType", + "required": false, + "optional": false, + "default": "1", + "description": "Specify the size of the new Azure Redis Cache instance. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4)" + }, + { + "name": "redisCacheFamily", + "type": "redisFamilyEnum", + "required": false, + "optional": false, + "default": "'C'", + "description": "Specify the family for the sku. C = Basic/Standard, P = Premium." + }, + { + "name": "redisCacheSKU", + "type": "redisSkuEnum", + "required": false, + "optional": false, + "default": "'Standard'", + "description": "Specify the pricing tier of the new Azure Redis Cache." + }, + { + "name": "redisConfiguration", + "type": "object", + "required": false, + "optional": false, + "default": "{}", + "description": "All Redis Settings." + }, + { + "name": "rules", + "type": "array", + "required": false, + "optional": false, + "default": "[{", + "description": "Firewall Rules" + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "environmentTypeEnum", + "projectNameType", + "redisCapcityType", + "redisFamilyEnum", + "redisSkuEnum" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "resourcegroup": { + "repo": "iac-module-resourcegroup", + "bicep_path": "modules/resourceGroup.bicep", + "acr_path": "bicep/modules/resourcegroup", + "latest_version": "1.0.0", + "param_count": 4, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "string", + "required": true, + "optional": false, + "description": "Name of ResourceGroup." + }, + { + "name": "environmentType", + "type": "string", + "required": true, + "optional": false + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "deployment().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [], + "imports": [] + }, + "roleassignments": { + "repo": "iac-module-roleassignments", + "bicep_path": "modules/roleAssignments.bicep", + "acr_path": "bicep/modules/roleassignments", + "latest_version": "2.0.4", + "param_count": 1, + "required_params": 1, + "params": [ + { + "name": "assignments", + "type": "roleAssignmentParamItemType[]", + "required": true, + "optional": false, + "minLength": 1 + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "roles" + ], + "from": "br/lru:lookup/rbaclookup:latest" + }, + { + "symbols": [ + "principalObjectType" + ], + "from": "br/lru:util/types:latest" + } + ] + }, + "searchservice": { + "repo": "iac-module-searchservice", + "bicep_path": "modules/searchService.bicep", + "acr_path": "bicep/modules/searchservice", + "latest_version": "2.0.0", + "param_count": 7, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the Search Service." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment. This must be DEV, TEST, or PROD." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "sku", + "type": "searchServiceSkuEnum", + "required": false, + "optional": false, + "default": "'basic'", + "description": "The SKU of Search Service." + }, + { + "name": "replicaCount", + "type": "int", + "required": false, + "optional": false, + "default": "1", + "description": "The number of replicas in the Search Service. Default PROD = 3, other = 1. Consider increasing PROD before lauching." + }, + { + "name": "partitionCount", + "type": "int", + "required": false, + "optional": false, + "default": "1", + "description": "The number of partitions in the Search Service. Default PROD = 2, other = 1. Consider increasing PROD before lauching." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "environmentTypeEnum", + "projectNameType", + "searchServiceSkuEnum" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "servicebus": { + "repo": "iac-module-servicebus", + "bicep_path": "modules/serviceBus.bicep", + "acr_path": "bicep/modules/servicebus", + "latest_version": "2.0.1", + "param_count": 5, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the associated application." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "topics", + "type": "serviceBusTopicType[]", + "required": false, + "optional": false, + "default": "[]", + "description": "Topics" + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [], + "imports": [ + { + "symbols": [ + "environmentTypeEnum", + "projectNameType", + "serviceBusTopicType", + "serviceBusTopicSubscriptionType", + "serviceBusTopicSubscriptionRuleType" + ], + "from": "br/modules:util/types:latest" + }, + { + "symbols": [ + "getEnvironmentParameters" + ], + "from": "br/modules:lookup/environmentparameters:latest" + } + ] + }, + "sqldatabase": { + "repo": "iac-module-sqldatabase", + "bicep_path": "modules/sqlDatabase.bicep", + "acr_path": "bicep/modules/sqldatabase", + "latest_version": "2.1.0", + "param_count": 9, + "required_params": 4, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the SQL database" + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "sqlServerName", + "type": "string", + "required": true, + "optional": false, + "description": "Name of the SQL Server" + }, + { + "name": "sqlDatabaseSku", + "type": "sqlDbSkuType", + "required": false, + "optional": false, + "default": "getDTUBasedDatabaseSku(10)", + "description": "The name and tier of the SQL database SKU." + }, + { + "name": "minCapacity", + "type": "string", + "required": false, + "optional": false, + "default": "'0.5'", + "description": "The Min vCores." + }, + { + "name": "maxSize", + "type": "dataSizeType", + "required": false, + "optional": false, + "default": "{", + "description": "Data max size." + }, + { + "name": "autoPauseDelay", + "type": "int", + "required": false, + "optional": false, + "default": "-1", + "description": "Auto-pause delay in muinutes. Minimum: 60." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "connectionString", + "type": "connectionStringOutputType" + } + ], + "imports": [ + { + "symbols": [ + "appServiceConnectionStringItemType", + "environmentTypeEnum", + "projectNameType", + "sqlDbSkuType", + "getDTUBasedDatabaseSku", + "dataSizeType", + "getDataSizeBytes" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "sqlserver": { + "repo": "iac-module-sqlserver", + "bicep_path": "modules/sqlServer.bicep", + "acr_path": "bicep/modules/sqlserver", + "latest_version": "2.0.0", + "param_count": 7, + "required_params": 5, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the SQL-server" + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "overrideDefaultsForAutomaticTuning", + "type": "bool", + "required": false, + "optional": false, + "default": "true", + "description": "Whether to force ForceLastGoodPlan, CreateIndex, DropIndex. Defaults to \"true\". Disable for Umbraco" + }, + { + "name": "sqlServerAdministratorLogin", + "type": "string", + "required": true, + "optional": false, + "description": "The administrator login username for the SQL server.", + "secure": true + }, + { + "name": "sqlServerAdministratorPassword", + "type": "string", + "required": true, + "optional": false, + "secure": true + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "sqlServerId", + "type": "string" + }, + { + "name": "databaseServerName", + "type": "string" + } + ], + "imports": [ + { + "symbols": [ + "environmentTypeEnum", + "projectNameType" + ], + "from": "br/modules:util/types:latest" + } + ] + }, + "storageaccount": { + "repo": "iac-module-storageaccount", + "bicep_path": "modules/storageAccount.bicep", + "acr_path": "bicep/modules/storageaccount", + "latest_version": "2.2.0", + "param_count": 10, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "projectNameType", + "required": true, + "optional": false, + "description": "Name of the Storage Account." + }, + { + "name": "environmentType", + "type": "environmentTypeEnum", + "required": true, + "optional": false, + "description": "The name of the environment." + }, + { + "name": "containerDefinitions", + "type": "containerDefinitionType[]", + "required": false, + "optional": false, + "default": "[]", + "description": "The container definitions." + }, + { + "name": "fileShareDefinitions", + "type": "fileShareDefinitionType[]", + "required": false, + "optional": false, + "default": "[]", + "description": "The file share definitions" + }, + { + "name": "tableNames", + "type": "string[]", + "required": false, + "optional": false, + "default": "[]", + "description": "The table names." + }, + { + "name": "queueNames", + "type": "string[]", + "required": false, + "optional": false, + "default": "[]", + "description": "The queue names." + }, + { + "name": "enableBlobLogs", + "type": "bool", + "required": false, + "optional": false, + "default": "false" + }, + { + "name": "allowedBlobOrigins", + "type": "string[]", + "required": false, + "optional": false, + "default": "[]", + "description": "Specifies CORS rules for the Blob service." + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "accountKeys", + "type": "{" + }, + { + "name": "name", + "type": "string" + } + ], + "imports": [ + { + "symbols": [ + "environmentTypeEnum", + "projectNameType" + ], + "from": "br/modules:util/types:latest" + }, + { + "symbols": [ + "getEnvironmentParameters" + ], + "from": "br/modules:lookup/environmentparameters:latest" + } + ] + }, + "test-module": { + "repo": "iac-module-test-module", + "bicep_path": "modules/testModule.bicep", + "acr_path": "bicep/modules/test-module", + "latest_version": null, + "param_count": 1, + "required_params": 0, + "params": [ + { + "name": "input", + "type": "int", + "required": false, + "optional": false, + "default": "1" + } + ], + "outputs": [ + { + "name": "input", + "type": "int" + } + ], + "imports": [] + }, + "types": { + "repo": "iac-module-types", + "bicep_path": "util/types.bicep", + "acr_path": "bicep/util/types", + "latest_version": "2.5.0", + "param_count": 0, + "required_params": 0, + "params": [], + "outputs": [], + "imports": [] + }, + "virtualnetworks": { + "repo": "iac-module-virtualnetworks", + "bicep_path": "modules/virtualNetworks.bicep", + "acr_path": "bicep/modules/virtualnetworks", + "latest_version": "1.0.0", + "param_count": 4, + "required_params": 3, + "params": [ + { + "name": "projectName", + "type": "string", + "required": true, + "optional": false, + "description": "Name of virtualNetwork" + }, + { + "name": "environmentType", + "type": "string", + "required": true, + "optional": false + }, + { + "name": "location", + "type": "string", + "required": false, + "optional": false, + "default": "resourceGroup().location", + "description": "The Azure region into which the resources should be deployed." + }, + { + "name": "tags", + "type": "object", + "required": true, + "optional": false, + "description": "Tags." + } + ], + "outputs": [ + { + "name": "virtualNetworksName", + "type": "string" + }, + { + "name": "virtualNetworksId", + "type": "string" + }, + { + "name": "subnetId0", + "type": "string" + }, + { + "name": "subnetId1", + "type": "string" + } + ], + "imports": [] + } + } +} \ No newline at end of file diff --git a/scripts/push_catalogs.sh b/scripts/push_catalogs.sh index d3d45f2..b64a130 100755 --- a/scripts/push_catalogs.sh +++ b/scripts/push_catalogs.sh @@ -1,16 +1,17 @@ #!/usr/bin/env bash -# push_catalogs.sh — Push fresh catalogs to autobox iLSP volume +# push_catalogs.sh — Push fresh catalogs to autobox iLSP volume AND copy to iLSP repo for Docker bake # # Usage: # ./scripts/push_catalogs.sh # push all catalogs # ./scripts/push_catalogs.sh --no-reload # push but don't call /reload # # Catalogs: -# bicep_modules_catalog.json — from DevOpsMCP repo (sync_bicep_modules.py) -# iac_source_catalog.json — from DevOpsMCP repo (sync_iac_module_sources.py) +# bicep_modules_catalog.json — from DevOpsMCP repo (sync_bicep_modules.py) +# iac_source_catalog.json — from DevOpsMCP repo (sync_iac_module_sources.py) # pipeline_templates_catalog.json — from iLSP repo (scripts/sync_pipeline_templates.py) # # All files are written to /opt/nomad/volumes/ilsp-data/ on autobox — the host volume iLSP mounts at /data. +# iac_source_catalog.json is also copied to the iLSP repo root so it gets baked into the Docker image. set -euo pipefail @@ -49,6 +50,12 @@ if [[ ! -f "$TMPL_CATALOG" ]]; then fi echo " ✓ $(basename "$TMPL_CATALOG") ($(du -sh "$TMPL_CATALOG" | cut -f1))" +# Copy iac_source_catalog.json to iLSP repo root so it gets baked into the Docker image +echo "" +echo " → Copying iac_source_catalog.json to iLSP repo root (for Docker bake) …" +cp "$IAC_CATALOG" "$ILSP_REPO/iac_source_catalog.json" +echo " ✓ Copied to $ILSP_REPO/iac_source_catalog.json" + echo "" echo " → Copying to $AUTOBOX:$REMOTE_DIR/ …" ssh "$AUTOBOX" "mkdir -p $REMOTE_DIR" @@ -72,3 +79,4 @@ fi echo "" echo " Done. Bicep + YAML pipeline template completions updated." +echo " Note: iac_source_catalog.json was copied to repo root — commit + push to bake into next Docker image." diff --git a/scripts/smoke_test_completions.py b/scripts/smoke_test_completions.py index 1c86978..6f8c84c 100644 --- a/scripts/smoke_test_completions.py +++ b/scripts/smoke_test_completions.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Live smoke test: verifies Bicep completions from wss://ilsp.i80.dk/bicep. +"""Live smoke test: verifies Bicep and YAML completions from ilsp.i80.dk. Tests: 1. Health endpoint returns ok with bicep_modules > 0 @@ -7,6 +7,8 @@ Tests: 3. Version completion: 'br/modules:roleassignments:' → versions injected at top 4. Param completion: inside params {} of roleassignments → params injected 5. Module-path completion: 'br/modules:' → module list injected + 6. YAML: /yaml WebSocket accepts LSP initialize + 7. YAML: pipeline template completion → template list injected Usage: python3 scripts/smoke_test_completions.py [wss://ilsp.i80.dk] @@ -20,6 +22,7 @@ import aiohttp BASE_URL = sys.argv[1] if len(sys.argv) > 1 else "https://ilsp.i80.dk" WS_URL = BASE_URL.replace("https://", "wss://").replace("http://", "ws://") + "/bicep" +YAML_WS_URL = BASE_URL.replace("https://", "wss://").replace("http://", "ws://") + "/yaml" HTTP_URL = BASE_URL.replace("wss://", "https://").replace("ws://", "http://") PASS = 0 @@ -64,7 +67,10 @@ def _parse_frames(data: bytes) -> list[dict]: async def _recv_until_id(ws: aiohttp.ClientWebSocketResponse, req_id: int, timeout: float = 8.0) -> dict | None: - """Collect WebSocket frames until we find a response with the given id.""" + """Collect WebSocket frames until we find a response with the given id. + + Returns None if WS closes before the response arrives. + """ buf = b"" deadline = time.monotonic() + timeout while time.monotonic() < deadline: @@ -77,8 +83,10 @@ async def _recv_until_id(ws: aiohttp.ClientWebSocketResponse, req_id: int, timeo buf += msg.data elif msg.type == aiohttp.WSMsgType.TEXT: buf += msg.data.encode() + elif msg.type in (aiohttp.WSMsgType.CLOSE, aiohttp.WSMsgType.CLOSED, aiohttp.WSMsgType.ERROR): + break # connection closed — no response coming else: - break + continue for parsed in _parse_frames(buf): if parsed.get("id") == req_id: return parsed @@ -275,6 +283,104 @@ async def check_module_path_completion(ws: aiohttp.ClientWebSocketResponse) -> N fail("Module-path completion: empty result") +# ── YAML smoke tests ────────────────────────────────────────────────────────── + +YAML_DOC_URI = "file:///tmp/smoke_test/azure-pipelines.yml" + +# A minimal AzDO pipeline that uses @pipeline-templates — triggers YAML template context +YAML_DOC = """\ +trigger: + - main + +stages: + - stage: Deploy + jobs: + - job: DeployJob + steps: + - template: tasks/k8s/ +""" + + +async def _yaml_open_doc(ws: aiohttp.ClientWebSocketResponse) -> None: + await ws.send_bytes(_frame({ + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": YAML_DOC_URI, + "languageId": "yaml", + "version": 1, + "text": YAML_DOC, + } + }, + })) + + +async def _yaml_completion_request(ws: aiohttp.ClientWebSocketResponse, req_id: int, line: int, char: int) -> None: + await ws.send_bytes(_frame({ + "jsonrpc": "2.0", + "id": req_id, + "method": "textDocument/completion", + "params": { + "textDocument": {"uri": YAML_DOC_URI}, + "position": {"line": line, "character": char}, + }, + })) + + +async def check_yaml_initialize(ws: aiohttp.ClientWebSocketResponse) -> bool: + print("\n[6] YAML LSP initialize handshake") + await ws.send_bytes(_frame({ + "jsonrpc": "2.0", "id": 100, "method": "initialize", + "params": {"processId": None, "rootUri": None, "capabilities": {}}, + })) + resp = await _recv_until_id(ws, 100, timeout=20.0) + if resp and "result" in resp and "capabilities" in resp["result"]: + name = resp["result"].get("serverInfo", {}).get("name", "?") + ok("YAML initialize response received", f"server={name}") + await ws.send_bytes(_frame({"jsonrpc": "2.0", "method": "initialized", "params": {}})) + return True + elif resp is None: + fail("YAML: no initialize response (backend may be down or WS closed)", "check yaml-language-server in container") + return False + else: + fail("YAML: unexpected initialize response", str(resp)[:200]) + return False + + +async def check_yaml_template_completion(ws: aiohttp.ClientWebSocketResponse) -> None: + """Cursor after 'tasks/k8s/' in a template line — expect AzDO template completions.""" + print("\n[7] YAML pipeline template completion (tasks/k8s/@pipeline-templates)") + await _yaml_open_doc(ws) + + # Line 8: " - template: tasks/k8s/" → char 32 (end of line) + line, char = 8, 32 + await _yaml_completion_request(ws, 101, line, char) + resp = await _recv_until_id(ws, 101, timeout=10.0) + + if resp is None: + fail("YAML template completion: no response") + return + + items = [] + result = resp.get("result") + if isinstance(result, dict): + items = result.get("items", []) + elif isinstance(result, list): + items = result + + labels = [i.get("label", "") for i in items] + # Look for any item that contains "@pipeline-templates" or is a known AzDO template key + template_items = [l for l in labels if "@pipeline-templates" in l or "tasks/" in l] + + if template_items: + ok("YAML template completions injected", f"{len(template_items)} templates: {', '.join(template_items[:3])}") + elif items: + ok("YAML completion response received (generic)", f"{len(items)} items: {', '.join(labels[:5])}") + else: + fail("YAML template completion: empty result", str(resp.get("result"))[:200]) + + # ── Main ────────────────────────────────────────────────────────────────────── async def main() -> int: @@ -300,6 +406,17 @@ async def main() -> int: except Exception as e: fail("WebSocket connect failed", str(e)) + print(f"\nConnecting to {YAML_WS_URL} ...") + try: + async with session.ws_connect(YAML_WS_URL, timeout=aiohttp.ClientTimeout(total=20)) as ws: + yaml_ok = await check_yaml_initialize(ws) + if not yaml_ok: + fail("Skipping YAML completion tests (no initialize)", "") + else: + await check_yaml_template_completion(ws) + except Exception as e: + fail("YAML WebSocket connect failed", str(e)) + print("\n" + "═" * 50) print(f"Results: {PASS} passed, {FAIL} failed") return 0 if FAIL == 0 else 1