diff --git a/contributing/README.md b/contributing/README.md
old mode 100755
new mode 100644
diff --git a/contributing/extra.css b/contributing/extra.css
old mode 100755
new mode 100644
diff --git a/contributing/images/hashicorp-black.png b/contributing/images/hashicorp-black.png
old mode 100755
new mode 100644
diff --git a/contributing/images/hashicorp.png b/contributing/images/hashicorp.png
old mode 100755
new mode 100644
diff --git a/contributing/topics/building-the-provider.md b/contributing/topics/building-the-provider.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/debugging-the-provider.md b/contributing/topics/debugging-the-provider.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/frequently-asked-questions.md b/contributing/topics/frequently-asked-questions.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/guide-new-data-source.md b/contributing/topics/guide-new-data-source.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/guide-new-fields-to-data-source.md b/contributing/topics/guide-new-fields-to-data-source.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/guide-new-fields-to-resource.md b/contributing/topics/guide-new-fields-to-resource.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/guide-new-resource-vs-inline.md b/contributing/topics/guide-new-resource-vs-inline.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/guide-new-resource.md b/contributing/topics/guide-new-resource.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/guide-new-service-package.md b/contributing/topics/guide-new-service-package.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/guide-opening-a-pr.md b/contributing/topics/guide-opening-a-pr.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/high-level-overview.md b/contributing/topics/high-level-overview.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/maintainer-changelog.md b/contributing/topics/maintainer-changelog.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/reference-acceptance-testing.md b/contributing/topics/reference-acceptance-testing.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/reference-errors.md b/contributing/topics/reference-errors.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/reference-glossary.md b/contributing/topics/reference-glossary.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/reference-naming.md b/contributing/topics/reference-naming.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/running-the-tests.md b/contributing/topics/running-the-tests.md
old mode 100755
new mode 100644
diff --git a/contributing/topics/schema-design-considerations.md b/contributing/topics/schema-design-considerations.md
old mode 100755
new mode 100644
diff --git a/examples/api-management/api-integration-function-app/.funcignore b/examples/api-management/api-integration-function-app/.funcignore
new file mode 100644
index 000000000000..ca6d4bb09d6b
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/.funcignore
@@ -0,0 +1 @@
+terraform_configs/*
diff --git a/examples/api-management/api-integration-function-app/.gitignore b/examples/api-management/api-integration-function-app/.gitignore
new file mode 100644
index 000000000000..687f8724d60c
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/.gitignore
@@ -0,0 +1,2 @@
+.vscode/
+
diff --git a/examples/api-management/api-integration-function-app/README.md b/examples/api-management/api-integration-function-app/README.md
new file mode 100644
index 000000000000..9194f4a82f83
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/README.md
@@ -0,0 +1,92 @@
+# Sample Serverless Application on Azure: Integration Between Function App and API Management with Terraform
+
+This example demonstrates how to integrate Azure API Management with an Azure Linux Function App.
+
+# Requirements
+
+The following versions were used and confirmed to work. While other versions may also work, they have not been tested with this setup:
+
+- **Azure CLI**: Version 2.65.0
+- **Terraform CLI**: Version 1.9.7
+- **Terraform AzureRM Provider**: Version 4.0 or later
+- **Azure Functions Core Tools**: Version 4.0.6543
+- **Node.js**: Version 22.9.0
+- **Node Package Manager (NPM)**: Version 10.8.3
+
+# How to Run
+
+## Deploy Infrastructure
+
+1. Log in to your Azure account:
+ ```
+ az login
+ ```
+
+2. Retrieve the subscription ID and resource group name from your Azure environment. Update the `subscription_id` and `resource_group_name` values in the `terraform_configs/variables.tf` file accordingly. To obtain the subscription ID and resource group name, you can use:
+ ```
+ az group list
+ ```
+
+3. Navigate to the `terraform_configs` folder:
+ ```
+ cd terraform_configs
+ ```
+
+4. Initialize and deploy the Terraform configuration:
+ ```
+ terraform init
+ terraform plan -out main.tfplan
+ terraform apply main.tfplan
+ ```
+
+ **Note:** Deploying the Azure API Management instance can take up to 90 minutes. Please be patient.
+
+5. Take note of the following outputs:
+ - **`function_app_name`**: The name of your Function App, such as `myfuncappsbigwbgyzdync`, which you will need to deploy your function code.
+ - **`frontend_url`**: The frontend URL of your API Management instance.
+
+## Deploy the Code to the Function App
+
+Azure Functions Core Tools has been used to package and deploy the Function App code. While other tools can be used, Terraform currently does not fully integrate with such deployment tools, requiring the functions to be deployed separately after each Terraform deployment. Automation can simplify this process using scripts.
+
+1. Navigate to the `function_code` folder:
+ ```
+ cd ../function_code
+ ```
+
+2. Install the code dependencies:
+ ```
+ npm install
+ ```
+
+3. Deploy the code:
+ ```
+ func azure functionapp publish your_function_app_name
+ ```
+ Replace `your_function_app_name` with the `function_app_name` from the Terraform outputs.
+
+ **Note:** The `func` CLI may occasionally encounter errors, even if it reports `Deployment completed successfully`. If the `func azure functionapp publish` command does not return the `Invoke URL`, rerun the command.
+
+4. Verify the deployment:
+ - **Backend URL (`Invoke URL`)**: Send a GET request to this URL. The response should return a 200 status code with the following message:
+ ```
+ "Hello world, this is coming from Function App!"
+ ```
+
+ - **Frontend URL (`frontend_url`)**: Send a GET request to this URL. If everything is correctly configured, the frontend should return the same 200 status code and message.
+
+5. Remember: After each Terraform deployment, you may need to redeploy the Function App code.
+
+> [!NOTE]
+> For easier development and debugging, CORS restrictions have been disabled by setting `Access-Control-Allow-Origin: *` within the function code. Once the application is running successfully, ensure CORS is re-enabled and properly configured to secure the application.
+
+# Additional Notes
+
+Integration between Azure Function App and Azure API Management can be challenging and prone to various issues. Due to the limited documentation, I have automated variables to reduce potential errors. If you plan to modify the code, keep the following considerations in mind:
+
+- Ensure the `url_template` property in the `azurerm_api_management_api_operation` resource aligns with the function name specified in the `Invoke URL`. Avoid appending slashes to the `url_template` value.
+- Ensure that `https://your-function-app-name.azurewebsites.net/api` is consistently used in both the policy and the `Service URL` in the backend configuration, and ensure it overrides any existing value in the backend.
+
+---
+
+This sample aims to bridge gaps in existing documentation and provide a working, reproducible example of Azure Function App and API Management integration. Contributions and feedback are welcome!
diff --git a/examples/api-management/api-integration-function-app/function_code/.funcignore b/examples/api-management/api-integration-function-app/function_code/.funcignore
new file mode 100644
index 000000000000..df5ed316cc3b
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/function_code/.funcignore
@@ -0,0 +1,10 @@
+*.js.map
+*.ts
+.git*
+.vscode
+
+test
+getting_started.md
+node_modules/@types/
+node_modules/azure-functions-core-tools/
+node_modules/typescript/
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/function_code/.gitignore b/examples/api-management/api-integration-function-app/function_code/.gitignore
new file mode 100644
index 000000000000..8a9f3bd84c74
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/function_code/.gitignore
@@ -0,0 +1,48 @@
+bin
+obj
+csx
+.vs
+edge
+Publish
+
+*.user
+*.suo
+*.cscfg
+*.Cache
+project.lock.json
+
+/packages
+/TestResults
+
+/tools/NuGet.exe
+/App_Data
+/secrets
+/data
+.secrets
+appsettings.json
+
+
+node_modules
+dist
+
+# Local python packages
+.python_packages/
+
+# Python Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# Azurite artifacts
+__blobstorage__
+__queuestorage__
+__azurite_db*__.json
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/function_code/host.json b/examples/api-management/api-integration-function-app/function_code/host.json
new file mode 100644
index 000000000000..9df913614d99
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/function_code/host.json
@@ -0,0 +1,15 @@
+{
+ "version": "2.0",
+ "logging": {
+ "applicationInsights": {
+ "samplingSettings": {
+ "isEnabled": true,
+ "excludedTypes": "Request"
+ }
+ }
+ },
+ "extensionBundle": {
+ "id": "Microsoft.Azure.Functions.ExtensionBundle",
+ "version": "[4.*, 5.0.0)"
+ }
+}
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/function_code/local.settings.json b/examples/api-management/api-integration-function-app/function_code/local.settings.json
new file mode 100644
index 000000000000..76b99eed8f9b
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/function_code/local.settings.json
@@ -0,0 +1,7 @@
+{
+ "IsEncrypted": false,
+ "Values": {
+ "FUNCTIONS_WORKER_RUNTIME": "node"
+ }
+ }
+
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/function_code/package-lock.json b/examples/api-management/api-integration-function-app/function_code/package-lock.json
new file mode 100644
index 000000000000..0d3b776df1f4
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/function_code/package-lock.json
@@ -0,0 +1,437 @@
+{
+ "name": "function_code",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "version": "1.0.0",
+ "dependencies": {
+ "@azure/functions": "^4.0.0"
+ },
+ "devDependencies": {
+ "azure-functions-core-tools": "^4.x"
+ }
+ },
+ "node_modules/@azure/functions": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@azure/functions/-/functions-4.6.0.tgz",
+ "integrity": "sha512-vGq9jXlgrJ3KaI8bepgfpk26zVY8vFZsQukF85qjjKTAR90eFOOBNaa+mc/0ViDY2lcdrU2fL/o1pQyZUtTDsw==",
+ "license": "MIT",
+ "dependencies": {
+ "cookie": "^0.7.0",
+ "long": "^4.0.0",
+ "undici": "^5.13.0"
+ },
+ "engines": {
+ "node": ">=18.0"
+ }
+ },
+ "node_modules/@fastify/busboy": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
+ "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/azure-functions-core-tools": {
+ "version": "4.0.6280",
+ "resolved": "https://registry.npmjs.org/azure-functions-core-tools/-/azure-functions-core-tools-4.0.6280.tgz",
+ "integrity": "sha512-DVSgYNnT4POLbj/YV3FKtNdo9KT/M5Dl//slWEmVwZo1y4aJEsUApn6DtkZswut76I3S9eKGC5IaC84j5OGNaA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "hasShrinkwrap": true,
+ "license": "MIT",
+ "os": [
+ "win32",
+ "darwin",
+ "linux"
+ ],
+ "dependencies": {
+ "chalk": "3.0.0",
+ "extract-zip": "^2.0.1",
+ "https-proxy-agent": "5.0.0",
+ "progress": "2.0.3",
+ "rimraf": "4.4.1"
+ },
+ "bin": {
+ "azfun": "lib/main.js",
+ "azurefunctions": "lib/main.js",
+ "func": "lib/main.js"
+ },
+ "engines": {
+ "node": ">=6.9.1"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/@types/node": {
+ "version": "18.15.13",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz",
+ "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/@types/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "dependencies": {
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/ansi-styles": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.0.tgz",
+ "integrity": "sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg==",
+ "dev": true,
+ "dependencies": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/extract-zip": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "engines": {
+ "node": ">= 10.17.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/fd-slicer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
+ "dev": true,
+ "dependencies": {
+ "pend": "~1.2.0"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "dev": true,
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/https-proxy-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
+ "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
+ "dev": true,
+ "dependencies": {
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/pend": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "dev": true,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/azure-functions-core-tools/node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "node_modules/azure-functions-core-tools/node_modules/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
+ "dev": true,
+ "dependencies": {
+ "buffer-crc32": "~0.2.3",
+ "fd-slicer": "~1.1.0"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/long": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/undici": {
+ "version": "5.28.4",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
+ "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
+ "license": "MIT",
+ "dependencies": {
+ "@fastify/busboy": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.0"
+ }
+ }
+ }
+}
diff --git a/examples/api-management/api-integration-function-app/function_code/package.json b/examples/api-management/api-integration-function-app/function_code/package.json
new file mode 100644
index 000000000000..8ba10afa64a4
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/function_code/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "",
+ "version": "1.0.0",
+ "description": "",
+ "main": "src/functions/*.js",
+ "scripts": {
+ "start": "func start",
+ "test": "echo \"No tests yet...\""
+ },
+ "dependencies": {
+ "@azure/functions": "^4.0.0"
+ },
+ "devDependencies": {
+ "azure-functions-core-tools": "^4.x"
+ }
+}
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/function_code/src/functions/op1.js b/examples/api-management/api-integration-function-app/function_code/src/functions/op1.js
new file mode 100644
index 000000000000..39d2caee2a29
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/function_code/src/functions/op1.js
@@ -0,0 +1,23 @@
+const { app } = require('@azure/functions');
+
+app.http('FuncFromCli', {
+ methods: ['GET', 'POST'],
+ authLevel: 'anonymous',
+ handler: async (request, context) => {
+ context.log(`Http function processed request for url "${request.url}"`);
+
+ const name = request.query.get('name') || await request.text() || 'world';
+
+/* For easier development and debugging, CORS restrictions have been disabled by setting Access-Control-Allow-Origin: *.
+Once the application is running successfully, ensure CORS is re-enabled and properly configured to secure the application. */
+ return {
+ body: `Hello ${name}, this is coming from Function App!`,
+ headers: {
+ "Content-Type": "application/json",
+ "Access-Control-Allow-Origin": "*",
+ "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
+ "Access-Control-Allow-Headers": "Content-Type",
+ }
+ }
+ }
+});
diff --git a/examples/api-management/api-integration-function-app/terraform_configs/.gitignore b/examples/api-management/api-integration-function-app/terraform_configs/.gitignore
new file mode 100644
index 000000000000..436d5c6083db
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/terraform_configs/.gitignore
@@ -0,0 +1,6 @@
+.terraform/
+*.tfstate
+*.tfstate.backup
+*.tfplan
+
+functionapp.zip
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/terraform_configs/main.tf b/examples/api-management/api-integration-function-app/terraform_configs/main.tf
new file mode 100644
index 000000000000..b72b2242bc8d
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/terraform_configs/main.tf
@@ -0,0 +1,99 @@
+data "azurerm_resource_group" "rg" {
+ name = var.resource_group_name
+}
+
+resource "random_string" "random_name" {
+ length = 13
+ lower = true
+ numeric = false
+ special = false
+ upper = false
+}
+
+resource "azurerm_api_management" "example" {
+ name = "myapi${random_string.random_name.result}"
+ location = data.azurerm_resource_group.rg.location
+ resource_group_name = data.azurerm_resource_group.rg.name
+ publisher_email = "test@contoso.com"
+ publisher_name = "example publisher"
+ sku_name = "Developer_1"
+
+}
+
+resource "azurerm_api_management_api" "example" {
+ name = "example-api"
+ resource_group_name = data.azurerm_resource_group.rg.name
+ api_management_name = azurerm_api_management.example.name
+ revision = "1"
+ display_name = "Example API"
+ api_type = "http"
+ protocols = ["https"]
+ subscription_required = false
+}
+
+resource "azurerm_api_management_api_operation" "example" {
+ operation_id = "op1"
+ api_name = azurerm_api_management_api.example.name
+ api_management_name = azurerm_api_management.example.name
+ resource_group_name = data.azurerm_resource_group.rg.name
+ display_name = "GET Resource"
+ method = "GET"
+ url_template = "funcfromcli" # Ensure this value matches the Azure Function's name exactly as it appears in the invoke URL.
+ response {
+ status_code = 200
+ description = "Successful GET request"
+ }
+}
+
+resource "azurerm_api_management_api_policy" "example" {
+ api_name = azurerm_api_management_api.example.name
+ resource_group_name = data.azurerm_resource_group.rg.name
+ api_management_name = azurerm_api_management.example.name
+ xml_content = templatefile("policy.xml", {
+ base-url = "https://${azurerm_linux_function_app.example.default_hostname}/api"
+ })
+}
+
+
+resource "azurerm_api_management_backend" "example" {
+ name = "example-backend"
+ resource_group_name = data.azurerm_resource_group.rg.name
+ api_management_name = azurerm_api_management.example.name
+ protocol = "http"
+ url = "https://${azurerm_linux_function_app.example.default_hostname}/api" #make sure this ends exactly like this. just "api" without slash
+}
+
+resource "azurerm_storage_account" "example" {
+ name = random_string.random_name.result
+ resource_group_name = data.azurerm_resource_group.rg.name
+ location = data.azurerm_resource_group.rg.location
+ account_tier = "Standard"
+ account_replication_type = "LRS"
+
+}
+
+resource "azurerm_service_plan" "example" {
+ name = "example-app-service-plan"
+ resource_group_name = data.azurerm_resource_group.rg.name
+ location = data.azurerm_resource_group.rg.location
+ os_type = "Linux"
+ sku_name = "B1"
+
+}
+
+resource "azurerm_linux_function_app" "example" {
+ name = "myfuncapp${random_string.random_name.result}"
+ resource_group_name = data.azurerm_resource_group.rg.name
+ location = data.azurerm_resource_group.rg.location
+ service_plan_id = azurerm_service_plan.example.id
+
+ storage_account_name = azurerm_storage_account.example.name
+ storage_account_access_key = azurerm_storage_account.example.primary_access_key
+ site_config {
+
+ application_stack {
+ node_version = "20"
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/terraform_configs/outputs.tf b/examples/api-management/api-integration-function-app/terraform_configs/outputs.tf
new file mode 100644
index 000000000000..35dbfa69e0be
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/terraform_configs/outputs.tf
@@ -0,0 +1,15 @@
+output "resource_group_name" {
+ value = data.azurerm_resource_group.rg.name
+}
+
+output "resource_group_location" {
+ value = data.azurerm_resource_group.rg.location
+}
+
+output "function_app_name" {
+ value = azurerm_linux_function_app.example.name
+}
+
+output "frontend_url" {
+ value = "${azurerm_api_management.example.gateway_url}/${azurerm_api_management_api.example.path}${azurerm_api_management_api_operation.example.url_template}"
+}
diff --git a/examples/api-management/api-integration-function-app/terraform_configs/policy.xml b/examples/api-management/api-integration-function-app/terraform_configs/policy.xml
new file mode 100644
index 000000000000..001b2131120f
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/terraform_configs/policy.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/terraform_configs/providers.tf b/examples/api-management/api-integration-function-app/terraform_configs/providers.tf
new file mode 100644
index 000000000000..d9ee568b136b
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/terraform_configs/providers.tf
@@ -0,0 +1,18 @@
+terraform {
+ required_version = ">=1.0"
+ required_providers {
+ azurerm = {
+ source = "hashicorp/azurerm"
+ version = "~>4.0"
+ }
+ random = {
+ source = "hashicorp/random"
+ version = "~>3.0"
+ }
+ }
+}
+provider "azurerm" {
+ features {}
+ resource_provider_registrations = "none"
+ subscription_id = var.subscription_id
+}
\ No newline at end of file
diff --git a/examples/api-management/api-integration-function-app/terraform_configs/variables.tf b/examples/api-management/api-integration-function-app/terraform_configs/variables.tf
new file mode 100644
index 000000000000..014c9c12c529
--- /dev/null
+++ b/examples/api-management/api-integration-function-app/terraform_configs/variables.tf
@@ -0,0 +1,24 @@
+
+
+# these are sandbox credentials so dear hackers, don't bother ;)
+variable "subscription_id" {
+ default = "YOUR-SUBSCRIPTION-ID"
+ type = string
+}
+
+variable "resource_group_name" {
+ default = "YOUR-RESOURCEGROUP-NAME"
+ type = string
+}
+
+
+variable "sku" {
+ description = "The pricing tier of this API Management service"
+ default = "Developer"
+ type = string
+ validation {
+ condition = contains(["Developer", "Standard", "Premium"], var.sku)
+ error_message = "The sku must be one of the following: Developer, Standard, Premium."
+ }
+}
+
diff --git a/examples/arckubernetes/README.md b/examples/arckubernetes/README.md
index 17b079fcb2d9..3e53942a73e1 100644
--- a/examples/arckubernetes/README.md
+++ b/examples/arckubernetes/README.md
@@ -1,24 +1,24 @@
-## Example: Azure Arc Kubernetes
-
-This example provisions the following Resources:
-
-## Creates
-
-1. A [Resource Group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
-2. A [Virtual Network](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network)
-3. A [Subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet)
-4. A [Linux Virtual Machine](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine)
-5. An [Arc Kubernetes Cluster](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/arc_kubernetes_cluster)
-6. A [Kind Cluster](https://kind.sigs.k8s.io/) in [Linux Virtual Machine](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine) by [remote-exec Provisioner](https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec)
-7. [Azure Arc agents](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/conceptual-agent-overview) in [Kind Cluster](https://kind.sigs.k8s.io/) by [remote-exec Provisioner](https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec)
-
-~> **NOTE:** To connect an existing Kubernetes cluster to Azure Arc, the following conditions must be met:
-
-* An [Arc Kubernetes Cluster](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/arc_kubernetes_cluster) must be created in Azure
-* [Azure Arc agents](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/conceptual-agent-overview) must be installed in the Kubernetes cluster which is connected to Azure
-
-## Usage
-
-- Provide values to all variables
-- Create with `terraform apply`
-- Destroy all with `terraform destroy`
+## Example: Azure Arc Kubernetes
+
+This example provisions the following Resources:
+
+## Creates
+
+1. A [Resource Group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
+2. A [Virtual Network](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network)
+3. A [Subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet)
+4. A [Linux Virtual Machine](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine)
+5. An [Arc Kubernetes Cluster](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/arc_kubernetes_cluster)
+6. A [Kind Cluster](https://kind.sigs.k8s.io/) in [Linux Virtual Machine](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine) by [remote-exec Provisioner](https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec)
+7. [Azure Arc agents](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/conceptual-agent-overview) in [Kind Cluster](https://kind.sigs.k8s.io/) by [remote-exec Provisioner](https://developer.hashicorp.com/terraform/language/resources/provisioners/remote-exec)
+
+~> **NOTE:** To connect an existing Kubernetes cluster to Azure Arc, the following conditions must be met:
+
+* An [Arc Kubernetes Cluster](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/arc_kubernetes_cluster) must be created in Azure
+* [Azure Arc agents](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/conceptual-agent-overview) must be installed in the Kubernetes cluster which is connected to Azure
+
+## Usage
+
+- Provide values to all variables
+- Create with `terraform apply`
+- Destroy all with `terraform destroy`
diff --git a/examples/arckubernetes/testdata/install_agent.py b/examples/arckubernetes/testdata/install_agent.py
index feb2dccc40e7..05cb657bf4b4 100644
--- a/examples/arckubernetes/testdata/install_agent.py
+++ b/examples/arckubernetes/testdata/install_agent.py
@@ -1,251 +1,251 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-import argparse
-import json
-import logging as logger
-import os
-import platform
-import shutil
-import stat
-import subprocess
-import time
-import urllib
-from subprocess import PIPE, Popen
-from urllib import request
-
-HELM_VERSION = 'v3.6.3'
-HELM_STORAGE_URL = "https://k8connecthelm.azureedge.net"
-Pre_Onboarding_Helm_Charts_Folder_Name = 'PreOnboardingChecksCharts'
-
-
-def get_helm_registry(config_dp_endpoint):
- # Setting uri
- get_chart_location_url = "{}/{}/GetLatestHelmPackagePath?api-version=2019-11-01-preview".format(
- config_dp_endpoint, 'azure-arc-k8sagents')
-
- try:
- response = urllib.request.urlopen(
- request.Request(get_chart_location_url, method="POST"))
- except Exception as e:
- raise Exception("Failed to get helm registry." + str(e))
-
- try:
- return json.load(response).get('repositoryPath')
- except Exception as e:
- raise Exception(
- "Error while fetching helm chart registry path from JSON response: " + str(e))
-
-
-def pull_helm_chart(registry_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents', retry_count=5, retry_delay=3):
- cmd_helm_chart_pull = [helm_client_location,
- "chart", "pull", registry_path]
- if kube_config:
- cmd_helm_chart_pull.extend(["--kubeconfig", kube_config])
- if kube_context:
- cmd_helm_chart_pull.extend(["--kube-context", kube_context])
- for i in range(retry_count):
- response_helm_chart_pull = subprocess.Popen(
- cmd_helm_chart_pull, stdout=PIPE, stderr=PIPE)
- _, error_helm_chart_pull = response_helm_chart_pull.communicate()
- if response_helm_chart_pull.returncode != 0:
- if i == retry_count - 1:
- raise Exception("Unable to pull {} helm chart from the registry '{}': ".format(
- chart_name, registry_path) + error_helm_chart_pull.decode("ascii"))
- time.sleep(retry_delay)
- else:
- break
-
-
-def export_helm_chart(registry_path, chart_export_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents'):
- cmd_helm_chart_export = [helm_client_location, "chart",
- "export", registry_path, "--destination", chart_export_path]
- if kube_config:
- cmd_helm_chart_export.extend(["--kubeconfig", kube_config])
- if kube_context:
- cmd_helm_chart_export.extend(["--kube-context", kube_context])
- response_helm_chart_export = subprocess.Popen(
- cmd_helm_chart_export, stdout=PIPE, stderr=PIPE)
- _, error_helm_chart_export = response_helm_chart_export.communicate()
- if response_helm_chart_export.returncode != 0:
- raise Exception("Unable to export {} helm chart from the registry '{}': ".format(
- chart_name, registry_path) + error_helm_chart_export.decode("ascii"))
-
-
-def get_chart_path(registry_path, kube_config, kube_context, helm_client_location, chart_folder_name='AzureArcCharts', chart_name='azure-arc-k8sagents'):
- # Pulling helm chart from registry
- os.environ['HELM_EXPERIMENTAL_OCI'] = '1'
- pull_helm_chart(registry_path, kube_config, kube_context,
- helm_client_location, chart_name)
-
- # Exporting helm chart after cleanup
- chart_export_path = os.path.join(
- os.path.expanduser('~'), '.azure', chart_folder_name)
- try:
- if os.path.isdir(chart_export_path):
- shutil.rmtree(chart_export_path)
- except:
- logger.warning("Unable to cleanup the {} already present on the machine. In case of failure, please cleanup the directory '{}' and try again.".format(
- chart_folder_name, chart_export_path))
-
- export_helm_chart(registry_path, chart_export_path, kube_config,
- kube_context, helm_client_location, chart_name)
-
- # Returning helm chart path
- helm_chart_path = os.path.join(chart_export_path, chart_name)
- if chart_folder_name == Pre_Onboarding_Helm_Charts_Folder_Name:
- chart_path = helm_chart_path
- else:
- chart_path = os.getenv('HELMCHART') if os.getenv(
- 'HELMCHART') else helm_chart_path
-
- return chart_path
-
-
-def install_helm_client():
- # Fetch system related info
- operating_system = platform.system().lower()
- platform.machine()
-
- # Set helm binary download & install locations
- if (operating_system == 'windows'):
- download_location_string = f'.azure\\helm\\{HELM_VERSION}\\helm-{HELM_VERSION}-{operating_system}-amd64.zip'
- install_location_string = f'.azure\\helm\\{HELM_VERSION}\\{operating_system}-amd64\\helm.exe'
- requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.zip'
- elif (operating_system == 'linux' or operating_system == 'darwin'):
- download_location_string = f'.azure/helm/{HELM_VERSION}/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
- install_location_string = f'.azure/helm/{HELM_VERSION}/{operating_system}-amd64/helm'
- requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
- else:
- raise Exception(
- f'The {operating_system} platform is not currently supported for installing helm client.')
-
- download_location = os.path.expanduser(
- os.path.join('~', download_location_string))
- download_dir = os.path.dirname(download_location)
- install_location = os.path.expanduser(
- os.path.join('~', install_location_string))
-
- # Download compressed halm binary if not already present
- if not os.path.isfile(download_location):
- # Creating the helm folder if it doesnt exist
- if not os.path.exists(download_dir):
- try:
- os.makedirs(download_dir)
- except Exception as e:
- raise Exception("Failed to create helm directory." + str(e))
-
- # Downloading compressed helm client executable
- logger.warning(
- "Downloading helm client for first time. This can take few minutes...")
- try:
- response = urllib.request.urlopen(requestUri)
- except Exception as e:
- raise Exception("Failed to download helm client." + str(e))
-
- responseContent = response.read()
- response.close()
-
- # Creating the compressed helm binaries
- try:
- with open(download_location, 'wb') as f:
- f.write(responseContent)
- except Exception as e:
- raise Exception("Failed to create helm executable." + str(e))
-
- # Extract compressed helm binary
- if not os.path.isfile(install_location):
- try:
- shutil.unpack_archive(download_location, download_dir)
- os.chmod(install_location, os.stat(
- install_location).st_mode | stat.S_IXUSR)
- except Exception as e:
- raise Exception("Failed to extract helm executable." + str(e))
-
- return install_location
-
-
-def helm_install_release(chart_path, subscription_id, kubernetes_distro, kubernetes_infra, resource_group_name, cluster_name,
- location, onboarding_tenant_id, private_key_pem,
- no_wait, cloud_name, helm_client_location, onboarding_timeout="600"):
- cmd_helm_install = [helm_client_location, "upgrade", "--install", "azure-arc", chart_path,
- "--set", "global.subscriptionId={}".format(
- subscription_id),
- "--set", "global.kubernetesDistro={}".format(
- kubernetes_distro),
- "--set", "global.kubernetesInfra={}".format(
- kubernetes_infra),
- "--set", "global.resourceGroupName={}".format(
- resource_group_name),
- "--set", "global.resourceName={}".format(cluster_name),
- "--set", "global.location={}".format(location),
- "--set", "global.tenantId={}".format(
- onboarding_tenant_id),
- "--set", "global.onboardingPrivateKey={}".format(
- private_key_pem),
- "--set", "systemDefaultValues.spnOnboarding=false",
- "--set", "global.azureEnvironment={}".format(
- cloud_name),
- "--set", "systemDefaultValues.clusterconnect-agent.enabled=true",
- "--namespace", "{}".format("azure-arc-release"),
- "--create-namespace",
- "--output", "json"]
-
- if not no_wait:
- # Change --timeout format for helm client to understand
- onboarding_timeout = onboarding_timeout + "s"
- cmd_helm_install.extend(
- ["--wait", "--timeout", "{}".format(onboarding_timeout)])
- response_helm_install = Popen(cmd_helm_install, stdout=PIPE, stderr=PIPE)
- _, error_helm_install = response_helm_install.communicate()
- if response_helm_install.returncode != 0:
- raise Exception("Unable to install helm release" + error_helm_install.decode("ascii"))
-
-
-def install_agent():
- parser = argparse.ArgumentParser(
- description='Install Connected Cluster Agent')
- parser.add_argument('--subscriptionId', type=str, required=True)
- parser.add_argument('--resourceGroupName', type=str, required=True)
- parser.add_argument('--clusterName', type=str, required=True)
- parser.add_argument('--location', type=str, required=True)
- parser.add_argument('--tenantId', type=str, required=True)
- parser.add_argument('--privatePem', type=str, required=True)
-
- try:
- args = parser.parse_args()
- except Exception as e:
- raise Exception("Failed to parse arguments." + str(e))
-
- try:
- with open(args.privatePem, "r") as f:
- privateKey = f.read()
- except Exception as e:
- raise Exception("Failed to get private key." + str(e))
-
- # Install helm client
- helm_client_location = install_helm_client()
-
- # Retrieving Helm chart OCI Artifact location
- registry_path = get_helm_registry("https://westeurope.dp.kubernetesconfiguration.azure.com")
-
- # Get helm chart path
- chart_path = get_chart_path(
- registry_path, None, None, helm_client_location)
-
- helm_install_release(chart_path,
- args.subscriptionId,
- "generic",
- "generic",
- args.resourceGroupName,
- args.clusterName,
- args.location,
- args.tenantId,
- privateKey,
- False,
- "AZUREPUBLICCLOUD",
- helm_client_location)
-
-
-if __name__ == "__main__":
- install_agent()
+import argparse
+import json
+import logging as logger
+import os
+import platform
+import shutil
+import stat
+import subprocess
+import time
+import urllib
+from subprocess import PIPE, Popen
+from urllib import request
+
+HELM_VERSION = 'v3.6.3'
+HELM_STORAGE_URL = "https://k8connecthelm.azureedge.net"
+Pre_Onboarding_Helm_Charts_Folder_Name = 'PreOnboardingChecksCharts'
+
+
+def get_helm_registry(config_dp_endpoint):
+ # Setting uri
+ get_chart_location_url = "{}/{}/GetLatestHelmPackagePath?api-version=2019-11-01-preview".format(
+ config_dp_endpoint, 'azure-arc-k8sagents')
+
+ try:
+ response = urllib.request.urlopen(
+ request.Request(get_chart_location_url, method="POST"))
+ except Exception as e:
+ raise Exception("Failed to get helm registry." + str(e))
+
+ try:
+ return json.load(response).get('repositoryPath')
+ except Exception as e:
+ raise Exception(
+ "Error while fetching helm chart registry path from JSON response: " + str(e))
+
+
+def pull_helm_chart(registry_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents', retry_count=5, retry_delay=3):
+ cmd_helm_chart_pull = [helm_client_location,
+ "chart", "pull", registry_path]
+ if kube_config:
+ cmd_helm_chart_pull.extend(["--kubeconfig", kube_config])
+ if kube_context:
+ cmd_helm_chart_pull.extend(["--kube-context", kube_context])
+ for i in range(retry_count):
+ response_helm_chart_pull = subprocess.Popen(
+ cmd_helm_chart_pull, stdout=PIPE, stderr=PIPE)
+ _, error_helm_chart_pull = response_helm_chart_pull.communicate()
+ if response_helm_chart_pull.returncode != 0:
+ if i == retry_count - 1:
+ raise Exception("Unable to pull {} helm chart from the registry '{}': ".format(
+ chart_name, registry_path) + error_helm_chart_pull.decode("ascii"))
+ time.sleep(retry_delay)
+ else:
+ break
+
+
+def export_helm_chart(registry_path, chart_export_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents'):
+ cmd_helm_chart_export = [helm_client_location, "chart",
+ "export", registry_path, "--destination", chart_export_path]
+ if kube_config:
+ cmd_helm_chart_export.extend(["--kubeconfig", kube_config])
+ if kube_context:
+ cmd_helm_chart_export.extend(["--kube-context", kube_context])
+ response_helm_chart_export = subprocess.Popen(
+ cmd_helm_chart_export, stdout=PIPE, stderr=PIPE)
+ _, error_helm_chart_export = response_helm_chart_export.communicate()
+ if response_helm_chart_export.returncode != 0:
+ raise Exception("Unable to export {} helm chart from the registry '{}': ".format(
+ chart_name, registry_path) + error_helm_chart_export.decode("ascii"))
+
+
+def get_chart_path(registry_path, kube_config, kube_context, helm_client_location, chart_folder_name='AzureArcCharts', chart_name='azure-arc-k8sagents'):
+ # Pulling helm chart from registry
+ os.environ['HELM_EXPERIMENTAL_OCI'] = '1'
+ pull_helm_chart(registry_path, kube_config, kube_context,
+ helm_client_location, chart_name)
+
+ # Exporting helm chart after cleanup
+ chart_export_path = os.path.join(
+ os.path.expanduser('~'), '.azure', chart_folder_name)
+ try:
+ if os.path.isdir(chart_export_path):
+ shutil.rmtree(chart_export_path)
+ except:
+ logger.warning("Unable to cleanup the {} already present on the machine. In case of failure, please cleanup the directory '{}' and try again.".format(
+ chart_folder_name, chart_export_path))
+
+ export_helm_chart(registry_path, chart_export_path, kube_config,
+ kube_context, helm_client_location, chart_name)
+
+ # Returning helm chart path
+ helm_chart_path = os.path.join(chart_export_path, chart_name)
+ if chart_folder_name == Pre_Onboarding_Helm_Charts_Folder_Name:
+ chart_path = helm_chart_path
+ else:
+ chart_path = os.getenv('HELMCHART') if os.getenv(
+ 'HELMCHART') else helm_chart_path
+
+ return chart_path
+
+
+def install_helm_client():
+ # Fetch system related info
+ operating_system = platform.system().lower()
+ platform.machine()
+
+ # Set helm binary download & install locations
+ if (operating_system == 'windows'):
+ download_location_string = f'.azure\\helm\\{HELM_VERSION}\\helm-{HELM_VERSION}-{operating_system}-amd64.zip'
+ install_location_string = f'.azure\\helm\\{HELM_VERSION}\\{operating_system}-amd64\\helm.exe'
+ requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.zip'
+ elif (operating_system == 'linux' or operating_system == 'darwin'):
+ download_location_string = f'.azure/helm/{HELM_VERSION}/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
+ install_location_string = f'.azure/helm/{HELM_VERSION}/{operating_system}-amd64/helm'
+ requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
+ else:
+ raise Exception(
+ f'The {operating_system} platform is not currently supported for installing helm client.')
+
+ download_location = os.path.expanduser(
+ os.path.join('~', download_location_string))
+ download_dir = os.path.dirname(download_location)
+ install_location = os.path.expanduser(
+ os.path.join('~', install_location_string))
+
+ # Download compressed halm binary if not already present
+ if not os.path.isfile(download_location):
+ # Creating the helm folder if it doesnt exist
+ if not os.path.exists(download_dir):
+ try:
+ os.makedirs(download_dir)
+ except Exception as e:
+ raise Exception("Failed to create helm directory." + str(e))
+
+ # Downloading compressed helm client executable
+ logger.warning(
+ "Downloading helm client for first time. This can take few minutes...")
+ try:
+ response = urllib.request.urlopen(requestUri)
+ except Exception as e:
+ raise Exception("Failed to download helm client." + str(e))
+
+ responseContent = response.read()
+ response.close()
+
+ # Creating the compressed helm binaries
+ try:
+ with open(download_location, 'wb') as f:
+ f.write(responseContent)
+ except Exception as e:
+ raise Exception("Failed to create helm executable." + str(e))
+
+ # Extract compressed helm binary
+ if not os.path.isfile(install_location):
+ try:
+ shutil.unpack_archive(download_location, download_dir)
+ os.chmod(install_location, os.stat(
+ install_location).st_mode | stat.S_IXUSR)
+ except Exception as e:
+ raise Exception("Failed to extract helm executable." + str(e))
+
+ return install_location
+
+
+def helm_install_release(chart_path, subscription_id, kubernetes_distro, kubernetes_infra, resource_group_name, cluster_name,
+ location, onboarding_tenant_id, private_key_pem,
+ no_wait, cloud_name, helm_client_location, onboarding_timeout="600"):
+ cmd_helm_install = [helm_client_location, "upgrade", "--install", "azure-arc", chart_path,
+ "--set", "global.subscriptionId={}".format(
+ subscription_id),
+ "--set", "global.kubernetesDistro={}".format(
+ kubernetes_distro),
+ "--set", "global.kubernetesInfra={}".format(
+ kubernetes_infra),
+ "--set", "global.resourceGroupName={}".format(
+ resource_group_name),
+ "--set", "global.resourceName={}".format(cluster_name),
+ "--set", "global.location={}".format(location),
+ "--set", "global.tenantId={}".format(
+ onboarding_tenant_id),
+ "--set", "global.onboardingPrivateKey={}".format(
+ private_key_pem),
+ "--set", "systemDefaultValues.spnOnboarding=false",
+ "--set", "global.azureEnvironment={}".format(
+ cloud_name),
+ "--set", "systemDefaultValues.clusterconnect-agent.enabled=true",
+ "--namespace", "{}".format("azure-arc-release"),
+ "--create-namespace",
+ "--output", "json"]
+
+ if not no_wait:
+ # Change --timeout format for helm client to understand
+ onboarding_timeout = onboarding_timeout + "s"
+ cmd_helm_install.extend(
+ ["--wait", "--timeout", "{}".format(onboarding_timeout)])
+ response_helm_install = Popen(cmd_helm_install, stdout=PIPE, stderr=PIPE)
+ _, error_helm_install = response_helm_install.communicate()
+ if response_helm_install.returncode != 0:
+ raise Exception("Unable to install helm release" + error_helm_install.decode("ascii"))
+
+
+def install_agent():
+ parser = argparse.ArgumentParser(
+ description='Install Connected Cluster Agent')
+ parser.add_argument('--subscriptionId', type=str, required=True)
+ parser.add_argument('--resourceGroupName', type=str, required=True)
+ parser.add_argument('--clusterName', type=str, required=True)
+ parser.add_argument('--location', type=str, required=True)
+ parser.add_argument('--tenantId', type=str, required=True)
+ parser.add_argument('--privatePem', type=str, required=True)
+
+ try:
+ args = parser.parse_args()
+ except Exception as e:
+ raise Exception("Failed to parse arguments." + str(e))
+
+ try:
+ with open(args.privatePem, "r") as f:
+ privateKey = f.read()
+ except Exception as e:
+ raise Exception("Failed to get private key." + str(e))
+
+ # Install helm client
+ helm_client_location = install_helm_client()
+
+ # Retrieving Helm chart OCI Artifact location
+ registry_path = get_helm_registry("https://westeurope.dp.kubernetesconfiguration.azure.com")
+
+ # Get helm chart path
+ chart_path = get_chart_path(
+ registry_path, None, None, helm_client_location)
+
+ helm_install_release(chart_path,
+ args.subscriptionId,
+ "generic",
+ "generic",
+ args.resourceGroupName,
+ args.clusterName,
+ args.location,
+ args.tenantId,
+ privateKey,
+ False,
+ "AZUREPUBLICCLOUD",
+ helm_client_location)
+
+
+if __name__ == "__main__":
+ install_agent()
diff --git a/examples/arckubernetes/testdata/kind.yaml b/examples/arckubernetes/testdata/kind.yaml
index 04b3342955c7..2de5b96fd039 100644
--- a/examples/arckubernetes/testdata/kind.yaml
+++ b/examples/arckubernetes/testdata/kind.yaml
@@ -1,23 +1,23 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-nodes:
-- role: control-plane
- kubeadmConfigPatches:
- - |
- kind: InitConfiguration
- nodeRegistration:
- kubeletExtraArgs:
- node-labels: "ingress-ready=true"
- # port forward 80 on the host to 80 on this node
- extraPortMappings:
- - containerPort: 81
- hostPort: 81
- listenAddress: "127.0.0.1"
- protocol: TCP
- - containerPort: 443
- hostPort: 443
- listenAddress: "127.0.0.1"
- protocol: TCP
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+ kubeadmConfigPatches:
+ - |
+ kind: InitConfiguration
+ nodeRegistration:
+ kubeletExtraArgs:
+ node-labels: "ingress-ready=true"
+ # port forward 80 on the host to 80 on this node
+ extraPortMappings:
+ - containerPort: 81
+ hostPort: 81
+ listenAddress: "127.0.0.1"
+ protocol: TCP
+ - containerPort: 443
+ hostPort: 443
+ listenAddress: "127.0.0.1"
+ protocol: TCP
diff --git a/examples/arckubernetes/variables.tf b/examples/arckubernetes/variables.tf
index bada20a5a093..4cdadacc35ab 100644
--- a/examples/arckubernetes/variables.tf
+++ b/examples/arckubernetes/variables.tf
@@ -1,29 +1,29 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-variable "prefix" {
- description = "The prefix used for all resources in this example"
-}
-
-variable "location" {
- description = "The Azure location where all resources in this example should be created"
-}
-
-variable "user_name" {
- description = "The user name of virtual machine"
-}
-
-variable "password" {
- description = "The password of virtual machine"
- sensitive = true
-}
-
-# Refer to https://github.com/Azure/azure-cli-extensions/blob/ed3f463e9ef7980eff196504a8bb29800c123eba/src/connectedk8s/azext_connectedk8s/custom.py#L365 to generate the private key
-variable "private_pem" {
- description = "The private certificate used by the agent"
-}
-
-# Refer to https://github.com/Azure/azure-cli-extensions/blob/ed3f463e9ef7980eff196504a8bb29800c123eba/src/connectedk8s/azext_connectedk8s/custom.py#L359 to generate the public key
-variable "public_key" {
- description = "The base64-encoded public certificate used by the agent"
+variable "prefix" {
+ description = "The prefix used for all resources in this example"
+}
+
+variable "location" {
+ description = "The Azure location where all resources in this example should be created"
+}
+
+variable "user_name" {
+ description = "The user name of virtual machine"
+}
+
+variable "password" {
+ description = "The password of virtual machine"
+ sensitive = true
+}
+
+# Refer to https://github.com/Azure/azure-cli-extensions/blob/ed3f463e9ef7980eff196504a8bb29800c123eba/src/connectedk8s/azext_connectedk8s/custom.py#L365 to generate the private key
+variable "private_pem" {
+ description = "The private certificate used by the agent"
+}
+
+# Refer to https://github.com/Azure/azure-cli-extensions/blob/ed3f463e9ef7980eff196504a8bb29800c123eba/src/connectedk8s/azext_connectedk8s/custom.py#L359 to generate the public key
+variable "public_key" {
+ description = "The base64-encoded public certificate used by the agent"
}
\ No newline at end of file
diff --git a/examples/data-factory/shared-self-hosted/variables.tf b/examples/data-factory/shared-self-hosted/variables.tf
index 0a7254b9a8c2..44b9bae61662 100644
--- a/examples/data-factory/shared-self-hosted/variables.tf
+++ b/examples/data-factory/shared-self-hosted/variables.tf
@@ -1,10 +1,10 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-variable "location" {
- description = "The Azure location where all resources in this example should be created."
-}
-
-variable "prefix" {
- description = "The prefix used for all resources used by this NetApp Account"
-}
+variable "location" {
+ description = "The Azure location where all resources in this example should be created."
+}
+
+variable "prefix" {
+ description = "The prefix used for all resources used by this NetApp Account"
+}
diff --git a/examples/mssql/mssqlvm/variables.tf b/examples/mssql/mssqlvm/variables.tf
index 0a7254b9a8c2..44b9bae61662 100644
--- a/examples/mssql/mssqlvm/variables.tf
+++ b/examples/mssql/mssqlvm/variables.tf
@@ -1,10 +1,10 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-variable "location" {
- description = "The Azure location where all resources in this example should be created."
-}
-
-variable "prefix" {
- description = "The prefix used for all resources used by this NetApp Account"
-}
+variable "location" {
+ description = "The Azure location where all resources in this example should be created."
+}
+
+variable "prefix" {
+ description = "The prefix used for all resources used by this NetApp Account"
+}
diff --git a/examples/netapp/nfsv3_volume_cmk_userassigned/main.tf b/examples/netapp/nfsv3_volume_cmk_userassigned/main.tf
old mode 100755
new mode 100644
diff --git a/examples/netapp/nfsv3_volume_cmk_userassigned/variables.tf b/examples/netapp/nfsv3_volume_cmk_userassigned/variables.tf
old mode 100755
new mode 100644
diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf
old mode 100755
new mode 100644
index bff4aadd06f3..6664f0e2f50d
--- a/examples/netapp/nfsv3_volume_with_backup_policy/main.tf
+++ b/examples/netapp/nfsv3_volume_with_backup_policy/main.tf
@@ -1,103 +1,103 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-provider "azurerm" {
- features {
- netapp {
- prevent_volume_destruction = false
- delete_backups_on_backup_vault_destroy = true
- }
- }
-}
-
-resource "azurerm_resource_group" "example" {
- name = "${var.prefix}-resources"
- location = var.location
-}
-
-resource "azurerm_virtual_network" "example" {
- name = "${var.prefix}-virtualnetwork"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- address_space = ["10.0.0.0/16"]
-}
-
-resource "azurerm_subnet" "example" {
- name = "${var.prefix}-subnet"
- resource_group_name = azurerm_resource_group.example.name
- virtual_network_name = azurerm_virtual_network.example.name
- address_prefixes = ["10.0.2.0/24"]
-
- delegation {
- name = "testdelegation"
-
- service_delegation {
- name = "Microsoft.Netapp/volumes"
- actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
- }
- }
-}
-
-resource "azurerm_netapp_account" "example" {
- name = "${var.prefix}-netappaccount"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
-}
-
-resource "azurerm_netapp_backup_vault" "example" {
- name = "${var.prefix}-netappbackupvault"
- resource_group_name = azurerm_resource_group.example.name
- location = azurerm_resource_group.example.location
- account_name = azurerm_netapp_account.example.name
-}
-
-resource "azurerm_netapp_backup_policy" "example" {
- name = "${var.prefix}-netappbackuppolicy"
- resource_group_name = azurerm_resource_group.example.name
- location = azurerm_resource_group.example.location
- account_name = azurerm_netapp_account.example.name
- daily_backups_to_keep = 2
- weekly_backups_to_keep = 2
- monthly_backups_to_keep = 2
- enabled = true
-}
-
-resource "azurerm_netapp_pool" "example" {
- name = "${var.prefix}-netapppool"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- service_level = "Standard"
- size_in_tb = 4
-}
-
-resource "azurerm_netapp_volume" "example" {
- lifecycle {
- prevent_destroy = true
- }
-
- name = "${var.prefix}-netappvolume"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- pool_name = azurerm_netapp_pool.example.name
- volume_path = "${var.prefix}-netappvolume"
- service_level = "Standard"
- protocols = ["NFSv3"]
- network_features = "Basic"
- subnet_id = azurerm_subnet.example.id
- storage_quota_in_gb = 100
-
- data_protection_backup_policy {
- backup_vault_id = azurerm_netapp_backup_vault.example.id
- backup_policy_id = azurerm_netapp_backup_policy.example.id
- policy_enabled = true
- }
-
- export_policy_rule {
- rule_index = 1
- allowed_clients = ["0.0.0.0/0"]
- protocols_enabled = ["NFSv3"]
- unix_read_write = true
- }
-}
+provider "azurerm" {
+ features {
+ netapp {
+ prevent_volume_destruction = false
+ delete_backups_on_backup_vault_destroy = true
+ }
+ }
+}
+
+resource "azurerm_resource_group" "example" {
+ name = "${var.prefix}-resources"
+ location = var.location
+}
+
+resource "azurerm_virtual_network" "example" {
+ name = "${var.prefix}-virtualnetwork"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ address_space = ["10.0.0.0/16"]
+}
+
+resource "azurerm_subnet" "example" {
+ name = "${var.prefix}-subnet"
+ resource_group_name = azurerm_resource_group.example.name
+ virtual_network_name = azurerm_virtual_network.example.name
+ address_prefixes = ["10.0.2.0/24"]
+
+ delegation {
+ name = "testdelegation"
+
+ service_delegation {
+ name = "Microsoft.Netapp/volumes"
+ actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
+ }
+ }
+}
+
+resource "azurerm_netapp_account" "example" {
+ name = "${var.prefix}-netappaccount"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+}
+
+resource "azurerm_netapp_backup_vault" "example" {
+ name = "${var.prefix}-netappbackupvault"
+ resource_group_name = azurerm_resource_group.example.name
+ location = azurerm_resource_group.example.location
+ account_name = azurerm_netapp_account.example.name
+}
+
+resource "azurerm_netapp_backup_policy" "example" {
+ name = "${var.prefix}-netappbackuppolicy"
+ resource_group_name = azurerm_resource_group.example.name
+ location = azurerm_resource_group.example.location
+ account_name = azurerm_netapp_account.example.name
+ daily_backups_to_keep = 2
+ weekly_backups_to_keep = 2
+ monthly_backups_to_keep = 2
+ enabled = true
+}
+
+resource "azurerm_netapp_pool" "example" {
+ name = "${var.prefix}-netapppool"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ service_level = "Standard"
+ size_in_tb = 4
+}
+
+resource "azurerm_netapp_volume" "example" {
+ lifecycle {
+ prevent_destroy = true
+ }
+
+ name = "${var.prefix}-netappvolume"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ pool_name = azurerm_netapp_pool.example.name
+ volume_path = "${var.prefix}-netappvolume"
+ service_level = "Standard"
+ protocols = ["NFSv3"]
+ network_features = "Basic"
+ subnet_id = azurerm_subnet.example.id
+ storage_quota_in_gb = 100
+
+ data_protection_backup_policy {
+ backup_vault_id = azurerm_netapp_backup_vault.example.id
+ backup_policy_id = azurerm_netapp_backup_policy.example.id
+ policy_enabled = true
+ }
+
+ export_policy_rule {
+ rule_index = 1
+ allowed_clients = ["0.0.0.0/0"]
+ protocols_enabled = ["NFSv3"]
+ unix_read_write = true
+ }
+}
diff --git a/examples/netapp/nfsv3_volume_with_backup_policy/variables.tf b/examples/netapp/nfsv3_volume_with_backup_policy/variables.tf
old mode 100755
new mode 100644
diff --git a/examples/netapp/nfsv3_volume_with_snapshot_policy/README.md b/examples/netapp/nfsv3_volume_with_snapshot_policy/README.md
index 9965f2660ca4..d917f1d92639 100644
--- a/examples/netapp/nfsv3_volume_with_snapshot_policy/README.md
+++ b/examples/netapp/nfsv3_volume_with_snapshot_policy/README.md
@@ -1,5 +1,5 @@
-## Example: NetApp Files Snapshot Policy
-
-This example shows how to create an Azure NetApp Snapshot Policy and how to apply it to a volume.
-
+## Example: NetApp Files Snapshot Policy
+
+This example shows how to create an Azure NetApp Snapshot Policy and how to apply it to a volume.
+
For more information, please refer to [How Azure NetApp Files snapshots work](https://docs.microsoft.com/en-us/azure/azure-netapp-files/snapshots-introduction) and [Manage snapshot policies in Azure NetApp Files](https://docs.microsoft.com/en-us/azure/azure-netapp-files/snapshots-manage-policy).
\ No newline at end of file
diff --git a/examples/netapp/nfsv3_volume_with_snapshot_policy/main.tf b/examples/netapp/nfsv3_volume_with_snapshot_policy/main.tf
old mode 100755
new mode 100644
index dde004f5e13e..4d94907a3c32
--- a/examples/netapp/nfsv3_volume_with_snapshot_policy/main.tf
+++ b/examples/netapp/nfsv3_volume_with_snapshot_policy/main.tf
@@ -1,104 +1,104 @@
-# Copyright (c) HashiCorp, Inc.
-# SPDX-License-Identifier: MPL-2.0
-
-provider "azurerm" {
- features {}
-}
-
-resource "azurerm_resource_group" "example" {
- name = "${var.prefix}-resources"
- location = var.location
-}
-
-resource "azurerm_virtual_network" "example" {
- name = "${var.prefix}-virtualnetwork"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- address_space = ["10.0.0.0/16"]
-}
-
-resource "azurerm_subnet" "example" {
- name = "${var.prefix}-subnet"
- resource_group_name = azurerm_resource_group.example.name
- virtual_network_name = azurerm_virtual_network.example.name
- address_prefixes = ["10.0.2.0/24"]
-
- delegation {
- name = "testdelegation"
-
- service_delegation {
- name = "Microsoft.Netapp/volumes"
- actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
- }
- }
-}
-
-resource "azurerm_netapp_account" "example" {
- name = "${var.prefix}-netappaccount"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
-}
-
-resource "azurerm_netapp_snapshot_policy" "example" {
- name = "${var.prefix}-snapshotpolicy"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- enabled = true
-
- hourly_schedule {
- snapshots_to_keep = 4
- minute = 15
- }
-
- daily_schedule {
- snapshots_to_keep = 2
- hour = 20
- minute = 15
- }
-
- weekly_schedule {
- snapshots_to_keep = 1
- days_of_week = ["Monday", "Friday"]
- hour = 23
- minute = 0
- }
-
- monthly_schedule {
- snapshots_to_keep = 1
- days_of_month = [1, 15, 20, 30]
- hour = 5
- minute = 45
- }
-}
-
-resource "azurerm_netapp_pool" "example" {
- name = "${var.prefix}-netapppool"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- service_level = "Standard"
- size_in_tb = 4
-}
-
-resource "azurerm_netapp_volume" "example" {
- lifecycle {
- prevent_destroy = true
- }
-
- name = "${var.prefix}-netappvolume"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- pool_name = azurerm_netapp_pool.example.name
- volume_path = "${var.prefix}-netappvolume"
- service_level = "Standard"
- protocols = ["NFSv3"]
- subnet_id = azurerm_subnet.example.id
- storage_quota_in_gb = 100
- security_style = "unix"
-
- data_protection_snapshot_policy {
- snapshot_policy_id = azurerm_netapp_snapshot_policy.example.id
- }
-}
+# Copyright (c) HashiCorp, Inc.
+# SPDX-License-Identifier: MPL-2.0
+
+provider "azurerm" {
+ features {}
+}
+
+resource "azurerm_resource_group" "example" {
+ name = "${var.prefix}-resources"
+ location = var.location
+}
+
+resource "azurerm_virtual_network" "example" {
+ name = "${var.prefix}-virtualnetwork"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ address_space = ["10.0.0.0/16"]
+}
+
+resource "azurerm_subnet" "example" {
+ name = "${var.prefix}-subnet"
+ resource_group_name = azurerm_resource_group.example.name
+ virtual_network_name = azurerm_virtual_network.example.name
+ address_prefixes = ["10.0.2.0/24"]
+
+ delegation {
+ name = "testdelegation"
+
+ service_delegation {
+ name = "Microsoft.Netapp/volumes"
+ actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
+ }
+ }
+}
+
+resource "azurerm_netapp_account" "example" {
+ name = "${var.prefix}-netappaccount"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+}
+
+resource "azurerm_netapp_snapshot_policy" "example" {
+ name = "${var.prefix}-snapshotpolicy"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ enabled = true
+
+ hourly_schedule {
+ snapshots_to_keep = 4
+ minute = 15
+ }
+
+ daily_schedule {
+ snapshots_to_keep = 2
+ hour = 20
+ minute = 15
+ }
+
+ weekly_schedule {
+ snapshots_to_keep = 1
+ days_of_week = ["Monday", "Friday"]
+ hour = 23
+ minute = 0
+ }
+
+ monthly_schedule {
+ snapshots_to_keep = 1
+ days_of_month = [1, 15, 20, 30]
+ hour = 5
+ minute = 45
+ }
+}
+
+resource "azurerm_netapp_pool" "example" {
+ name = "${var.prefix}-netapppool"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ service_level = "Standard"
+ size_in_tb = 4
+}
+
+resource "azurerm_netapp_volume" "example" {
+ lifecycle {
+ prevent_destroy = true
+ }
+
+ name = "${var.prefix}-netappvolume"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ pool_name = azurerm_netapp_pool.example.name
+ volume_path = "${var.prefix}-netappvolume"
+ service_level = "Standard"
+ protocols = ["NFSv3"]
+ subnet_id = azurerm_subnet.example.id
+ storage_quota_in_gb = 100
+ security_style = "unix"
+
+ data_protection_snapshot_policy {
+ snapshot_policy_id = azurerm_netapp_snapshot_policy.example.id
+ }
+}
diff --git a/examples/netapp/nfsv3_volume_with_snapshot_policy/variables.tf b/examples/netapp/nfsv3_volume_with_snapshot_policy/variables.tf
old mode 100755
new mode 100644
diff --git a/examples/netapp/volume_crr/README.md b/examples/netapp/volume_crr/README.md
index aa01f7c7f180..2607ce5db99a 100644
--- a/examples/netapp/volume_crr/README.md
+++ b/examples/netapp/volume_crr/README.md
@@ -1,5 +1,5 @@
-## Example: NetApp Files Volume with Cross-Region Replication data protection enabled
-
-This example shows how to create an Azure NetApp Files Volume with data protection enabled through cross-region replication feature.
-
+## Example: NetApp Files Volume with Cross-Region Replication data protection enabled
+
+This example shows how to create an Azure NetApp Files Volume with data protection enabled through cross-region replication feature.
+
For more information, please refer to [Cross-region replication of Azure NetApp Files volumes](https://docs.microsoft.com/en-us/azure/azure-netapp-files/cross-region-replication-introduction).
\ No newline at end of file
diff --git a/examples/netapp/volume_crr/main.tf b/examples/netapp/volume_crr/main.tf
index b1ed77eb2fed..fda17fc41e32 100644
--- a/examples/netapp/volume_crr/main.tf
+++ b/examples/netapp/volume_crr/main.tf
@@ -1,146 +1,146 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-provider "azurerm" {
- features {}
-}
-
-resource "azurerm_resource_group" "example" {
- name = "${var.prefix}-resources"
- location = var.location
-}
-
-resource "azurerm_virtual_network" "example_primary" {
- name = "${var.prefix}-virtualnetwork-primary"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- address_space = ["10.0.0.0/16"]
-}
-
-resource "azurerm_subnet" "example_primary" {
- name = "${var.prefix}-subnet"
- resource_group_name = azurerm_resource_group.example.name
- virtual_network_name = azurerm_virtual_network.example_primary.name
- address_prefixes = ["10.0.2.0/24"]
-
- delegation {
- name = "testdelegation"
-
- service_delegation {
- name = "Microsoft.Netapp/volumes"
- actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
- }
- }
-}
-
-resource "azurerm_virtual_network" "example_secondary" {
- name = "${var.prefix}-virtualnetwork-secondary"
- location = var.alt_location
- resource_group_name = azurerm_resource_group.example.name
- address_space = ["10.1.0.0/16"]
-}
-
-resource "azurerm_subnet" "example_secondary" {
- name = "${var.prefix}-subnet"
- resource_group_name = azurerm_resource_group.example.name
- virtual_network_name = azurerm_virtual_network.example_secondary.name
- address_prefixes = ["10.1.2.0/24"]
-
- delegation {
- name = "testdelegation"
-
- service_delegation {
- name = "Microsoft.Netapp/volumes"
- actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
- }
- }
-}
-
-resource "azurerm_netapp_account" "example_primary" {
- name = "${var.prefix}-netappaccount-primary"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
-}
-
-resource "azurerm_netapp_account" "example_secondary" {
- name = "${var.prefix}-netappaccount-secondary"
- location = var.alt_location
- resource_group_name = azurerm_resource_group.example.name
-}
-
-resource "azurerm_netapp_pool" "example_primary" {
- name = "${var.prefix}-netapppool-primary"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example_primary.name
- service_level = "Premium"
- size_in_tb = 4
-}
-
-resource "azurerm_netapp_pool" "example_secondary" {
- name = "${var.prefix}-netapppool-secondary"
- location = var.alt_location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example_secondary.name
- service_level = "Standard"
- size_in_tb = 4
-}
-
-resource "azurerm_netapp_volume" "example_primary" {
- lifecycle {
- prevent_destroy = true
- }
-
- name = "${var.prefix}-netappvolume-primary"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example_primary.name
- pool_name = azurerm_netapp_pool.example_primary.name
- volume_path = "${var.prefix}-netappvolume"
- service_level = "Standard"
- protocols = ["NFSv3"]
- subnet_id = azurerm_subnet.example_primary.id
- storage_quota_in_gb = 100
-
- export_policy_rule {
- rule_index = 1
- allowed_clients = ["0.0.0.0/0"]
- protocols_enabled = ["NFSv3"]
- unix_read_only = false
- unix_read_write = true
- }
-}
-
-resource "azurerm_netapp_volume" "example_secondary" {
- lifecycle {
- prevent_destroy = true
- }
-
- depends_on = [azurerm_netapp_volume.example_primary]
-
- name = "${var.prefix}-netappvolume-secondary"
- location = var.alt_location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example_secondary.name
- pool_name = azurerm_netapp_pool.example_secondary.name
- volume_path = "${var.prefix}-netappvolume-secondary"
- service_level = "Standard"
- protocols = ["NFSv3"]
- subnet_id = azurerm_subnet.example_secondary.id
- storage_quota_in_gb = 100
-
- export_policy_rule {
- rule_index = 1
- allowed_clients = ["0.0.0.0/0"]
- protocols_enabled = ["NFSv3"]
- unix_read_only = false
- unix_read_write = true
- }
-
- data_protection_replication {
- endpoint_type = "dst"
- remote_volume_location = azurerm_resource_group.example.location
- remote_volume_resource_id = azurerm_netapp_volume.example_primary.id
- replication_frequency = "10minutes"
- }
-}
+provider "azurerm" {
+ features {}
+}
+
+resource "azurerm_resource_group" "example" {
+ name = "${var.prefix}-resources"
+ location = var.location
+}
+
+resource "azurerm_virtual_network" "example_primary" {
+ name = "${var.prefix}-virtualnetwork-primary"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ address_space = ["10.0.0.0/16"]
+}
+
+resource "azurerm_subnet" "example_primary" {
+ name = "${var.prefix}-subnet"
+ resource_group_name = azurerm_resource_group.example.name
+ virtual_network_name = azurerm_virtual_network.example_primary.name
+ address_prefixes = ["10.0.2.0/24"]
+
+ delegation {
+ name = "testdelegation"
+
+ service_delegation {
+ name = "Microsoft.Netapp/volumes"
+ actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
+ }
+ }
+}
+
+resource "azurerm_virtual_network" "example_secondary" {
+ name = "${var.prefix}-virtualnetwork-secondary"
+ location = var.alt_location
+ resource_group_name = azurerm_resource_group.example.name
+ address_space = ["10.1.0.0/16"]
+}
+
+resource "azurerm_subnet" "example_secondary" {
+ name = "${var.prefix}-subnet"
+ resource_group_name = azurerm_resource_group.example.name
+ virtual_network_name = azurerm_virtual_network.example_secondary.name
+ address_prefixes = ["10.1.2.0/24"]
+
+ delegation {
+ name = "testdelegation"
+
+ service_delegation {
+ name = "Microsoft.Netapp/volumes"
+ actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
+ }
+ }
+}
+
+resource "azurerm_netapp_account" "example_primary" {
+ name = "${var.prefix}-netappaccount-primary"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+}
+
+resource "azurerm_netapp_account" "example_secondary" {
+ name = "${var.prefix}-netappaccount-secondary"
+ location = var.alt_location
+ resource_group_name = azurerm_resource_group.example.name
+}
+
+resource "azurerm_netapp_pool" "example_primary" {
+ name = "${var.prefix}-netapppool-primary"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example_primary.name
+ service_level = "Premium"
+ size_in_tb = 4
+}
+
+resource "azurerm_netapp_pool" "example_secondary" {
+ name = "${var.prefix}-netapppool-secondary"
+ location = var.alt_location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example_secondary.name
+ service_level = "Standard"
+ size_in_tb = 4
+}
+
+resource "azurerm_netapp_volume" "example_primary" {
+ lifecycle {
+ prevent_destroy = true
+ }
+
+ name = "${var.prefix}-netappvolume-primary"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example_primary.name
+ pool_name = azurerm_netapp_pool.example_primary.name
+ volume_path = "${var.prefix}-netappvolume"
+ service_level = "Standard"
+ protocols = ["NFSv3"]
+ subnet_id = azurerm_subnet.example_primary.id
+ storage_quota_in_gb = 100
+
+ export_policy_rule {
+ rule_index = 1
+ allowed_clients = ["0.0.0.0/0"]
+ protocols_enabled = ["NFSv3"]
+ unix_read_only = false
+ unix_read_write = true
+ }
+}
+
+resource "azurerm_netapp_volume" "example_secondary" {
+ lifecycle {
+ prevent_destroy = true
+ }
+
+ depends_on = [azurerm_netapp_volume.example_primary]
+
+ name = "${var.prefix}-netappvolume-secondary"
+ location = var.alt_location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example_secondary.name
+ pool_name = azurerm_netapp_pool.example_secondary.name
+ volume_path = "${var.prefix}-netappvolume-secondary"
+ service_level = "Standard"
+ protocols = ["NFSv3"]
+ subnet_id = azurerm_subnet.example_secondary.id
+ storage_quota_in_gb = 100
+
+ export_policy_rule {
+ rule_index = 1
+ allowed_clients = ["0.0.0.0/0"]
+ protocols_enabled = ["NFSv3"]
+ unix_read_only = false
+ unix_read_write = true
+ }
+
+ data_protection_replication {
+ endpoint_type = "dst"
+ remote_volume_location = azurerm_resource_group.example.location
+ remote_volume_resource_id = azurerm_netapp_volume.example_primary.id
+ replication_frequency = "10minutes"
+ }
+}
diff --git a/examples/netapp/volume_from_snapshot/README.md b/examples/netapp/volume_from_snapshot/README.md
index db917c29d693..a45b0525c725 100644
--- a/examples/netapp/volume_from_snapshot/README.md
+++ b/examples/netapp/volume_from_snapshot/README.md
@@ -1,5 +1,5 @@
-## Example: NetApp Files Volume creation from Snapshot
-
-This example shows how to create an Azure NetApp Files Volume from a Snapshot.
-
+## Example: NetApp Files Volume creation from Snapshot
+
+This example shows how to create an Azure NetApp Files Volume from a Snapshot.
+
For more information, please refer to [How Azure NetApp Files snapshots work](https://docs.microsoft.com/en-us/azure/azure-netapp-files/snapshots-introduction).
\ No newline at end of file
diff --git a/examples/netapp/volume_from_snapshot/main.tf b/examples/netapp/volume_from_snapshot/main.tf
index 1121fd178aea..4c4556e35949 100644
--- a/examples/netapp/volume_from_snapshot/main.tf
+++ b/examples/netapp/volume_from_snapshot/main.tf
@@ -1,99 +1,99 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-provider "azurerm" {
- features {}
-}
-
-resource "azurerm_resource_group" "example" {
- name = "${var.prefix}-resources"
- location = var.location
-}
-
-resource "azurerm_virtual_network" "example" {
- name = "${var.prefix}-virtualnetwork"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- address_space = ["10.0.0.0/16"]
-}
-
-resource "azurerm_subnet" "example" {
- name = "${var.prefix}-subnet"
- resource_group_name = azurerm_resource_group.example.name
- virtual_network_name = azurerm_virtual_network.example.name
- address_prefixes = ["10.0.2.0/24"]
-
- delegation {
- name = "testdelegation"
-
- service_delegation {
- name = "Microsoft.Netapp/volumes"
- actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
- }
- }
-}
-
-resource "azurerm_netapp_account" "example" {
- name = "${var.prefix}-netappaccount"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
-}
-
-resource "azurerm_netapp_pool" "example" {
- name = "${var.prefix}-netapppool"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- service_level = "Standard"
- size_in_tb = 4
-}
-
-resource "azurerm_netapp_volume" "example" {
- name = "${var.prefix}-netappvolume"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- pool_name = azurerm_netapp_pool.example.name
- volume_path = "${var.prefix}-netappvolume"
- service_level = "Standard"
- protocols = ["NFSv3"]
- subnet_id = azurerm_subnet.example.id
- storage_quota_in_gb = 100
-
- export_policy_rule {
- rule_index = 1
- allowed_clients = ["0.0.0.0/0"]
- protocols_enabled = ["NFSv3"]
- unix_read_write = true
- }
-}
-
-resource "azurerm_netapp_snapshot" "example" {
- name = "${var.prefix}-netappsnapshot"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- pool_name = azurerm_netapp_pool.example.name
- volume_name = azurerm_netapp_volume.example.name
-}
-
-resource "azurerm_netapp_volume" "example-snapshot" {
- name = "${var.prefix}-netappvolume-snapshot"
- location = azurerm_resource_group.example.location
- resource_group_name = azurerm_resource_group.example.name
- account_name = azurerm_netapp_account.example.name
- pool_name = azurerm_netapp_pool.example.name
- volume_path = "${var.prefix}-netappvolume-snapshot"
- service_level = "Standard"
- protocols = ["NFSv3"]
- subnet_id = azurerm_subnet.example.id
- storage_quota_in_gb = 100
- create_from_snapshot_resource_id = azurerm_netapp_snapshot.example.id
-
- export_policy_rule {
- rule_index = 1
- allowed_clients = ["0.0.0.0/0"]
- protocols_enabled = ["NFSv3"]
- unix_read_write = true
- }
-}
+provider "azurerm" {
+ features {}
+}
+
+resource "azurerm_resource_group" "example" {
+ name = "${var.prefix}-resources"
+ location = var.location
+}
+
+resource "azurerm_virtual_network" "example" {
+ name = "${var.prefix}-virtualnetwork"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ address_space = ["10.0.0.0/16"]
+}
+
+resource "azurerm_subnet" "example" {
+ name = "${var.prefix}-subnet"
+ resource_group_name = azurerm_resource_group.example.name
+ virtual_network_name = azurerm_virtual_network.example.name
+ address_prefixes = ["10.0.2.0/24"]
+
+ delegation {
+ name = "testdelegation"
+
+ service_delegation {
+ name = "Microsoft.Netapp/volumes"
+ actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
+ }
+ }
+}
+
+resource "azurerm_netapp_account" "example" {
+ name = "${var.prefix}-netappaccount"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+}
+
+resource "azurerm_netapp_pool" "example" {
+ name = "${var.prefix}-netapppool"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ service_level = "Standard"
+ size_in_tb = 4
+}
+
+resource "azurerm_netapp_volume" "example" {
+ name = "${var.prefix}-netappvolume"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ pool_name = azurerm_netapp_pool.example.name
+ volume_path = "${var.prefix}-netappvolume"
+ service_level = "Standard"
+ protocols = ["NFSv3"]
+ subnet_id = azurerm_subnet.example.id
+ storage_quota_in_gb = 100
+
+ export_policy_rule {
+ rule_index = 1
+ allowed_clients = ["0.0.0.0/0"]
+ protocols_enabled = ["NFSv3"]
+ unix_read_write = true
+ }
+}
+
+resource "azurerm_netapp_snapshot" "example" {
+ name = "${var.prefix}-netappsnapshot"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ pool_name = azurerm_netapp_pool.example.name
+ volume_name = azurerm_netapp_volume.example.name
+}
+
+resource "azurerm_netapp_volume" "example-snapshot" {
+ name = "${var.prefix}-netappvolume-snapshot"
+ location = azurerm_resource_group.example.location
+ resource_group_name = azurerm_resource_group.example.name
+ account_name = azurerm_netapp_account.example.name
+ pool_name = azurerm_netapp_pool.example.name
+ volume_path = "${var.prefix}-netappvolume-snapshot"
+ service_level = "Standard"
+ protocols = ["NFSv3"]
+ subnet_id = azurerm_subnet.example.id
+ storage_quota_in_gb = 100
+ create_from_snapshot_resource_id = azurerm_netapp_snapshot.example.id
+
+ export_policy_rule {
+ rule_index = 1
+ allowed_clients = ["0.0.0.0/0"]
+ protocols_enabled = ["NFSv3"]
+ unix_read_write = true
+ }
+}
diff --git a/examples/sql-azure/failover_group/variables.tf b/examples/sql-azure/failover_group/variables.tf
index 3e2beb12eed8..855129e44aad 100644
--- a/examples/sql-azure/failover_group/variables.tf
+++ b/examples/sql-azure/failover_group/variables.tf
@@ -1,14 +1,14 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-variable "location" {
- description = "The Azure location where the primary resources in this example should be created."
-}
-
-variable "location_alt" {
- description = "The Azure location where the secondary resources in this example should be created."
-}
-
-variable "prefix" {
- description = "The prefix used for all resources created as a part of this example"
-}
+variable "location" {
+ description = "The Azure location where the primary resources in this example should be created."
+}
+
+variable "location_alt" {
+ description = "The Azure location where the secondary resources in this example should be created."
+}
+
+variable "prefix" {
+ description = "The prefix used for all resources created as a part of this example"
+}
diff --git a/examples/sql-azure/sql_auditing_eventhub/variables.tf b/examples/sql-azure/sql_auditing_eventhub/variables.tf
index 4b04df9d18cd..ad85266de792 100644
--- a/examples/sql-azure/sql_auditing_eventhub/variables.tf
+++ b/examples/sql-azure/sql_auditing_eventhub/variables.tf
@@ -1,10 +1,10 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-variable "location" {
- description = "The Azure location where the primary resources in this example should be created."
-}
-
-variable "prefix" {
- description = "The prefix used for all resources created as a part of this example"
-}
+variable "location" {
+ description = "The Azure location where the primary resources in this example should be created."
+}
+
+variable "prefix" {
+ description = "The prefix used for all resources created as a part of this example"
+}
diff --git a/examples/sql-azure/sql_server_auditing_log_analytics/variables.tf b/examples/sql-azure/sql_server_auditing_log_analytics/variables.tf
index 4b04df9d18cd..ad85266de792 100644
--- a/examples/sql-azure/sql_server_auditing_log_analytics/variables.tf
+++ b/examples/sql-azure/sql_server_auditing_log_analytics/variables.tf
@@ -1,10 +1,10 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-variable "location" {
- description = "The Azure location where the primary resources in this example should be created."
-}
-
-variable "prefix" {
- description = "The prefix used for all resources created as a part of this example"
-}
+variable "location" {
+ description = "The Azure location where the primary resources in this example should be created."
+}
+
+variable "prefix" {
+ description = "The prefix used for all resources created as a part of this example"
+}
diff --git a/examples/virtual-machines/virtual_machine/2-vms-loadbalancer-lbrules/deploy.ci.sh b/examples/virtual-machines/virtual_machine/2-vms-loadbalancer-lbrules/deploy.ci.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/2-vms-loadbalancer-lbrules/deploy.mac.sh b/examples/virtual-machines/virtual_machine/2-vms-loadbalancer-lbrules/deploy.mac.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/encrypt-running-linux-vm/deploy.ci.sh b/examples/virtual-machines/virtual_machine/encrypt-running-linux-vm/deploy.ci.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/encrypt-running-linux-vm/deploy.mac.sh b/examples/virtual-machines/virtual_machine/encrypt-running-linux-vm/deploy.mac.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/openshift-origin/deploy.ci.sh b/examples/virtual-machines/virtual_machine/openshift-origin/deploy.ci.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/openshift-origin/deploy.mac.sh b/examples/virtual-machines/virtual_machine/openshift-origin/deploy.mac.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/spark-and-cassandra-on-centos/deploy.ci.sh b/examples/virtual-machines/virtual_machine/spark-and-cassandra-on-centos/deploy.ci.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/spark-and-cassandra-on-centos/deploy.mac.sh b/examples/virtual-machines/virtual_machine/spark-and-cassandra-on-centos/deploy.mac.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/unmanaged-disks/from-existing-storage-account/deploy.ci.sh b/examples/virtual-machines/virtual_machine/unmanaged-disks/from-existing-storage-account/deploy.ci.sh
old mode 100755
new mode 100644
diff --git a/examples/virtual-machines/virtual_machine/unmanaged-disks/from-existing-storage-account/deploy.mac.sh b/examples/virtual-machines/virtual_machine/unmanaged-disks/from-existing-storage-account/deploy.mac.sh
old mode 100755
new mode 100644
diff --git a/internal/services/apimanagement/testdata/api_management_api_openapi.yaml b/internal/services/apimanagement/testdata/api_management_api_openapi.yaml
index a1ad16311bfb..4c4a8919bf78 100644
--- a/internal/services/apimanagement/testdata/api_management_api_openapi.yaml
+++ b/internal/services/apimanagement/testdata/api_management_api_openapi.yaml
@@ -1,36 +1,36 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-openapi: 3.0.0
-info:
- title: api1
- description: api
- version: 1.0.0
-servers:
- - url: "https://terraform.com/test/v1/api1"
- description: test
-paths:
- /default:
- post:
- operationId: default
- summary: Default
- description: Default operation
- responses:
- "200":
- description: Accepted
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/response"
-components:
- schemas:
- response:
- type: object
- properties:
- status:
- type: string
- example: success
- securitySchemes:
- basicAuth:
- type: http
+openapi: 3.0.0
+info:
+ title: api1
+ description: api
+ version: 1.0.0
+servers:
+ - url: "https://terraform.com/test/v1/api1"
+ description: test
+paths:
+ /default:
+ post:
+ operationId: default
+ summary: Default
+ description: Default operation
+ responses:
+ "200":
+ description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/response"
+components:
+ schemas:
+ response:
+ type: object
+ properties:
+ status:
+ type: string
+ example: success
+ securitySchemes:
+ basicAuth:
+ type: http
scheme: basic
\ No newline at end of file
diff --git a/internal/services/apimanagement/testdata/api_management_api_test.cer b/internal/services/apimanagement/testdata/api_management_api_test.cer
old mode 100755
new mode 100644
diff --git a/internal/services/apimanagement/testdata/api_management_testdata.sh b/internal/services/apimanagement/testdata/api_management_testdata.sh
old mode 100755
new mode 100644
diff --git a/internal/services/appservice/testdata/run.csx b/internal/services/appservice/testdata/run.csx
index 7ad38c1c369d..b3ba58f7c5e8 100644
--- a/internal/services/appservice/testdata/run.csx
+++ b/internal/services/appservice/testdata/run.csx
@@ -1,23 +1,23 @@
-#r "Newtonsoft.Json"
-
-using System.Net;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Primitives;
-using Newtonsoft.Json;
-
-public static async Task Run(HttpRequest req, ILogger log)
-{
- log.LogInformation("C# HTTP trigger function processed a request.");
-
- string name = req.Query["name"];
-
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- dynamic data = JsonConvert.DeserializeObject(requestBody);
- name = name ?? data?.name;
-
- string responseMessage = string.IsNullOrEmpty(name)
- ? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
- : $"Hello, {name}. This HTTP triggered function executed successfully.";
-
- return new OkObjectResult(responseMessage);
-}
+#r "Newtonsoft.Json"
+
+using System.Net;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Primitives;
+using Newtonsoft.Json;
+
+public static async Task Run(HttpRequest req, ILogger log)
+{
+ log.LogInformation("C# HTTP trigger function processed a request.");
+
+ string name = req.Query["name"];
+
+ string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
+ dynamic data = JsonConvert.DeserializeObject(requestBody);
+ name = name ?? data?.name;
+
+ string responseMessage = string.IsNullOrEmpty(name)
+ ? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
+ : $"Hello, {name}. This HTTP triggered function executed successfully.";
+
+ return new OkObjectResult(responseMessage);
+}
diff --git a/internal/services/arckubernetes/testdata/install_agent.py b/internal/services/arckubernetes/testdata/install_agent.py
index feb2dccc40e7..05cb657bf4b4 100644
--- a/internal/services/arckubernetes/testdata/install_agent.py
+++ b/internal/services/arckubernetes/testdata/install_agent.py
@@ -1,251 +1,251 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-import argparse
-import json
-import logging as logger
-import os
-import platform
-import shutil
-import stat
-import subprocess
-import time
-import urllib
-from subprocess import PIPE, Popen
-from urllib import request
-
-HELM_VERSION = 'v3.6.3'
-HELM_STORAGE_URL = "https://k8connecthelm.azureedge.net"
-Pre_Onboarding_Helm_Charts_Folder_Name = 'PreOnboardingChecksCharts'
-
-
-def get_helm_registry(config_dp_endpoint):
- # Setting uri
- get_chart_location_url = "{}/{}/GetLatestHelmPackagePath?api-version=2019-11-01-preview".format(
- config_dp_endpoint, 'azure-arc-k8sagents')
-
- try:
- response = urllib.request.urlopen(
- request.Request(get_chart_location_url, method="POST"))
- except Exception as e:
- raise Exception("Failed to get helm registry." + str(e))
-
- try:
- return json.load(response).get('repositoryPath')
- except Exception as e:
- raise Exception(
- "Error while fetching helm chart registry path from JSON response: " + str(e))
-
-
-def pull_helm_chart(registry_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents', retry_count=5, retry_delay=3):
- cmd_helm_chart_pull = [helm_client_location,
- "chart", "pull", registry_path]
- if kube_config:
- cmd_helm_chart_pull.extend(["--kubeconfig", kube_config])
- if kube_context:
- cmd_helm_chart_pull.extend(["--kube-context", kube_context])
- for i in range(retry_count):
- response_helm_chart_pull = subprocess.Popen(
- cmd_helm_chart_pull, stdout=PIPE, stderr=PIPE)
- _, error_helm_chart_pull = response_helm_chart_pull.communicate()
- if response_helm_chart_pull.returncode != 0:
- if i == retry_count - 1:
- raise Exception("Unable to pull {} helm chart from the registry '{}': ".format(
- chart_name, registry_path) + error_helm_chart_pull.decode("ascii"))
- time.sleep(retry_delay)
- else:
- break
-
-
-def export_helm_chart(registry_path, chart_export_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents'):
- cmd_helm_chart_export = [helm_client_location, "chart",
- "export", registry_path, "--destination", chart_export_path]
- if kube_config:
- cmd_helm_chart_export.extend(["--kubeconfig", kube_config])
- if kube_context:
- cmd_helm_chart_export.extend(["--kube-context", kube_context])
- response_helm_chart_export = subprocess.Popen(
- cmd_helm_chart_export, stdout=PIPE, stderr=PIPE)
- _, error_helm_chart_export = response_helm_chart_export.communicate()
- if response_helm_chart_export.returncode != 0:
- raise Exception("Unable to export {} helm chart from the registry '{}': ".format(
- chart_name, registry_path) + error_helm_chart_export.decode("ascii"))
-
-
-def get_chart_path(registry_path, kube_config, kube_context, helm_client_location, chart_folder_name='AzureArcCharts', chart_name='azure-arc-k8sagents'):
- # Pulling helm chart from registry
- os.environ['HELM_EXPERIMENTAL_OCI'] = '1'
- pull_helm_chart(registry_path, kube_config, kube_context,
- helm_client_location, chart_name)
-
- # Exporting helm chart after cleanup
- chart_export_path = os.path.join(
- os.path.expanduser('~'), '.azure', chart_folder_name)
- try:
- if os.path.isdir(chart_export_path):
- shutil.rmtree(chart_export_path)
- except:
- logger.warning("Unable to cleanup the {} already present on the machine. In case of failure, please cleanup the directory '{}' and try again.".format(
- chart_folder_name, chart_export_path))
-
- export_helm_chart(registry_path, chart_export_path, kube_config,
- kube_context, helm_client_location, chart_name)
-
- # Returning helm chart path
- helm_chart_path = os.path.join(chart_export_path, chart_name)
- if chart_folder_name == Pre_Onboarding_Helm_Charts_Folder_Name:
- chart_path = helm_chart_path
- else:
- chart_path = os.getenv('HELMCHART') if os.getenv(
- 'HELMCHART') else helm_chart_path
-
- return chart_path
-
-
-def install_helm_client():
- # Fetch system related info
- operating_system = platform.system().lower()
- platform.machine()
-
- # Set helm binary download & install locations
- if (operating_system == 'windows'):
- download_location_string = f'.azure\\helm\\{HELM_VERSION}\\helm-{HELM_VERSION}-{operating_system}-amd64.zip'
- install_location_string = f'.azure\\helm\\{HELM_VERSION}\\{operating_system}-amd64\\helm.exe'
- requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.zip'
- elif (operating_system == 'linux' or operating_system == 'darwin'):
- download_location_string = f'.azure/helm/{HELM_VERSION}/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
- install_location_string = f'.azure/helm/{HELM_VERSION}/{operating_system}-amd64/helm'
- requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
- else:
- raise Exception(
- f'The {operating_system} platform is not currently supported for installing helm client.')
-
- download_location = os.path.expanduser(
- os.path.join('~', download_location_string))
- download_dir = os.path.dirname(download_location)
- install_location = os.path.expanduser(
- os.path.join('~', install_location_string))
-
- # Download compressed halm binary if not already present
- if not os.path.isfile(download_location):
- # Creating the helm folder if it doesnt exist
- if not os.path.exists(download_dir):
- try:
- os.makedirs(download_dir)
- except Exception as e:
- raise Exception("Failed to create helm directory." + str(e))
-
- # Downloading compressed helm client executable
- logger.warning(
- "Downloading helm client for first time. This can take few minutes...")
- try:
- response = urllib.request.urlopen(requestUri)
- except Exception as e:
- raise Exception("Failed to download helm client." + str(e))
-
- responseContent = response.read()
- response.close()
-
- # Creating the compressed helm binaries
- try:
- with open(download_location, 'wb') as f:
- f.write(responseContent)
- except Exception as e:
- raise Exception("Failed to create helm executable." + str(e))
-
- # Extract compressed helm binary
- if not os.path.isfile(install_location):
- try:
- shutil.unpack_archive(download_location, download_dir)
- os.chmod(install_location, os.stat(
- install_location).st_mode | stat.S_IXUSR)
- except Exception as e:
- raise Exception("Failed to extract helm executable." + str(e))
-
- return install_location
-
-
-def helm_install_release(chart_path, subscription_id, kubernetes_distro, kubernetes_infra, resource_group_name, cluster_name,
- location, onboarding_tenant_id, private_key_pem,
- no_wait, cloud_name, helm_client_location, onboarding_timeout="600"):
- cmd_helm_install = [helm_client_location, "upgrade", "--install", "azure-arc", chart_path,
- "--set", "global.subscriptionId={}".format(
- subscription_id),
- "--set", "global.kubernetesDistro={}".format(
- kubernetes_distro),
- "--set", "global.kubernetesInfra={}".format(
- kubernetes_infra),
- "--set", "global.resourceGroupName={}".format(
- resource_group_name),
- "--set", "global.resourceName={}".format(cluster_name),
- "--set", "global.location={}".format(location),
- "--set", "global.tenantId={}".format(
- onboarding_tenant_id),
- "--set", "global.onboardingPrivateKey={}".format(
- private_key_pem),
- "--set", "systemDefaultValues.spnOnboarding=false",
- "--set", "global.azureEnvironment={}".format(
- cloud_name),
- "--set", "systemDefaultValues.clusterconnect-agent.enabled=true",
- "--namespace", "{}".format("azure-arc-release"),
- "--create-namespace",
- "--output", "json"]
-
- if not no_wait:
- # Change --timeout format for helm client to understand
- onboarding_timeout = onboarding_timeout + "s"
- cmd_helm_install.extend(
- ["--wait", "--timeout", "{}".format(onboarding_timeout)])
- response_helm_install = Popen(cmd_helm_install, stdout=PIPE, stderr=PIPE)
- _, error_helm_install = response_helm_install.communicate()
- if response_helm_install.returncode != 0:
- raise Exception("Unable to install helm release" + error_helm_install.decode("ascii"))
-
-
-def install_agent():
- parser = argparse.ArgumentParser(
- description='Install Connected Cluster Agent')
- parser.add_argument('--subscriptionId', type=str, required=True)
- parser.add_argument('--resourceGroupName', type=str, required=True)
- parser.add_argument('--clusterName', type=str, required=True)
- parser.add_argument('--location', type=str, required=True)
- parser.add_argument('--tenantId', type=str, required=True)
- parser.add_argument('--privatePem', type=str, required=True)
-
- try:
- args = parser.parse_args()
- except Exception as e:
- raise Exception("Failed to parse arguments." + str(e))
-
- try:
- with open(args.privatePem, "r") as f:
- privateKey = f.read()
- except Exception as e:
- raise Exception("Failed to get private key." + str(e))
-
- # Install helm client
- helm_client_location = install_helm_client()
-
- # Retrieving Helm chart OCI Artifact location
- registry_path = get_helm_registry("https://westeurope.dp.kubernetesconfiguration.azure.com")
-
- # Get helm chart path
- chart_path = get_chart_path(
- registry_path, None, None, helm_client_location)
-
- helm_install_release(chart_path,
- args.subscriptionId,
- "generic",
- "generic",
- args.resourceGroupName,
- args.clusterName,
- args.location,
- args.tenantId,
- privateKey,
- False,
- "AZUREPUBLICCLOUD",
- helm_client_location)
-
-
-if __name__ == "__main__":
- install_agent()
+import argparse
+import json
+import logging as logger
+import os
+import platform
+import shutil
+import stat
+import subprocess
+import time
+import urllib
+from subprocess import PIPE, Popen
+from urllib import request
+
+HELM_VERSION = 'v3.6.3'
+HELM_STORAGE_URL = "https://k8connecthelm.azureedge.net"
+Pre_Onboarding_Helm_Charts_Folder_Name = 'PreOnboardingChecksCharts'
+
+
+def get_helm_registry(config_dp_endpoint):
+ # Setting uri
+ get_chart_location_url = "{}/{}/GetLatestHelmPackagePath?api-version=2019-11-01-preview".format(
+ config_dp_endpoint, 'azure-arc-k8sagents')
+
+ try:
+ response = urllib.request.urlopen(
+ request.Request(get_chart_location_url, method="POST"))
+ except Exception as e:
+ raise Exception("Failed to get helm registry." + str(e))
+
+ try:
+ return json.load(response).get('repositoryPath')
+ except Exception as e:
+ raise Exception(
+ "Error while fetching helm chart registry path from JSON response: " + str(e))
+
+
+def pull_helm_chart(registry_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents', retry_count=5, retry_delay=3):
+ cmd_helm_chart_pull = [helm_client_location,
+ "chart", "pull", registry_path]
+ if kube_config:
+ cmd_helm_chart_pull.extend(["--kubeconfig", kube_config])
+ if kube_context:
+ cmd_helm_chart_pull.extend(["--kube-context", kube_context])
+ for i in range(retry_count):
+ response_helm_chart_pull = subprocess.Popen(
+ cmd_helm_chart_pull, stdout=PIPE, stderr=PIPE)
+ _, error_helm_chart_pull = response_helm_chart_pull.communicate()
+ if response_helm_chart_pull.returncode != 0:
+ if i == retry_count - 1:
+ raise Exception("Unable to pull {} helm chart from the registry '{}': ".format(
+ chart_name, registry_path) + error_helm_chart_pull.decode("ascii"))
+ time.sleep(retry_delay)
+ else:
+ break
+
+
+def export_helm_chart(registry_path, chart_export_path, kube_config, kube_context, helm_client_location, chart_name='azure-arc-k8sagents'):
+ cmd_helm_chart_export = [helm_client_location, "chart",
+ "export", registry_path, "--destination", chart_export_path]
+ if kube_config:
+ cmd_helm_chart_export.extend(["--kubeconfig", kube_config])
+ if kube_context:
+ cmd_helm_chart_export.extend(["--kube-context", kube_context])
+ response_helm_chart_export = subprocess.Popen(
+ cmd_helm_chart_export, stdout=PIPE, stderr=PIPE)
+ _, error_helm_chart_export = response_helm_chart_export.communicate()
+ if response_helm_chart_export.returncode != 0:
+ raise Exception("Unable to export {} helm chart from the registry '{}': ".format(
+ chart_name, registry_path) + error_helm_chart_export.decode("ascii"))
+
+
+def get_chart_path(registry_path, kube_config, kube_context, helm_client_location, chart_folder_name='AzureArcCharts', chart_name='azure-arc-k8sagents'):
+ # Pulling helm chart from registry
+ os.environ['HELM_EXPERIMENTAL_OCI'] = '1'
+ pull_helm_chart(registry_path, kube_config, kube_context,
+ helm_client_location, chart_name)
+
+ # Exporting helm chart after cleanup
+ chart_export_path = os.path.join(
+ os.path.expanduser('~'), '.azure', chart_folder_name)
+ try:
+ if os.path.isdir(chart_export_path):
+ shutil.rmtree(chart_export_path)
+ except:
+ logger.warning("Unable to cleanup the {} already present on the machine. In case of failure, please cleanup the directory '{}' and try again.".format(
+ chart_folder_name, chart_export_path))
+
+ export_helm_chart(registry_path, chart_export_path, kube_config,
+ kube_context, helm_client_location, chart_name)
+
+ # Returning helm chart path
+ helm_chart_path = os.path.join(chart_export_path, chart_name)
+ if chart_folder_name == Pre_Onboarding_Helm_Charts_Folder_Name:
+ chart_path = helm_chart_path
+ else:
+ chart_path = os.getenv('HELMCHART') if os.getenv(
+ 'HELMCHART') else helm_chart_path
+
+ return chart_path
+
+
+def install_helm_client():
+ # Fetch system related info
+ operating_system = platform.system().lower()
+ platform.machine()
+
+ # Set helm binary download & install locations
+ if (operating_system == 'windows'):
+ download_location_string = f'.azure\\helm\\{HELM_VERSION}\\helm-{HELM_VERSION}-{operating_system}-amd64.zip'
+ install_location_string = f'.azure\\helm\\{HELM_VERSION}\\{operating_system}-amd64\\helm.exe'
+ requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.zip'
+ elif (operating_system == 'linux' or operating_system == 'darwin'):
+ download_location_string = f'.azure/helm/{HELM_VERSION}/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
+ install_location_string = f'.azure/helm/{HELM_VERSION}/{operating_system}-amd64/helm'
+ requestUri = f'{HELM_STORAGE_URL}/helm/helm-{HELM_VERSION}-{operating_system}-amd64.tar.gz'
+ else:
+ raise Exception(
+ f'The {operating_system} platform is not currently supported for installing helm client.')
+
+ download_location = os.path.expanduser(
+ os.path.join('~', download_location_string))
+ download_dir = os.path.dirname(download_location)
+ install_location = os.path.expanduser(
+ os.path.join('~', install_location_string))
+
+ # Download compressed halm binary if not already present
+ if not os.path.isfile(download_location):
+ # Creating the helm folder if it doesnt exist
+ if not os.path.exists(download_dir):
+ try:
+ os.makedirs(download_dir)
+ except Exception as e:
+ raise Exception("Failed to create helm directory." + str(e))
+
+ # Downloading compressed helm client executable
+ logger.warning(
+ "Downloading helm client for first time. This can take few minutes...")
+ try:
+ response = urllib.request.urlopen(requestUri)
+ except Exception as e:
+ raise Exception("Failed to download helm client." + str(e))
+
+ responseContent = response.read()
+ response.close()
+
+ # Creating the compressed helm binaries
+ try:
+ with open(download_location, 'wb') as f:
+ f.write(responseContent)
+ except Exception as e:
+ raise Exception("Failed to create helm executable." + str(e))
+
+ # Extract compressed helm binary
+ if not os.path.isfile(install_location):
+ try:
+ shutil.unpack_archive(download_location, download_dir)
+ os.chmod(install_location, os.stat(
+ install_location).st_mode | stat.S_IXUSR)
+ except Exception as e:
+ raise Exception("Failed to extract helm executable." + str(e))
+
+ return install_location
+
+
+def helm_install_release(chart_path, subscription_id, kubernetes_distro, kubernetes_infra, resource_group_name, cluster_name,
+ location, onboarding_tenant_id, private_key_pem,
+ no_wait, cloud_name, helm_client_location, onboarding_timeout="600"):
+ cmd_helm_install = [helm_client_location, "upgrade", "--install", "azure-arc", chart_path,
+ "--set", "global.subscriptionId={}".format(
+ subscription_id),
+ "--set", "global.kubernetesDistro={}".format(
+ kubernetes_distro),
+ "--set", "global.kubernetesInfra={}".format(
+ kubernetes_infra),
+ "--set", "global.resourceGroupName={}".format(
+ resource_group_name),
+ "--set", "global.resourceName={}".format(cluster_name),
+ "--set", "global.location={}".format(location),
+ "--set", "global.tenantId={}".format(
+ onboarding_tenant_id),
+ "--set", "global.onboardingPrivateKey={}".format(
+ private_key_pem),
+ "--set", "systemDefaultValues.spnOnboarding=false",
+ "--set", "global.azureEnvironment={}".format(
+ cloud_name),
+ "--set", "systemDefaultValues.clusterconnect-agent.enabled=true",
+ "--namespace", "{}".format("azure-arc-release"),
+ "--create-namespace",
+ "--output", "json"]
+
+ if not no_wait:
+ # Change --timeout format for helm client to understand
+ onboarding_timeout = onboarding_timeout + "s"
+ cmd_helm_install.extend(
+ ["--wait", "--timeout", "{}".format(onboarding_timeout)])
+ response_helm_install = Popen(cmd_helm_install, stdout=PIPE, stderr=PIPE)
+ _, error_helm_install = response_helm_install.communicate()
+ if response_helm_install.returncode != 0:
+ raise Exception("Unable to install helm release" + error_helm_install.decode("ascii"))
+
+
+def install_agent():
+ parser = argparse.ArgumentParser(
+ description='Install Connected Cluster Agent')
+ parser.add_argument('--subscriptionId', type=str, required=True)
+ parser.add_argument('--resourceGroupName', type=str, required=True)
+ parser.add_argument('--clusterName', type=str, required=True)
+ parser.add_argument('--location', type=str, required=True)
+ parser.add_argument('--tenantId', type=str, required=True)
+ parser.add_argument('--privatePem', type=str, required=True)
+
+ try:
+ args = parser.parse_args()
+ except Exception as e:
+ raise Exception("Failed to parse arguments." + str(e))
+
+ try:
+ with open(args.privatePem, "r") as f:
+ privateKey = f.read()
+ except Exception as e:
+ raise Exception("Failed to get private key." + str(e))
+
+ # Install helm client
+ helm_client_location = install_helm_client()
+
+ # Retrieving Helm chart OCI Artifact location
+ registry_path = get_helm_registry("https://westeurope.dp.kubernetesconfiguration.azure.com")
+
+ # Get helm chart path
+ chart_path = get_chart_path(
+ registry_path, None, None, helm_client_location)
+
+ helm_install_release(chart_path,
+ args.subscriptionId,
+ "generic",
+ "generic",
+ args.resourceGroupName,
+ args.clusterName,
+ args.location,
+ args.tenantId,
+ privateKey,
+ False,
+ "AZUREPUBLICCLOUD",
+ helm_client_location)
+
+
+if __name__ == "__main__":
+ install_agent()
diff --git a/internal/services/arckubernetes/testdata/kind.yaml b/internal/services/arckubernetes/testdata/kind.yaml
index 04b3342955c7..2de5b96fd039 100644
--- a/internal/services/arckubernetes/testdata/kind.yaml
+++ b/internal/services/arckubernetes/testdata/kind.yaml
@@ -1,23 +1,23 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-nodes:
-- role: control-plane
- kubeadmConfigPatches:
- - |
- kind: InitConfiguration
- nodeRegistration:
- kubeletExtraArgs:
- node-labels: "ingress-ready=true"
- # port forward 80 on the host to 80 on this node
- extraPortMappings:
- - containerPort: 81
- hostPort: 81
- listenAddress: "127.0.0.1"
- protocol: TCP
- - containerPort: 443
- hostPort: 443
- listenAddress: "127.0.0.1"
- protocol: TCP
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+ kubeadmConfigPatches:
+ - |
+ kind: InitConfiguration
+ nodeRegistration:
+ kubeletExtraArgs:
+ node-labels: "ingress-ready=true"
+ # port forward 80 on the host to 80 on this node
+ extraPortMappings:
+ - containerPort: 81
+ hostPort: 81
+ listenAddress: "127.0.0.1"
+ protocol: TCP
+ - containerPort: 443
+ hostPort: 443
+ listenAddress: "127.0.0.1"
+ protocol: TCP
diff --git a/internal/services/automation/testdata/automation_certificate_testdata.sh b/internal/services/automation/testdata/automation_certificate_testdata.sh
old mode 100755
new mode 100644
diff --git a/internal/services/batch/testdata/batch_certificate.cer b/internal/services/batch/testdata/batch_certificate.cer
index 577947b220d7..ff420aff3f9c 100644
--- a/internal/services/batch/testdata/batch_certificate.cer
+++ b/internal/services/batch/testdata/batch_certificate.cer
@@ -1,21 +1,21 @@
------BEGIN CERTIFICATE-----
-MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
-BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
-FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
-ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
-BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
-QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
-HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
-mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
-hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
-616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
-TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
-421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
-AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
-Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
-qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
-IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
-MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
-ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
+-----BEGIN CERTIFICATE-----
+MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
+FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
+ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
+BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
+QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
+HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
+mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
+hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
+616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
+TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
+421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
+AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
+Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
+qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
+IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
+MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
+ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/internal/services/datashare/testdata/application_gateway_test.cer b/internal/services/datashare/testdata/application_gateway_test.cer
index 577947b220d7..ff420aff3f9c 100644
--- a/internal/services/datashare/testdata/application_gateway_test.cer
+++ b/internal/services/datashare/testdata/application_gateway_test.cer
@@ -1,21 +1,21 @@
------BEGIN CERTIFICATE-----
-MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
-BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
-FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
-ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
-BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
-QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
-HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
-mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
-hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
-616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
-TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
-421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
-AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
-Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
-qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
-IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
-MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
-ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
+-----BEGIN CERTIFICATE-----
+MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
+FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
+ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
+BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
+QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
+HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
+mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
+hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
+616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
+TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
+421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
+AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
+Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
+qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
+IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
+MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
+ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/internal/services/iothub/testdata/application_gateway_test.cer b/internal/services/iothub/testdata/application_gateway_test.cer
index 577947b220d7..ff420aff3f9c 100644
--- a/internal/services/iothub/testdata/application_gateway_test.cer
+++ b/internal/services/iothub/testdata/application_gateway_test.cer
@@ -1,21 +1,21 @@
------BEGIN CERTIFICATE-----
-MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
-BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
-FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
-ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
-BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
-QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
-HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
-mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
-hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
-616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
-TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
-421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
-AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
-Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
-qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
-IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
-MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
-ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
+-----BEGIN CERTIFICATE-----
+MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
+FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
+ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
+BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
+QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
+HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
+mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
+hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
+616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
+TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
+421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
+AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
+Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
+qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
+IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
+MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
+ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/internal/services/iothub/testdata/batch_certificate.cer b/internal/services/iothub/testdata/batch_certificate.cer
index 577947b220d7..ff420aff3f9c 100644
--- a/internal/services/iothub/testdata/batch_certificate.cer
+++ b/internal/services/iothub/testdata/batch_certificate.cer
@@ -1,21 +1,21 @@
------BEGIN CERTIFICATE-----
-MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
-BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
-FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
-ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
-BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
-QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
-HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
-mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
-hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
-616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
-TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
-421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
-AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
-Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
-qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
-IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
-MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
-ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
+-----BEGIN CERTIFICATE-----
+MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
+FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
+ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
+BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
+QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
+HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
+mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
+hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
+616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
+TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
+421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
+AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
+Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
+qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
+IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
+MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
+ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/internal/services/iothub/testdata/iothub_test.cer b/internal/services/iothub/testdata/iothub_test.cer
old mode 100755
new mode 100644
diff --git a/internal/services/logic/testdata/log4net.dll b/internal/services/logic/testdata/log4net.dll
deleted file mode 100644
index b926f6fc45dc..000000000000
Binary files a/internal/services/logic/testdata/log4net.dll and /dev/null differ
diff --git a/internal/services/network/testdata/application_gateway_test.cer b/internal/services/network/testdata/application_gateway_test.cer
index 577947b220d7..ff420aff3f9c 100644
--- a/internal/services/network/testdata/application_gateway_test.cer
+++ b/internal/services/network/testdata/application_gateway_test.cer
@@ -1,21 +1,21 @@
------BEGIN CERTIFICATE-----
-MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
-BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
-FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
-ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
-BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
-QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
-HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
-mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
-hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
-616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
-TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
-421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
-AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
-Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
-qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
-IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
-MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
-ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
+-----BEGIN CERTIFICATE-----
+MIIDbzCCAlegAwIBAgIJAIzjRD36sIbbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQKDAl0ZXJyYWZvcm0x
+FTATBgNVBAMMDHRlcnJhZm9ybS5pbzAgFw0xNzA0MjEyMDA1MjdaGA8yMTE3MDMy
+ODIwMDUyN1owTTELMAkGA1UEBhMCVVMxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQ
+BgNVBAoMCXRlcnJhZm9ybTEVMBMGA1UEAwwMdGVycmFmb3JtLmlvMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3L9L5szT4+FLykTFNyyPjy/k3BQTYAfR
+QzP2dhnsuUKm3cdPC0NyZ+wEXIUGhoDO2YG6EYChOl8fsDqDOjloSUGKqYw++nlp
+HIuUgJx8IxxG2XkALCjFU7EmF+w7kn76d0ezpEIYxnLP+KG2DVornoEt1aLhv1ML
+mpgEZZPhDbMSLhSYWeTVRMayXLwqtfgnDumQSB+8d/1JuJqrSI4pD12JozVThzb6
+hsjfb6RMX4epPmrGn0PbTPEEA6awmsxBCXB0s13nNQt/O0hLM2agwvAyozilQV+s
+616Ckgk6DJoUkqZhDy7vPYMIRSr98fBws6zkrV6tTLjmD8xAvobePQIDAQABo1Aw
+TjAdBgNVHQ4EFgQUXIqO421zMMmbcRRX9wctZFCQuPIwHwYDVR0jBBgwFoAUXIqO
+421zMMmbcRRX9wctZFCQuPIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
+AQEAr82NeT3BYJOKLlUL6Om5LjUF66ewcJjG9ltdvyQwVneMcq7t5UAPxgChzqNR
+Vk4da8PzkXpjBJyWezHupdJNX3XqeUk2kSxqQ6/gmhqvfI3y7djrwoO6jvMEY26W
+qtkTNORWDP3THJJVimC3zV+KMU5UBVrEzhOVhHSU709lBP75o0BBn3xGsPqSq9k8
+IotIFfyAc6a+XP3+ZMpvh7wqAUml7vWa5wlcXExCx39h1balfDSLGNC4swWPCp9A
+MnQR0p+vMay9hNP1Eh+9QYUai14d5KS3cFV+KxE1cJR5HD/iLltnnOEbpMsB0eVO
+ZWkFvE7Y5lW0oVSAfin5TwTJMQ==
-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/internal/services/springcloud/testdata/cer b/internal/services/springcloud/testdata/cer
index e2eb9a4dfdb9..64942a8aac7a 100644
--- a/internal/services/springcloud/testdata/cer
+++ b/internal/services/springcloud/testdata/cer
@@ -1,17 +1,17 @@
------BEGIN CERTIFICATE-----
-MIICsjCCAZoCCQCMdt7DvygPtDANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDDBBh
-cGkudGVycmFmb3JtLmlvMB4XDTE4MDcwNTEwMzMzMFoXDTI4MDcwMjEwMzMzMFow
-GzEZMBcGA1UEAwwQYXBpLnRlcnJhZm9ybS5pbzCCASIwDQYJKoZIhvcNAQEBBQAD
-ggEPADCCAQoCggEBAKQW332Ol28CsidAheD1aL9Ul8JWnKLdaVxKZ3ssl5CXjPDO
-mM7IXk0SgbQnUC8lIlPFZiDGbQ1sB6OTMun6ZZ4ipLp80dtl0roCLtCnDQOBGzCN
-ArCYAoXRurjkXEY7tpD0wwtU72+37h3HQ4g0VS6VItJCqJ9QADV+HO2ZWuZTez70
-MhoL6OLfZP7HGYdJDKgfEVNF5XlbVzNAGkDIJFdhjNxyGGu5Nfsm1pfQhAyunkk7
-JVamjUg5IojRdo63IS9wwzMOdeGSAbBcsJfYeCfVg2kupR8q0TmZ+x93RmmOlbSi
-66kEYxRzZ9YCQeHJmn1YfJ92BpCUiy9A6Z1iaKUCAwEAATANBgkqhkiG9w0BAQsF
-AAOCAQEAJ7JhlecP7J48wI2QHTMbAMkkWBv/iWq1/QIF4ugH3Zb5PorOv+NfhQ0L
-lWiw/SzN8Ae95vUixAGYHMSa28oumM5K1OsqKEkVIo1AoBH8nBz+VcTpRD/mHXot
-AHPAZt9j5LqeHX+enR6RbINAf3jn+YU3MdVe0MsADdFASVDfjmQP2R7o9aJb/QqO
-g3bZBWsiBDEISfyaH2+pgUM7wtwEoFWmEMlgjLK1MRBs1cDZXqnHaCd/rs+NmWV9
-naEu7x5fyQOk4HozkpweR+Jx1sBlTRsa49/qSHt/6ULKfO01/cTs4iF71ykXPbh3
-Kj9cI2uo9aYtXkxkhKrGyUpA7FJqWw==
------END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICsjCCAZoCCQCMdt7DvygPtDANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDDBBh
+cGkudGVycmFmb3JtLmlvMB4XDTE4MDcwNTEwMzMzMFoXDTI4MDcwMjEwMzMzMFow
+GzEZMBcGA1UEAwwQYXBpLnRlcnJhZm9ybS5pbzCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAKQW332Ol28CsidAheD1aL9Ul8JWnKLdaVxKZ3ssl5CXjPDO
+mM7IXk0SgbQnUC8lIlPFZiDGbQ1sB6OTMun6ZZ4ipLp80dtl0roCLtCnDQOBGzCN
+ArCYAoXRurjkXEY7tpD0wwtU72+37h3HQ4g0VS6VItJCqJ9QADV+HO2ZWuZTez70
+MhoL6OLfZP7HGYdJDKgfEVNF5XlbVzNAGkDIJFdhjNxyGGu5Nfsm1pfQhAyunkk7
+JVamjUg5IojRdo63IS9wwzMOdeGSAbBcsJfYeCfVg2kupR8q0TmZ+x93RmmOlbSi
+66kEYxRzZ9YCQeHJmn1YfJ92BpCUiy9A6Z1iaKUCAwEAATANBgkqhkiG9w0BAQsF
+AAOCAQEAJ7JhlecP7J48wI2QHTMbAMkkWBv/iWq1/QIF4ugH3Zb5PorOv+NfhQ0L
+lWiw/SzN8Ae95vUixAGYHMSa28oumM5K1OsqKEkVIo1AoBH8nBz+VcTpRD/mHXot
+AHPAZt9j5LqeHX+enR6RbINAf3jn+YU3MdVe0MsADdFASVDfjmQP2R7o9aJb/QqO
+g3bZBWsiBDEISfyaH2+pgUM7wtwEoFWmEMlgjLK1MRBs1cDZXqnHaCd/rs+NmWV9
+naEu7x5fyQOk4HozkpweR+Jx1sBlTRsa49/qSHt/6ULKfO01/cTs4iF71ykXPbh3
+Kj9cI2uo9aYtXkxkhKrGyUpA7FJqWw==
+-----END CERTIFICATE-----
diff --git a/internal/tools/document-lint/README.md b/internal/tools/document-lint/README.md
index 5d62a5a5a1c0..3362cac31ddb 100644
--- a/internal/tools/document-lint/README.md
+++ b/internal/tools/document-lint/README.md
@@ -1,23 +1,23 @@
-# Introduction
-This tool detects and fixes inconsistencies in the AzureRM Terraform Provider resource documentation.
-
-## The following can be checked/fixed:
-1. Formatting of documentation.
-2. The Required/Optional value of properties.
-3. The Default value of properties.
-4. The ForceNew value of properties.
-5. The TimeOut value of create/update/read/delete functions.
-6. Properties that are present in the schema but missing in the documentation and vice versa.
-7. The list of PossibleValues.
-
-# Getting Started
-```bash
-# print the usage
-go run main.go -h
-
-# check documents and print the error information
-go run main.go check
-
-# check and try to fix existing errors
-go run main.go fix
+# Introduction
+This tool detects and fixes inconsistencies in the AzureRM Terraform Provider resource documentation.
+
+## The following can be checked/fixed:
+1. Formatting of documentation.
+2. The Required/Optional value of properties.
+3. The Default value of properties.
+4. The ForceNew value of properties.
+5. The TimeOut value of create/update/read/delete functions.
+6. Properties that are present in the schema but missing in the documentation and vice versa.
+7. The list of PossibleValues.
+
+# Getting Started
+```bash
+# print the usage
+go run main.go -h
+
+# check documents and print the error information
+go run main.go check
+
+# check and try to fix existing errors
+go run main.go fix
```
\ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
old mode 100755
new mode 100644
diff --git a/scripts/check-test-package.sh b/scripts/check-test-package.sh
old mode 100755
new mode 100644
diff --git a/scripts/gofmtcheck.sh b/scripts/gofmtcheck.sh
old mode 100755
new mode 100644
diff --git a/scripts/gogetcookie.sh b/scripts/gogetcookie.sh
old mode 100755
new mode 100644
diff --git a/scripts/goimport-file.sh b/scripts/goimport-file.sh
old mode 100755
new mode 100644
diff --git a/scripts/plugin-sdk-fixerupper.sh b/scripts/plugin-sdk-fixerupper.sh
old mode 100755
new mode 100644
diff --git a/scripts/release.sh b/scripts/release.sh
old mode 100755
new mode 100644
diff --git a/scripts/run-breaking-change-detection.sh b/scripts/run-breaking-change-detection.sh
old mode 100755
new mode 100644
diff --git a/scripts/run-gradually-deprecated.sh b/scripts/run-gradually-deprecated.sh
old mode 100755
new mode 100644
diff --git a/scripts/run-lint.sh b/scripts/run-lint.sh
old mode 100755
new mode 100644
diff --git a/scripts/run-static-analysis.sh b/scripts/run-static-analysis.sh
old mode 100755
new mode 100644
diff --git a/scripts/run-test.sh b/scripts/run-test.sh
old mode 100755
new mode 100644
diff --git a/scripts/run-tflint.sh b/scripts/run-tflint.sh
old mode 100755
new mode 100644
diff --git a/scripts/scaffold-website.sh b/scripts/scaffold-website.sh
old mode 100755
new mode 100644
diff --git a/scripts/stats-pandora-sdks.sh b/scripts/stats-pandora-sdks.sh
old mode 100755
new mode 100644
diff --git a/scripts/terrafmt-acctests.sh b/scripts/terrafmt-acctests.sh
old mode 100755
new mode 100644
diff --git a/scripts/terrafmt-website.sh b/scripts/terrafmt-website.sh
old mode 100755
new mode 100644
diff --git a/scripts/timeouts.sh b/scripts/timeouts.sh
old mode 100755
new mode 100644
diff --git a/scripts/track2-check.sh b/scripts/track2-check.sh
old mode 100755
new mode 100644
diff --git a/scripts/update-deps.sh b/scripts/update-deps.sh
old mode 100755
new mode 100644
diff --git a/scripts/validate-examples.sh b/scripts/validate-examples.sh
old mode 100755
new mode 100644
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/model_applicationinsightscomponentproactivedetectionconfigurationruledefinitions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/model_applicationinsightscomponentproactivedetectionconfigurationruledefinitions.go
deleted file mode 100644
index 134d46c2ac84..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/model_applicationinsightscomponentproactivedetectionconfigurationruledefinitions.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package componentproactivedetectionapis
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions struct {
- Description *string `json:"Description,omitempty"`
- DisplayName *string `json:"DisplayName,omitempty"`
- HelpURL *string `json:"HelpUrl,omitempty"`
- IsEnabledByDefault *bool `json:"IsEnabledByDefault,omitempty"`
- IsHidden *bool `json:"IsHidden,omitempty"`
- IsInPreview *bool `json:"IsInPreview,omitempty"`
- Name *string `json:"Name,omitempty"`
- SupportsEmailNotifications *bool `json:"SupportsEmailNotifications,omitempty"`
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/README.md
deleted file mode 100644
index 0b18678cbba1..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/README.md
+++ /dev/null
@@ -1,86 +0,0 @@
-
-## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site` Documentation
-
-The `site` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`).
-
-This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs).
-
-### Import Path
-
-```go
-import "github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site"
-```
-
-
-### Client Initialization
-
-```go
-client := site.NewSiteClientWithBaseURI("https://management.azure.com")
-client.Client.Authorizer = authorizer
-```
-
-
-### Example Usage: `SiteClient.CreateOrUpdate`
-
-```go
-ctx := context.TODO()
-id := site.NewSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkName", "siteName")
-
-payload := site.Site{
- // ...
-}
-
-
-if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
- // handle the error
-}
-```
-
-
-### Example Usage: `SiteClient.Delete`
-
-```go
-ctx := context.TODO()
-id := site.NewSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkName", "siteName")
-
-if err := client.DeleteThenPoll(ctx, id); err != nil {
- // handle the error
-}
-```
-
-
-### Example Usage: `SiteClient.Get`
-
-```go
-ctx := context.TODO()
-id := site.NewSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkName", "siteName")
-
-read, err := client.Get(ctx, id)
-if err != nil {
- // handle the error
-}
-if model := read.Model; model != nil {
- // do something with the model/response object
-}
-```
-
-
-### Example Usage: `SiteClient.UpdateTags`
-
-```go
-ctx := context.TODO()
-id := site.NewSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkName", "siteName")
-
-payload := site.TagsObject{
- // ...
-}
-
-
-read, err := client.UpdateTags(ctx, id, payload)
-if err != nil {
- // handle the error
-}
-if model := read.Model; model != nil {
- // do something with the model/response object
-}
-```
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/client.go
deleted file mode 100644
index bab4d23cff87..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/client.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package site
-
-import (
- "fmt"
-
- "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
- sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type SiteClient struct {
- Client *resourcemanager.Client
-}
-
-func NewSiteClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteClient, error) {
- client, err := resourcemanager.NewClient(sdkApi, "site", defaultApiVersion)
- if err != nil {
- return nil, fmt.Errorf("instantiating SiteClient: %+v", err)
- }
-
- return &SiteClient{
- Client: client,
- }, nil
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/constants.go
deleted file mode 100644
index c486645f2e3e..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/constants.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package site
-
-import (
- "encoding/json"
- "fmt"
- "strings"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type ProvisioningState string
-
-const (
- ProvisioningStateAccepted ProvisioningState = "Accepted"
- ProvisioningStateCanceled ProvisioningState = "Canceled"
- ProvisioningStateDeleted ProvisioningState = "Deleted"
- ProvisioningStateDeleting ProvisioningState = "Deleting"
- ProvisioningStateFailed ProvisioningState = "Failed"
- ProvisioningStateSucceeded ProvisioningState = "Succeeded"
- ProvisioningStateUnknown ProvisioningState = "Unknown"
-)
-
-func PossibleValuesForProvisioningState() []string {
- return []string{
- string(ProvisioningStateAccepted),
- string(ProvisioningStateCanceled),
- string(ProvisioningStateDeleted),
- string(ProvisioningStateDeleting),
- string(ProvisioningStateFailed),
- string(ProvisioningStateSucceeded),
- string(ProvisioningStateUnknown),
- }
-}
-
-func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error {
- var decoded string
- if err := json.Unmarshal(bytes, &decoded); err != nil {
- return fmt.Errorf("unmarshaling: %+v", err)
- }
- out, err := parseProvisioningState(decoded)
- if err != nil {
- return fmt.Errorf("parsing %q: %+v", decoded, err)
- }
- *s = *out
- return nil
-}
-
-func parseProvisioningState(input string) (*ProvisioningState, error) {
- vals := map[string]ProvisioningState{
- "accepted": ProvisioningStateAccepted,
- "canceled": ProvisioningStateCanceled,
- "deleted": ProvisioningStateDeleted,
- "deleting": ProvisioningStateDeleting,
- "failed": ProvisioningStateFailed,
- "succeeded": ProvisioningStateSucceeded,
- "unknown": ProvisioningStateUnknown,
- }
- if v, ok := vals[strings.ToLower(input)]; ok {
- return &v, nil
- }
-
- // otherwise presume it's an undefined value and best-effort it
- out := ProvisioningState(input)
- return &out, nil
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/id_site.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/id_site.go
deleted file mode 100644
index b03097428577..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/id_site.go
+++ /dev/null
@@ -1,139 +0,0 @@
-package site
-
-import (
- "fmt"
- "strings"
-
- "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser"
- "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-func init() {
- recaser.RegisterResourceId(&SiteId{})
-}
-
-var _ resourceids.ResourceId = &SiteId{}
-
-// SiteId is a struct representing the Resource ID for a Site
-type SiteId struct {
- SubscriptionId string
- ResourceGroupName string
- MobileNetworkName string
- SiteName string
-}
-
-// NewSiteID returns a new SiteId struct
-func NewSiteID(subscriptionId string, resourceGroupName string, mobileNetworkName string, siteName string) SiteId {
- return SiteId{
- SubscriptionId: subscriptionId,
- ResourceGroupName: resourceGroupName,
- MobileNetworkName: mobileNetworkName,
- SiteName: siteName,
- }
-}
-
-// ParseSiteID parses 'input' into a SiteId
-func ParseSiteID(input string) (*SiteId, error) {
- parser := resourceids.NewParserFromResourceIdType(&SiteId{})
- parsed, err := parser.Parse(input, false)
- if err != nil {
- return nil, fmt.Errorf("parsing %q: %+v", input, err)
- }
-
- id := SiteId{}
- if err = id.FromParseResult(*parsed); err != nil {
- return nil, err
- }
-
- return &id, nil
-}
-
-// ParseSiteIDInsensitively parses 'input' case-insensitively into a SiteId
-// note: this method should only be used for API response data and not user input
-func ParseSiteIDInsensitively(input string) (*SiteId, error) {
- parser := resourceids.NewParserFromResourceIdType(&SiteId{})
- parsed, err := parser.Parse(input, true)
- if err != nil {
- return nil, fmt.Errorf("parsing %q: %+v", input, err)
- }
-
- id := SiteId{}
- if err = id.FromParseResult(*parsed); err != nil {
- return nil, err
- }
-
- return &id, nil
-}
-
-func (id *SiteId) FromParseResult(input resourceids.ParseResult) error {
- var ok bool
-
- if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok {
- return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input)
- }
-
- if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok {
- return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input)
- }
-
- if id.MobileNetworkName, ok = input.Parsed["mobileNetworkName"]; !ok {
- return resourceids.NewSegmentNotSpecifiedError(id, "mobileNetworkName", input)
- }
-
- if id.SiteName, ok = input.Parsed["siteName"]; !ok {
- return resourceids.NewSegmentNotSpecifiedError(id, "siteName", input)
- }
-
- return nil
-}
-
-// ValidateSiteID checks that 'input' can be parsed as a Site ID
-func ValidateSiteID(input interface{}, key string) (warnings []string, errors []error) {
- v, ok := input.(string)
- if !ok {
- errors = append(errors, fmt.Errorf("expected %q to be a string", key))
- return
- }
-
- if _, err := ParseSiteID(v); err != nil {
- errors = append(errors, err)
- }
-
- return
-}
-
-// ID returns the formatted Site ID
-func (id SiteId) ID() string {
- fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.MobileNetwork/mobileNetworks/%s/sites/%s"
- return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MobileNetworkName, id.SiteName)
-}
-
-// Segments returns a slice of Resource ID Segments which comprise this Site ID
-func (id SiteId) Segments() []resourceids.Segment {
- return []resourceids.Segment{
- resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
- resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
- resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
- resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
- resourceids.StaticSegment("staticProviders", "providers", "providers"),
- resourceids.ResourceProviderSegment("staticMicrosoftMobileNetwork", "Microsoft.MobileNetwork", "Microsoft.MobileNetwork"),
- resourceids.StaticSegment("staticMobileNetworks", "mobileNetworks", "mobileNetworks"),
- resourceids.UserSpecifiedSegment("mobileNetworkName", "mobileNetworkName"),
- resourceids.StaticSegment("staticSites", "sites", "sites"),
- resourceids.UserSpecifiedSegment("siteName", "siteName"),
- }
-}
-
-// String returns a human-readable description of this Site ID
-func (id SiteId) String() string {
- components := []string{
- fmt.Sprintf("Subscription: %q", id.SubscriptionId),
- fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName),
- fmt.Sprintf("Mobile Network Name: %q", id.MobileNetworkName),
- fmt.Sprintf("Site Name: %q", id.SiteName),
- }
- return fmt.Sprintf("Site (%s)", strings.Join(components, "\n"))
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_createorupdate.go
deleted file mode 100644
index e85d2db36935..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_createorupdate.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package site
-
-import (
- "context"
- "fmt"
- "net/http"
-
- "github.com/hashicorp/go-azure-sdk/sdk/client"
- "github.com/hashicorp/go-azure-sdk/sdk/client/pollers"
- "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
- "github.com/hashicorp/go-azure-sdk/sdk/odata"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type CreateOrUpdateOperationResponse struct {
- Poller pollers.Poller
- HttpResponse *http.Response
- OData *odata.OData
- Model *Site
-}
-
-// CreateOrUpdate ...
-func (c SiteClient) CreateOrUpdate(ctx context.Context, id SiteId, input Site) (result CreateOrUpdateOperationResponse, err error) {
- opts := client.RequestOptions{
- ContentType: "application/json; charset=utf-8",
- ExpectedStatusCodes: []int{
- http.StatusCreated,
- http.StatusOK,
- },
- HttpMethod: http.MethodPut,
- Path: id.ID(),
- }
-
- req, err := c.Client.NewRequest(ctx, opts)
- if err != nil {
- return
- }
-
- if err = req.Marshal(input); err != nil {
- return
- }
-
- var resp *client.Response
- resp, err = req.Execute(ctx)
- if resp != nil {
- result.OData = resp.OData
- result.HttpResponse = resp.Response
- }
- if err != nil {
- return
- }
-
- result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client)
- if err != nil {
- return
- }
-
- return
-}
-
-// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
-func (c SiteClient) CreateOrUpdateThenPoll(ctx context.Context, id SiteId, input Site) error {
- result, err := c.CreateOrUpdate(ctx, id, input)
- if err != nil {
- return fmt.Errorf("performing CreateOrUpdate: %+v", err)
- }
-
- if err := result.Poller.PollUntilDone(ctx); err != nil {
- return fmt.Errorf("polling after CreateOrUpdate: %+v", err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_delete.go
deleted file mode 100644
index 7bf19e13f6ad..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_delete.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package site
-
-import (
- "context"
- "fmt"
- "net/http"
-
- "github.com/hashicorp/go-azure-sdk/sdk/client"
- "github.com/hashicorp/go-azure-sdk/sdk/client/pollers"
- "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
- "github.com/hashicorp/go-azure-sdk/sdk/odata"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type DeleteOperationResponse struct {
- Poller pollers.Poller
- HttpResponse *http.Response
- OData *odata.OData
-}
-
-// Delete ...
-func (c SiteClient) Delete(ctx context.Context, id SiteId) (result DeleteOperationResponse, err error) {
- opts := client.RequestOptions{
- ContentType: "application/json; charset=utf-8",
- ExpectedStatusCodes: []int{
- http.StatusAccepted,
- http.StatusNoContent,
- http.StatusOK,
- },
- HttpMethod: http.MethodDelete,
- Path: id.ID(),
- }
-
- req, err := c.Client.NewRequest(ctx, opts)
- if err != nil {
- return
- }
-
- var resp *client.Response
- resp, err = req.Execute(ctx)
- if resp != nil {
- result.OData = resp.OData
- result.HttpResponse = resp.Response
- }
- if err != nil {
- return
- }
-
- result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client)
- if err != nil {
- return
- }
-
- return
-}
-
-// DeleteThenPoll performs Delete then polls until it's completed
-func (c SiteClient) DeleteThenPoll(ctx context.Context, id SiteId) error {
- result, err := c.Delete(ctx, id)
- if err != nil {
- return fmt.Errorf("performing Delete: %+v", err)
- }
-
- if err := result.Poller.PollUntilDone(ctx); err != nil {
- return fmt.Errorf("polling after Delete: %+v", err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_get.go
deleted file mode 100644
index f6b55484e63e..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_get.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package site
-
-import (
- "context"
- "net/http"
-
- "github.com/hashicorp/go-azure-sdk/sdk/client"
- "github.com/hashicorp/go-azure-sdk/sdk/odata"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type GetOperationResponse struct {
- HttpResponse *http.Response
- OData *odata.OData
- Model *Site
-}
-
-// Get ...
-func (c SiteClient) Get(ctx context.Context, id SiteId) (result GetOperationResponse, err error) {
- opts := client.RequestOptions{
- ContentType: "application/json; charset=utf-8",
- ExpectedStatusCodes: []int{
- http.StatusOK,
- },
- HttpMethod: http.MethodGet,
- Path: id.ID(),
- }
-
- req, err := c.Client.NewRequest(ctx, opts)
- if err != nil {
- return
- }
-
- var resp *client.Response
- resp, err = req.Execute(ctx)
- if resp != nil {
- result.OData = resp.OData
- result.HttpResponse = resp.Response
- }
- if err != nil {
- return
- }
-
- var model Site
- result.Model = &model
- if err = resp.Unmarshal(result.Model); err != nil {
- return
- }
-
- return
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_updatetags.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_updatetags.go
deleted file mode 100644
index d6fc0f56612f..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/method_updatetags.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package site
-
-import (
- "context"
- "net/http"
-
- "github.com/hashicorp/go-azure-sdk/sdk/client"
- "github.com/hashicorp/go-azure-sdk/sdk/odata"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type UpdateTagsOperationResponse struct {
- HttpResponse *http.Response
- OData *odata.OData
- Model *Site
-}
-
-// UpdateTags ...
-func (c SiteClient) UpdateTags(ctx context.Context, id SiteId, input TagsObject) (result UpdateTagsOperationResponse, err error) {
- opts := client.RequestOptions{
- ContentType: "application/json; charset=utf-8",
- ExpectedStatusCodes: []int{
- http.StatusOK,
- },
- HttpMethod: http.MethodPatch,
- Path: id.ID(),
- }
-
- req, err := c.Client.NewRequest(ctx, opts)
- if err != nil {
- return
- }
-
- if err = req.Marshal(input); err != nil {
- return
- }
-
- var resp *client.Response
- resp, err = req.Execute(ctx)
- if resp != nil {
- result.OData = resp.OData
- result.HttpResponse = resp.Response
- }
- if err != nil {
- return
- }
-
- var model Site
- result.Model = &model
- if err = resp.Unmarshal(result.Model); err != nil {
- return
- }
-
- return
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_site.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_site.go
deleted file mode 100644
index bd5f7fe6a7a5..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_site.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package site
-
-import (
- "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata"
-)
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type Site struct {
- Id *string `json:"id,omitempty"`
- Location string `json:"location"`
- Name *string `json:"name,omitempty"`
- Properties *SitePropertiesFormat `json:"properties,omitempty"`
- SystemData *systemdata.SystemData `json:"systemData,omitempty"`
- Tags *map[string]string `json:"tags,omitempty"`
- Type *string `json:"type,omitempty"`
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_sitepropertiesformat.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_sitepropertiesformat.go
deleted file mode 100644
index 8c4dd99fde45..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_sitepropertiesformat.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package site
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type SitePropertiesFormat struct {
- NetworkFunctions *[]SubResource `json:"networkFunctions,omitempty"`
- ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_subresource.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_subresource.go
deleted file mode 100644
index 1c27266a3117..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_subresource.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package site
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type SubResource struct {
- Id string `json:"id"`
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_tagsobject.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_tagsobject.go
deleted file mode 100644
index 75ebb164c0a2..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/model_tagsobject.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package site
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-type TagsObject struct {
- Tags *map[string]string `json:"tags,omitempty"`
-}
diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/version.go
deleted file mode 100644
index 1e248ebd2d2d..000000000000
--- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site/version.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package site
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
-
-const defaultApiVersion = "2022-11-01"
-
-func userAgent() string {
- return "hashicorp/go-azure-sdk/site/2022-11-01"
-}