Update PROMPT to JOKE_PROMPT to fix Azure bad request

This commit is contained in:
Isaac Johnson 2026-09-21 06:22:51 -05:00
parent 7251d539ed
commit bb95fcbc97
34 changed files with 16674 additions and 4 deletions

2
app.py
View File

@ -7,7 +7,7 @@ app = Flask(__name__)
OLLAMA_HOST = os.environ.get("OLLAMA_HOST", "http://harbor.freshbrewed.science:11444") OLLAMA_HOST = os.environ.get("OLLAMA_HOST", "http://harbor.freshbrewed.science:11444")
OLLAMA_MODEL = os.environ.get("OLLAMA_MODEL", "gemma4:e4b") OLLAMA_MODEL = os.environ.get("OLLAMA_MODEL", "gemma4:e4b")
PROMPT = os.environ.get("PROMPT", "tell me a dad joke about programming") PROMPT = os.environ.get("JOKE_PROMPT", "tell me a dad joke about programming")
PORT = int(os.environ.get("PORT", "80")) PORT = int(os.environ.get("PORT", "80"))
def get_app_version(): def get_app_version():

14
docker-compose.yaml Normal file
View File

@ -0,0 +1,14 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: dadjoke-app
ports:
- "${HOST_PORT:-80}:80"
environment:
- OLLAMA_HOST=http://harbor.freshbrewed.science:11444
- OLLAMA_MODEL=gemma4:e4b
- JOKE_PROMPT=tell me a dad joke about programming
- PORT=80
restart: unless-stopped

4
function_app.py Normal file
View File

@ -0,0 +1,4 @@
import azure.functions as func
from app import app as flask_app
app = func.WsgiFunctionApp(app=flask_app, http_auth_level=func.AuthLevel.ANONYMOUS)

View File

@ -39,8 +39,8 @@ spec:
value: {{ .Values.env.OLLAMA_HOST | quote }} value: {{ .Values.env.OLLAMA_HOST | quote }}
- name: OLLAMA_MODEL - name: OLLAMA_MODEL
value: {{ .Values.env.OLLAMA_MODEL | quote }} value: {{ .Values.env.OLLAMA_MODEL | quote }}
- name: PROMPT - name: JOKE_PROMPT
value: {{ .Values.env.PROMPT | quote }} value: {{ .Values.env.JOKE_PROMPT | quote }}
- name: PORT - name: PORT
value: {{ .Values.env.PORT | quote }} value: {{ .Values.env.PORT | quote }}
livenessProbe: livenessProbe:

View File

@ -29,7 +29,7 @@ service:
env: env:
OLLAMA_HOST: "http://harbor.freshbrewed.science:11444" OLLAMA_HOST: "http://harbor.freshbrewed.science:11444"
OLLAMA_MODEL: "gemma4:e4b" OLLAMA_MODEL: "gemma4:e4b"
PROMPT: "tell me a dad joke about programming" JOKE_PROMPT: "tell me a dad joke about programming"
PORT: "80" PORT: "80"
ingress: ingress:

15
host.json Normal file
View File

@ -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)"
}
}

112
iac/.terraform.lock.hcl Normal file
View File

@ -0,0 +1,112 @@
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.opentofu.org/hashicorp/archive" {
version = "2.8.1"
hashes = [
"h1:+zxWNwWTN6nQH4UsAHVU2dHFeQ1dbyti1imUwXo2UkM=",
"h1:0nQbGAtw2FkzedC/AoP5stVvIEQT7ae04UDUE7K+rkQ=",
"h1:4BH/NzcaIQ+HtfGhBo9boDdYTYLimD9Aw81bXyx4PQ8=",
"h1:6cIzOvUMhFPYYCVpuraJCp1OBKQfIdt+vweg/t90nqY=",
"h1:D0qy1mIABEFzQEwuASo4g+oGRgxodYsHhbU2VzmafkY=",
"h1:Dwonz53sAPonmKnk+YNwbjw0uEatDVPTj/dtfCwBQVw=",
"h1:FQLyzsDwRhDvov/FU4I/HTnt9jdNFivK1hmBVxhgj5Y=",
"h1:FwIDfXJo5yqRq9DjC8u3cXfGVQhHje3bpdxUufTT4wI=",
"h1:M561F8TZn57Si9KJ8ycdyGGOIDSx6uzeILfn3ODTZ7I=",
"h1:Yg4us0ttDVnZnECv/eo1Scg2D00bZ8ENxD47TVt/HYQ=",
"h1:l7EcsA0WkfQ1ylEm7q1xfJei3bUMFriPybZLIuRCkzg=",
"h1:oOm3HeeUHp36HGT2EXEoLX+B3mGz+MIF8BazNsAOB7I=",
"h1:rhohSLLoDQyaUzetRvvlrbjZ2LAEfVCyUdD/Or10jos=",
"h1:wcukYOssMr3IzGWQUMQkX7On5WeBmBTNIpvPsK3ac90=",
"h1:xTRO4rh/BOjz11omsMID2q0MCchmCTX+tgI6v5/OMQw=",
"zh:167dcb2f3dfef941d300e4899c6b1852592e98cd5e20782289369bf0c81512f0",
"zh:1e0bbf0e538631a49746ff23c7008c7de7d0850e4477a1aee7685cc9881a942a",
"zh:4310e3fc60442f17165fef1a97eae8be3778ae9611a526eb5b19647ffbab98bc",
"zh:5700d38d2dbf82f1c88dd72aae3cadd12b177554a4ef99bea9bb949fb1961412",
"zh:69e2209971a4f87e45c01d3e7581f6864abb1502e7c44809b4b0ffdfdc1d3d5d",
"zh:6adbd69f1279d29dfe17fc7eab8e72fffa9ab0c562f87a3f73aaf5d63fe352d8",
"zh:76e3cdadb03e6c8a7a5d535d7b3c2509a7e5ba9c37fac66ca360d271f5dc5c17",
"zh:8a5bb2ce0746b28f12770e473022076c55e32ea942b514150cf2b07fa673d48a",
"zh:9612186dd905850d20144101c722da59a2de660c2bf931a786ac63fe3766f5a6",
"zh:a77922d3edcc1288d52e5d225e0b98d6ae8b3ef8ef4f27a40a6c11136489b886",
"zh:ac70801bfaa2d39e339c39d4989199981b4d4dcbd0cf1c65a9755940ef2a80ee",
"zh:af382792a3ca715ef9f740f18ee1b1c4256e757e93fd5204ab5f6c1757ba2555",
"zh:c2bd89b4fc81883f410851f3e4499ee9b2d14039b97a04a2edc9fb4577bcb38e",
"zh:f9a8ee2c68f67bc6eefbce642594d4fd51247542599bed8ac47ec8139615c2ce",
"zh:fa64f6907c6daf715ad0c435b410fc352567118297f143ee2760230b4592bfde",
]
}
provider "registry.opentofu.org/hashicorp/azurerm" {
version = "4.81.0"
constraints = "~> 4.0"
hashes = [
"h1:+SK0igaGkoHG872vP6Q8Haqfn6bb9f93bpwwtfXQYjo=",
"h1:/BPm6F9H7OA+0YUbYFLzo/11O9JwKyQF9xtqGysP4fM=",
"h1:3GpAIyIEvHp715KDMWwQXR3D5/T6y4ym9guOvnEsTRw=",
"h1:4+KKAPuCkQ4mMcnY8lV9117FEt0IVOFX6sb0i1V0wHQ=",
"h1:CQD+Nc/yArsvbnqSUsRFXSg8dEt1HY9zdzPLHVHZ17s=",
"h1:JfSDFlyoomcxMaesZCqmf4R1AM0x6H2EOQUHTowh2gw=",
"h1:VTqM+VVLaJR7fld2I6kSIecR9J46cP3lpKzZpHHMTvA=",
"h1:aV5LUZ6xHHowYZ9tTk0KeMzaDfwrQC4SBntjq+OQIZk=",
"h1:h0YZJJXvcNEaJSkbLDhK3QjZrCb/zfSpYuM78mCLZpA=",
"h1:hbiwWQ9tZ1ajGcbr+ami9hzLD3EqyO8nOjy5L7l9MxA=",
"h1:lfSfUaLWqBdpAlb6d3KScGGPMyVSKi94nPjviBkqpYU=",
"h1:oEUfYv79aNXEMu5FhiTgwo9lpHcvKtU1pBNY2rjOCeM=",
"h1:sZ4atLmq9quI2eyU4pkf68eWbg194MhgFMZe3iLa9N0=",
"h1:tXnzefiSTHO3DBLBVGZSZ03y7+opr2hwbDpaWnNyQcc=",
"h1:v+SZNctpFiplpLtyKK14QfUo+nTOx2TChVGkhMcP4EQ=",
"zh:00039b380b581a6a2ceb9f6caf2a9f6a963b50d0cbb63effa6faf7933b4b9324",
"zh:0cf3daf3aed4dfc8c3ad9a92113303799ef6977b61e23077173ada1d2355520c",
"zh:3244bb91bcb5b5f4bd8f18a149cbb53cee2b286fda33e3934e363bd15360b5c2",
"zh:3d2aaf5f8085f5c6514353525c2e60e82942d4fa5c0dca51e461b737468d47c5",
"zh:3f93ee9f6066ed22ff1f2fa90bfa0b2a6521bb3c38675b5bc83f217689963a0c",
"zh:44f67168d661504c18da6e00c2cc87cd2c57c1d171a348e4e8e5d18953a8a193",
"zh:5712823959db99c11f56215afa059cc6fc791ae927fce8ecebba454d9f32c240",
"zh:5a85351f237b72e6c2f417e4ff70b96d1f7090012d20cb7655230b60e266e4cf",
"zh:63529f04136918ccfa1bb3e081d33e5cbd9d217efb5376d09179f07d5392b1d3",
"zh:7a8c870fa01019586065094ed96409836c5e03b4e6d9b8a01623f2632173e880",
"zh:a510081c7da2e086cbda0261e86190e7988eb2f078ccac5b3b8d838cbac85c40",
"zh:a6ae0f84089f7f86f0a5db29afb35e84804b61cba1413c2fee1af45d450479f2",
"zh:d25410d042051ce4f3f35d9eb7127a6693d1969e165ecc12fea7b059b562f2a8",
"zh:faf96f32e7bd9bf4886a34635c93e80f512214228531e7548ac5b2e3b93a525d",
"zh:fc915f76beaf9afd0934057a5c5a460846dabfeb5a9a1f4d8b7c7f0aacbfffc8",
]
}
provider "registry.opentofu.org/hashicorp/random" {
version = "3.9.1"
constraints = "~> 3.0"
hashes = [
"h1:38E2VQmQDhws/3AL3D/EzBGuCseepyZRIswAOx8CqoQ=",
"h1:7+qv9kpOpBC9EUPCubnPxh603tu3l9EIMMBkpbt1H1Y=",
"h1:CEQeHfnUDB3uqAkKoEWfWgbj+kpoQHgcuPbAjPzbh+U=",
"h1:HPYO9tf8KUSHqSdz1uOL97MLeaVHPaWPY1JW6tKU19E=",
"h1:KYXiC06Pr3WJcIUbDq9MgdAbInO5zcRyHFqV1x5UcJg=",
"h1:MygjbYH8CrPv8RUe75tZAFmrFNIzQLT45fiyYx7u2tI=",
"h1:RMSARNOw4qZx+VmHYnVMGljsFVfCV1P+nJjKrN2XIOI=",
"h1:U/71jbSbfsfVLxWpSlhyVHh/DnQXQhjoJCGkyongkBA=",
"h1:WwLLvRE1q95CTGxyTjKpctXJ0ooVs9d22JAQS9fC3uo=",
"h1:ZtRBSqoyfQAhngjUjM0NRPtj6NdSJ/JBENFwT8D276s=",
"h1:cfxedZLduhHD1UtqQDjAQZNAEhr/bWDAZ4nU9rSdySg=",
"h1:i45mo4de0QKOreStMqUQ7qyZL3ucFq42l178Fm5/hMU=",
"h1:v3SAJKN4D3dOM95xKwgKGIWELe5nUBbyXdb5HNz7icw=",
"h1:v3vTk/STekrzNc6NG3jL9/05zhvF1QVCgyRRbvSHPcI=",
"h1:zHgFWtRBgOycqhw8HdLSvMVNWGJtIjOAPYOcAdE7cL0=",
"zh:09aaf19b0d22726d2378e0e89fbbefc183494d7bd585759d6c4e69ba50951a2f",
"zh:31575ca9bc0db20337096d178ea73bce3ebca343ed071c67f78cf39f800c9ec6",
"zh:624fb6ed552abc34a5aaac41e76a373da65ac08e524b09b672f29c60e6ac896a",
"zh:6a4760d55132b9750ac1a04f6fc32e247034daa999f71452dba9cbca225a529a",
"zh:768a6047cfb8958e7b0b120c580aa3de6624a7fbb2c56ad6df85cd559ed26ec7",
"zh:8983c788ba660bcb587e64ff9c3e4323515caf78facbe0abe6432e7aff8df893",
"zh:8d570eb026a4f00b58a1d36be0ce3c13adf4d973efcd4162b05cb295bbc14257",
"zh:a2259540854d5f699c36b89244fb202ebb2c219b64669a51072687d04fb47152",
"zh:aaa51d905b0e80a28e02f9bee2cf6c91ffade7389d77ab9198aa12809ed04955",
"zh:afb60995e98573facddfb47baedf7e288408680eb00b5d3df570611758947c72",
"zh:b9a46d852ce53fa037f47537a7de53f37b759ccf211600b7ba44c66ba4b616b7",
"zh:bafcfeeefcd0dfefeff120b655b45edb0497c4717534ffe5201b3cb556d1ffe6",
"zh:c3ac24d397eae054aca2290e20943e0c767592cc661c890850c25ac01829308d",
"zh:eafba4127ebadcc5ed0e427935c66fb5e2da7cfdaae39a66d52f4a50d51faf1e",
"zh:f39d4bce213ed9bba3474bad468136af08ff6c4c33adaafcc10c1f78067adfe3",
]
}

View File

@ -0,0 +1,162 @@
## 2.8.1 (September 11, 2026)
NOTES:
* Upgrade the Go toolchain to 1.26.8. ([#534](https://github.com/hashicorp/terraform-provider-archive/issues/534))
* Update golang.org/x/crypto to v0.56.0, golang.org/x/mod to v0.40.0, and google.golang.org/protobuf to v1.36.12. ([#535](https://github.com/hashicorp/terraform-provider-archive/issues/535))
## 2.8.0 (May 12, 2026)
ENHANCEMENTS:
* Added linux/s390x build target for IBM Z platform support ([#504](https://github.com/hashicorp/terraform-provider-archive/issues/504))
## 2.7.1 (May 12, 2025)
NOTES:
* Update dependencies: ([#425](https://github.com/hashicorp/terraform-provider-archive/pull/425))
## 2.7.0 (December 05, 2024)
FEATURES:
* resource/archive_file: Remove `deprecated` status ([#218](https://github.com/hashicorp/terraform-provider-archive/issues/218))
## 2.6.0 (September 09, 2024)
FEATURES:
* data-source/archive_file: Add support for creating `tar.gz` archive files. ([#277](https://github.com/hashicorp/terraform-provider-archive/issues/277))
* resource/archive_file: Add support for creating `tar.gz` archive files. ([#277](https://github.com/hashicorp/terraform-provider-archive/issues/277))
## 2.5.0 (July 31, 2024)
ENHANCEMENTS:
* data-source/archive_file: Add glob pattern matching support to the `excludes` attribute. ([#354](https://github.com/hashicorp/terraform-provider-archive/issues/354))
* resource/archive_file: Add glob pattern matching support to the `excludes` attribute. ([#354](https://github.com/hashicorp/terraform-provider-archive/issues/354))
## 2.4.2 (January 24, 2024)
BUG FIXES:
* data-source/archive_file: Prevent error when generating archive from source containing symbolically linked directories, and `exclude_symlink_directories` is set to true ([#298](https://github.com/hashicorp/terraform-provider-archive/issues/298))
* resource/archive_file: Prevent error when generating archive from source containing symbolically linked directories, and `exclude_symlink_directories` is set to true ([#298](https://github.com/hashicorp/terraform-provider-archive/issues/298))
* resource/archive_file: Return error when generated archive would be empty ([#298](https://github.com/hashicorp/terraform-provider-archive/issues/298))
* data-source/archive_file: Return error when generated archive would be empty ([#298](https://github.com/hashicorp/terraform-provider-archive/issues/298))
## 2.4.1 (December 18, 2023)
NOTES:
* This release introduces no functional changes. It does however include dependency updates which address upstream CVEs. ([#287](https://github.com/hashicorp/terraform-provider-archive/issues/287))
## 2.4.0 (June 07, 2023)
NOTES:
* This Go module has been updated to Go 1.19 per the [Go support policy](https://golang.org/doc/devel/release.html#policy). Any consumers building on earlier Go versions may experience errors. ([#200](https://github.com/hashicorp/terraform-provider-archive/issues/200))
ENHANCEMENTS:
* data-source/archive_file: Added attribute `exclude_symlink_directories` which will exclude symbolically linked directories from the archive when set to true. Defaults to false ([#183](https://github.com/hashicorp/terraform-provider-archive/issues/183))
* resource/archive_file: Added attribute `exclude_symlink_directories` which will exclude symbolically linked directories from the archive when set to true. Defaults to false ([#183](https://github.com/hashicorp/terraform-provider-archive/issues/183))
BUG FIXES:
* data-source/archive_file: Symbolically linked directories are included in archives by default rather than generating an error ([#183](https://github.com/hashicorp/terraform-provider-archive/issues/183))
* resource/archive_file: Symbolically linked directories are included in archives by default rather than generating an error ([#183](https://github.com/hashicorp/terraform-provider-archive/issues/183))
## 2.3.0 (January 18, 2023)
NOTES:
* Provider has been re-written using the new [`terraform-plugin-framework`](https://www.terraform.io/plugin/framework) ([#170](https://github.com/hashicorp/terraform-provider-archive/pull/170)).
## 2.2.0 (May 04, 2021)
ENHANCEMENTS:
* New opt-in flag to specify the `output_file_mode` to produce more deterministic behavior across operating systems. ([#90](https://github.com/terraform-providers/terraform-provider-archive/issues/90))
DEPENDENCIES:
* Update `github.com/hashicorp/terraform-plugin-sdk/v2` to `v2.6.1` ([#95](https://github.com/terraform-providers/terraform-provider-archive/issues/95))
NOTES:
Changelogs now list all dependency updates in a separate section. These are understood to have no user-facing changes except those detailed in earlier sections.
## 2.1.0 (February 19, 2021)
Binary releases of this provider now include the darwin-arm64 platform. This version contains no further changes.
## 2.0.0 (October 14, 2020)
Binary releases of this provider now include the linux-arm64 platform.
BREAKING CHANGES:
* Upgrade to version 2 of the Terraform Plugin SDK, which drops support for Terraform 0.11. This provider will continue to work as expected for users of Terraform 0.11, which will not download the new version. ([#72](https://github.com/terraform-providers/terraform-provider-archive/issues/72))
BUG FIXES:
* Fixed path bug with exclusions on Windows ([#71](https://github.com/terraform-providers/terraform-provider-archive/issues/71))
## 1.3.0 (September 30, 2019)
NOTES:
* The provider has switched to the standalone TF SDK, there should be no noticeable impact on compatibility. ([#50](https://github.com/terraform-providers/terraform-provider-archive/issues/50))
## 1.2.2 (April 30, 2019)
* This release includes another Terraform SDK upgrade intended to align with that being used for other providers as we prepare for the Core v0.12.0 release. It should have no significant changes in behavior for this provider.
## 1.2.1 (April 12, 2019)
* This release includes only a Terraform SDK upgrade intended to align with that being used for other providers as we prepare for the Core v0.12.0 release. It should have no significant changes in behavior for this provider.
## 1.2.0 (March 20, 2019)
IMPROVEMENTS:
* The provider is now compatible with Terraform v0.12, while retaining compatibility with prior versions.
## 1.1.0 (July 30, 2018)
ENHANCEMENTS:
* Add `excludes` to the `archive_file` data source to exclude files when using `source_dir` ([#18](https://github.com/terraform-providers/terraform-provider-archive/issues/18))
BUG FIXES:
* Fix zip file path names to use forward slash on Windows ([#25](https://github.com/terraform-providers/terraform-provider-archive/issues/25))
* Fix panic in `filepath.Walk` call ([#26](https://github.com/terraform-providers/terraform-provider-archive/issues/26))
## 1.0.3 (March 23, 2018)
BUG FIXES:
* Fix modified time affecting zip contents and causing spurious diffs ([#16](https://github.com/terraform-providers/terraform-provider-archive/issues/16))
## 1.0.2 (March 16, 2018)
BUG FIXES:
* Fix issue with flags not being copied on a single file and regression introduced in 1.0.1 ([#13](https://github.com/terraform-providers/terraform-provider-archive/issues/13))
## 1.0.1 (March 13, 2018)
BUG FIXES:
* Fix issue with flags not being copied in to archive ([#9](https://github.com/terraform-providers/terraform-provider-archive/issues/9))
## 1.0.0 (September 15, 2017)
* No changes from 0.1.0; just adjusting to [the new version numbering scheme](https://www.hashicorp.com/blog/hashicorp-terraform-provider-versioning/).
## 0.1.0 (June 20, 2017)
NOTES:
* Same functionality as that of Terraform 0.9.8. Repacked as part of [Provider Splitout](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/)

View File

@ -0,0 +1,375 @@
Copyright IBM Corp. 2017, 2026
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@ -0,0 +1,116 @@
# Terraform Provider: Archive
The Archive provider interacts with files.
It provides a data source that can create zip or tar.gz archives for individual files or
collections of files.
## Documentation, questions and discussions
Official documentation on how to use this provider can be found on the
[Terraform Registry](https://registry.terraform.io/providers/hashicorp/archive/latest/docs).
In case of specific questions or discussions, please use the
HashiCorp [Terraform Providers Discuss forums](https://discuss.hashicorp.com/c/terraform-providers/31),
in accordance with HashiCorp [Community Guidelines](https://www.hashicorp.com/community-guidelines).
We also provide:
* [Support](.github/SUPPORT.md) page for help when using the provider
* [Contributing](.github/CONTRIBUTING.md) guidelines in case you want to help this project
* [Design](DESIGN.md) documentation to understand the scope and maintenance decisions
The remainder of this document will focus on the development aspects of the provider.
## Compatibility
Compatibility table between this provider,
the [Terraform Plugin Protocol](https://www.terraform.io/plugin/how-terraform-works#terraform-plugin-protocol)
version it implements, and Terraform:
| Archive Provider | Terraform Plugin Protocol | Terraform |
|:----------------------:|:-------------------------:|:---------:|
| `>= 2.x` | `5` | `>= 0.12` |
| `>= 1.2.x`, `<= 1.3.x` | `4`, `5` | `>= 0.11` |
| `<= 1.1.x` | `4` | `<= 0.11` |
## Requirements
* [Terraform](https://www.terraform.io/downloads)
* [Go](https://go.dev/doc/install) (1.26)
* [GNU Make](https://www.gnu.org/software/make/)
* [golangci-lint](https://golangci-lint.run/usage/install/#local-installation) (optional)
## Development
### Building
1. `git clone` this repository and `cd` into its directory
2. `make` will trigger the Golang build
The provided `GNUmakefile` defines additional commands generally useful during development,
like for running tests, generating documentation, code formatting and linting.
Taking a look at it's content is recommended.
### Testing
In order to test the provider, you can run
* `make test` to run provider tests
* `make testacc` to run provider acceptance tests
It's important to note that acceptance tests (`testacc`) will actually spawn
`terraform` and the provider. Read more about they work on the
[official page](https://www.terraform.io/plugin/sdkv2/testing/acceptance-tests).
### Generating documentation
This provider uses [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/)
to generate documentation and store it in the `docs/` directory.
Once a release is cut, the Terraform Registry will download the documentation from `docs/`
and associate it with the release version. Read more about how this works on the
[official page](https://www.terraform.io/registry/providers/docs).
Use `make generate` to ensure the documentation is regenerated with any changes.
### Using a development build
If [running tests and acceptance tests](#testing) isn't enough, it's possible to set up a local terraform configuration
to use a development builds of the provider. This can be achieved by leveraging the Terraform CLI
[configuration file development overrides](https://www.terraform.io/cli/config/config-file#development-overrides-for-provider-developers).
First, use `make install` to place a fresh development build of the provider in your
[`${GOBIN}`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies)
(defaults to `${GOPATH}/bin` or `${HOME}/go/bin` if `${GOPATH}` is not set). Repeat
this every time you make changes to the provider locally.
Then, setup your environment following [these instructions](https://www.terraform.io/plugin/debugging#terraform-cli-development-overrides)
to make your local terraform use your local build.
### Testing GitHub Actions
This project uses [GitHub Actions](https://docs.github.com/en/actions/automating-builds-and-tests) to realize its CI.
Sometimes it might be helpful to locally reproduce the behaviour of those actions,
and for this we use [act](https://github.com/nektos/act). Once installed, you can _simulate_ the actions executed
when opening a PR with:
```shell
# List of workflows for the 'pull_request' action
$ act -l pull_request
# Execute the workflows associated with the `pull_request' action
$ act pull_request
```
## Releasing
The releasable builds are generated from the [build GH workflow](./.github/workflows/build.yml) and the release/promotion process
is completed via internal HashiCorp deployment tooling. Prior to release, the changelog should be updated in `main` with
the changie tool, example:
```sh
changie batch 2.7.2 && changie merge
```
## License
[Mozilla Public License v2.0](./LICENSE)

View File

@ -0,0 +1,278 @@
## 0.3.3 (November 14, 2017)
FEATURES:
* **New Resource:** `azurerm_redis_firewall_rule` ([#529](https://github.com/hashicorp/terraform-provider-azurerm/issues/529))
IMPROVEMENTS:
* authentication: allow using multiple subscriptions for Azure CLI auth ([#445](https://github.com/hashicorp/terraform-provider-azurerm/issues/445))
* core: appending the CloudShell version to the user agent when running within CloudShell ([#483](https://github.com/hashicorp/terraform-provider-azurerm/issues/483))
* `azurerm_app_service` / `azurerm_app_service_plan` - adding validation for the `name` fields ([#528](https://github.com/hashicorp/terraform-provider-azurerm/issues/528))
* `azurerm_container_registry` - Migration: Fixing a crash when the storage_account block is nil ([#551](https://github.com/hashicorp/terraform-provider-azurerm/issues/551))
* `azurerm_lb_nat_rule`: support for floating IP's ([#542](https://github.com/hashicorp/terraform-provider-azurerm/issues/542))
* `azurerm_public_ip` - Clarify the error message for the validation of domain name label ([#485](https://github.com/hashicorp/terraform-provider-azurerm/issues/485))
* `azurerm_network_security_group` - fixing a crash when changes were made outside of Terraform ([#492](https://github.com/hashicorp/terraform-provider-azurerm/issues/492))
* `azurerm_redis_cache`: support for Patch Schedules ([#540](https://github.com/hashicorp/terraform-provider-azurerm/issues/540))
* `azurerm_virtual_machine` - ensuring `vhd_uri` is validated ([#470](https://github.com/hashicorp/terraform-provider-azurerm/issues/470))
* `azurerm_virtual_machine_scale_set`: fixing a crash where accelerated networking isn't returned by the API ([#480](https://github.com/hashicorp/terraform-provider-azurerm/issues/480))
## 0.3.2 (October 30, 2017)
FEATURES:
* **New Resource:** `azurerm_application_gateway` ([#413](https://github.com/hashicorp/terraform-provider-azurerm/issues/413))
IMPROVEMENTS:
- `azurerm_virtual_machine_scale_set` - Add nil check to os disk ([#436](https://github.com/hashicorp/terraform-provider-azurerm/issues/436))
- `azurerm_key_vault` - Increased timeout on dns availability ([#457](https://github.com/hashicorp/terraform-provider-azurerm/issues/457))
- `azurerm_route_table` - Fix issue when routes are computed ([#450](https://github.com/hashicorp/terraform-provider-azurerm/issues/450))
## 0.3.1 (October 21, 2017)
IMPROVEMENTS:
- `azurerm_virtual_machine_scale_set` - Updating this resource with the v11 of the Azure SDK for Go ([#448](https://github.com/hashicorp/terraform-provider-azurerm/issues/448))
## 0.3.0 (October 17, 2017)
UPGRADE NOTES:
- `azurerm_automation_account` - the SKU `Free` has been replaced with `Basic`.
- `azurerm_container_registry` - Azure has updated the SKU from `Basic` to `Classic`, with new `Basic`, `Standard` and `Premium` SKU's introduced.
- `azurerm_container_registry` - the `storage_account` block is now `storage_account_id` and is only required for `Classic` SKU's
- `azurerm_key_vault` - `certificate_permissions`, `key_permissions` and `secret_permissions` have all had the `All` option removed by Azure. Each permission now needs to be specified manually.
* `azurerm_route_table` - `route` is no longer computed
- `azurerm_servicebus_namespace` - The `capacity` field can only be set for `Premium` SKU's
- `azurerm_servicebus_queue` - The `enable_batched_operations` and `support_ordering` fields have been deprecated by Azure.
- `azurerm_servicebus_subscription` - The `dead_lettering_on_filter_evaluation_exceptions` has been removed by Azure.
- `azurerm_servicebus_topic` - The `enable_filtering_messages_before_publishing` field has been removed by Azure.
FEATURES:
* **New Data Source:** `azurerm_builtin_role_definition` ([#384](https://github.com/hashicorp/terraform-provider-azurerm/issues/384))
* **New Data Source:** `azurerm_image` ([#382](https://github.com/hashicorp/terraform-provider-azurerm/issues/382))
* **New Data Source:** `azurerm_key_vault_access_policy` ([#423](https://github.com/hashicorp/terraform-provider-azurerm/issues/423))
* **New Data Source:** `azurerm_platform_image` ([#375](https://github.com/hashicorp/terraform-provider-azurerm/issues/375))
* **New Data Source:** `azurerm_role_definition` ([#414](https://github.com/hashicorp/terraform-provider-azurerm/issues/414))
* **New Data Source:** `azurerm_snapshot` ([#420](https://github.com/hashicorp/terraform-provider-azurerm/issues/420))
* **New Data Source:** `azurerm_subnet` ([#411](https://github.com/hashicorp/terraform-provider-azurerm/issues/411))
* **New Resource:** `azurerm_key_vault_certificate` ([#408](https://github.com/hashicorp/terraform-provider-azurerm/issues/408))
* **New Resource:** `azurerm_role_assignment` ([#414](https://github.com/hashicorp/terraform-provider-azurerm/issues/414))
* **New Resource:** `azurerm_role_definition` ([#414](https://github.com/hashicorp/terraform-provider-azurerm/issues/414))
* **New Resource:** `azurerm_snapshot` ([#420](https://github.com/hashicorp/terraform-provider-azurerm/issues/420))
IMPROVEMENTS:
* Upgrading to v11 of the Azure SDK for Go ([#367](https://github.com/hashicorp/terraform-provider-azurerm/issues/367))
* `azurerm_client_config` - updating the data source to work when using AzureCLI auth ([#393](https://github.com/hashicorp/terraform-provider-azurerm/issues/393))
* `azurerm_container_group` - add support for volume mounts ([#366](https://github.com/hashicorp/terraform-provider-azurerm/issues/366))
* `azurerm_key_vault` - fix a crash when no certificate_permissions are defined ([#374](https://github.com/hashicorp/terraform-provider-azurerm/issues/374))
* `azurerm_key_vault` - waiting for the DNS to propagate ([#401](https://github.com/hashicorp/terraform-provider-azurerm/issues/401))
* `azurerm_managed_disk` - support for creating Managed Disks from Platform Images by supporting "FromImage" ([#399](https://github.com/hashicorp/terraform-provider-azurerm/issues/399))
* `azurerm_managed_disk` - support for creating Encrypted Managed Disks ([#399](https://github.com/hashicorp/terraform-provider-azurerm/issues/399))
* `azurerm_mysql_*` - Ensuring we register the MySQL Resource Provider ([#397](https://github.com/hashicorp/terraform-provider-azurerm/issues/397))
* `azurerm_network_interface` - exposing all of the Private IP Addresses assigned to the NIC ([#409](https://github.com/hashicorp/terraform-provider-azurerm/issues/409))
* `azurerm_network_security_group` / `azurerm_network_security_rule` - refactoring ([#405](https://github.com/hashicorp/terraform-provider-azurerm/issues/405))
* `azurerm_route_table` - removing routes when none are specified ([#403](https://github.com/hashicorp/terraform-provider-azurerm/issues/403))
* `azurerm_route_table` - refactoring `route` from a Set to a List ([#402](https://github.com/hashicorp/terraform-provider-azurerm/issues/402))
* `azurerm_route` - refactoring `route` from a Set to a List ([#402](https://github.com/hashicorp/terraform-provider-azurerm/issues/402))
* `azurerm_storage_account` - support for File Encryption ([#363](https://github.com/hashicorp/terraform-provider-azurerm/issues/363))
* `azurerm_storage_account` - support for Custom Domain ([#363](https://github.com/hashicorp/terraform-provider-azurerm/issues/363))
* `azurerm_storage_account` - splitting the storage account Tier and Replication out into separate fields ([#363](https://github.com/hashicorp/terraform-provider-azurerm/issues/363))
- `azurerm_storage_account` - returning a user friendly error when trying to provision a Blob Storage Account with ZRS redundancy ([#421](https://github.com/hashicorp/terraform-provider-azurerm/issues/421))
* `azurerm_subnet` - making it possible to remove Network Security Groups / Route Tables ([#411](https://github.com/hashicorp/terraform-provider-azurerm/issues/411))
* `azurerm_virtual_machine` - fixing a bug where `additional_unattend_config.content` was being updated unintentionally ([#377](https://github.com/hashicorp/terraform-provider-azurerm/issues/377))
* `azurerm_virtual_machine` - switching to use Lists instead of Sets ([#426](https://github.com/hashicorp/terraform-provider-azurerm/issues/426))
* `azurerm_virtual_machine_scale_set` - fixing a bug where `additional_unattend_config.content` was being updated unintentionally ([#377](https://github.com/hashicorp/terraform-provider-azurerm/issues/377))
* `azurerm_virtual_machine_scale_set` - support for multiple network profiles ([#378](https://github.com/hashicorp/terraform-provider-azurerm/issues/378))
## 0.2.2 (September 28, 2017)
FEATURES:
* **New Resource:** `azurerm_key_vault_key` ([#356](https://github.com/hashicorp/terraform-provider-azurerm/issues/356))
* **New Resource:** `azurerm_log_analytics_workspace` ([#331](https://github.com/hashicorp/terraform-provider-azurerm/issues/331))
* **New Resource:** `azurerm_mysql_configuration` ([#352](https://github.com/hashicorp/terraform-provider-azurerm/issues/352))
* **New Resource:** `azurerm_mysql_database` ([#352](https://github.com/hashicorp/terraform-provider-azurerm/issues/352))
* **New Resource:** `azurerm_mysql_firewall_rule` ([#352](https://github.com/hashicorp/terraform-provider-azurerm/issues/352))
* **New Resource:** `azurerm_mysql_server` ([#352](https://github.com/hashicorp/terraform-provider-azurerm/issues/352))
IMPROVEMENTS:
* Updating the provider initialization & adding a `skip_credentials_validation` field to the provider for some advanced scenarios ([#322](https://github.com/hashicorp/terraform-provider-azurerm/issues/322))
## 0.2.1 (September 25, 2017)
FEATURES:
* **New Resource:** `azurerm_automation_account` ([#257](https://github.com/hashicorp/terraform-provider-azurerm/issues/257))
* **New Resource:** `azurerm_automation_credential` ([#257](https://github.com/hashicorp/terraform-provider-azurerm/issues/257))
* **New Resource:** `azurerm_automation_runbook` ([#257](https://github.com/hashicorp/terraform-provider-azurerm/issues/257))
* **New Resource:** `azurerm_automation_schedule` ([#257](https://github.com/hashicorp/terraform-provider-azurerm/issues/257))
* **New Resource:** `azurerm_app_service` ([#344](https://github.com/hashicorp/terraform-provider-azurerm/issues/344))
IMPROVEMENTS:
* `azurerm_client_config` - adding `service_principal_application_id` ([#348](https://github.com/hashicorp/terraform-provider-azurerm/issues/348))
* `azurerm_key_vault` - adding `application_id` and `certificate_permissions` ([#348](https://github.com/hashicorp/terraform-provider-azurerm/issues/348))
BUG FIXES:
* `azurerm_virtual_machine_scale_set` - fix panic with `additional_unattend_config` block ([#266](https://github.com/hashicorp/terraform-provider-azurerm/issues/266))
## 0.2.0 (September 15, 2017)
FEATURES:
* **Support for authenticating using the Azure CLI** ([#316](https://github.com/hashicorp/terraform-provider-azurerm/issues/316))
* **New Resource:** `azurerm_container_group` ([#333](https://github.com/hashicorp/terraform-provider-azurerm/issues/333)] [[#311](https://github.com/hashicorp/terraform-provider-azurerm/issues/311)] [[#338](https://github.com/hashicorp/terraform-provider-azurerm/issues/338))
IMPROVEMENTS:
* `azurerm_app_service_plan` - support for Linux App Service Plans ([#332](https://github.com/hashicorp/terraform-provider-azurerm/issues/332))
* `azurerm_postgresql_server` - supporting additional storage sizes ([#239](https://github.com/hashicorp/terraform-provider-azurerm/issues/239))
* `azurerm_public_ip` - verifying the ID is valid before importing ([#320](https://github.com/hashicorp/terraform-provider-azurerm/issues/320))
* `azurerm_sql_server` - verifying the name is valid before creating ([#323](https://github.com/hashicorp/terraform-provider-azurerm/issues/323))
* `resource_group_name` - validation has been added to all resources that use this attribute ([#330](https://github.com/hashicorp/terraform-provider-azurerm/issues/330))
## 0.1.7 (September 11, 2017)
FEATURES:
* **New Resource:** `azurerm_postgresql_configuration` ([#210](https://github.com/hashicorp/terraform-provider-azurerm/issues/210))
* **New Resource:** `azurerm_postgresql_database` ([#210](https://github.com/hashicorp/terraform-provider-azurerm/issues/210))
* **New Resource:** `azurerm_postgresql_firewall_rule` ([#210](https://github.com/hashicorp/terraform-provider-azurerm/issues/210))
* **New Resource:** `azurerm_postgresql_server` ([#210](https://github.com/hashicorp/terraform-provider-azurerm/issues/210))
IMPROVEMENTS:
* `azurerm_cdn_endpoint` - defaulting the `http_port` and `https_port` ([#301](https://github.com/hashicorp/terraform-provider-azurerm/issues/301))
* `azurerm_cosmos_db_account`: allow setting the Kind to MongoDB/GlobalDocumentDB ([#299](https://github.com/hashicorp/terraform-provider-azurerm/issues/299))
## 0.1.6 (August 31, 2017)
FEATURES:
* **New Data Source**: `azurerm_subscription` ([#285](https://github.com/hashicorp/terraform-provider-azurerm/issues/285))
* **New Resource:** `azurerm_app_service_plan` ([#1](https://github.com/hashicorp/terraform-provider-azurerm/issues/1))
* **New Resource:** `azurerm_eventgrid_topic` ([#260](https://github.com/hashicorp/terraform-provider-azurerm/issues/260))
* **New Resource:** `azurerm_key_vault_secret` ([#269](https://github.com/hashicorp/terraform-provider-azurerm/issues/269))
IMPROVEMENTS:
* `azurerm_image` - added a default to the `caching` field ([#259](https://github.com/hashicorp/terraform-provider-azurerm/issues/259))
* `azurerm_key_vault` - validation for the `name` field ([#270](https://github.com/hashicorp/terraform-provider-azurerm/issues/270))
* `azurerm_network_interface` - support for multiple IP Configurations / setting the Primary IP Configuration ([#245](https://github.com/hashicorp/terraform-provider-azurerm/issues/245))
* `azurerm_resource_group` - poll until the resource group is created (by migrating to the Azure SDK for Go) ([#289](https://github.com/hashicorp/terraform-provider-azurerm/issues/289))
* `azurerm_search_service` - migrating to use the Azure SDK for Go ([#283](https://github.com/hashicorp/terraform-provider-azurerm/issues/283))
* `azurerm_sql_*` - ensuring deleted resources are detected ([#289](https://github.com/hashicorp/terraform-provider-azurerm/issues/289)] / [[#255](https://github.com/hashicorp/terraform-provider-azurerm/issues/255))
* `azurerm_sql_database` - Import Support ([#289](https://github.com/hashicorp/terraform-provider-azurerm/issues/289))
* `azurerm_sql_database` - migrating to using the Azure SDK for Go ([#289](https://github.com/hashicorp/terraform-provider-azurerm/issues/289))
* `azurerm_sql_firewall_rule` - migrating to using the Azure SDK for Go ([#289](https://github.com/hashicorp/terraform-provider-azurerm/issues/289))
* `azurerm_sql_server` - added checks to handle `name` not being globally unique ([#189](https://github.com/hashicorp/terraform-provider-azurerm/issues/189))
* `azurerm_sql_server` - making `administrator_login` `ForceNew` ([#189](https://github.com/hashicorp/terraform-provider-azurerm/issues/189))
* `azurerm_sql_server` - migrate to using the azure-sdk-for-go ([#189](https://github.com/hashicorp/terraform-provider-azurerm/issues/189))
* `azurerm_virtual_machine` - Force recreation if `storage_data_disk`.`create_option` changes ([#240](https://github.com/hashicorp/terraform-provider-azurerm/issues/240))
* `azurerm_virtual_machine_scale_set` - Fix address issue when setting the `winrm` block ([#271](https://github.com/hashicorp/terraform-provider-azurerm/issues/271))
* updating to `v10.3.0-beta` of the Azure SDK for Go ([#258](https://github.com/hashicorp/terraform-provider-azurerm/issues/258))
* Removing the (now unused) Riviera SDK ([#289](https://github.com/hashicorp/terraform-provider-azurerm/issues/289)] [[#291](https://github.com/hashicorp/terraform-provider-azurerm/issues/291))
BUG FIXES:
* `azurerm_cosmosdb_account` - fixing the validation on the name field ([#263](https://github.com/hashicorp/terraform-provider-azurerm/issues/263))
* `azurerm_sql_server` - handle deleted servers correctly ([#189](https://github.com/hashicorp/terraform-provider-azurerm/issues/189))
* Fixing the `Microsoft.Insights` Resource Provider Registration ([#282](https://github.com/hashicorp/terraform-provider-azurerm/issues/282))
## 0.1.5 (August 09, 2017)
IMPROVEMENTS:
* `azurerm_sql_*` - upgrading to version `2014-04-01` of the SQL API's ([#201](https://github.com/hashicorp/terraform-provider-azurerm/issues/201))
* `azurerm_virtual_machine` - support for the `Windows_Client` Hybrid Use Benefit type ([#212](https://github.com/hashicorp/terraform-provider-azurerm/issues/212))
* `azurerm_virtual_machine_scale_set` - support for custom images and managed disks ([#203](https://github.com/hashicorp/terraform-provider-azurerm/issues/203))
BUG FIXES:
* `azurerm_sql_database` - fixing creating a DB with a PointInTimeRestore ([#197](https://github.com/hashicorp/terraform-provider-azurerm/issues/197))
* `azurerm_virtual_machine` - fix a crash when the properties for a network inteface aren't returned ([#208](https://github.com/hashicorp/terraform-provider-azurerm/issues/208))
* `azurerm_virtual_machine` - changes to custom data should force new resource ([#211](https://github.com/hashicorp/terraform-provider-azurerm/issues/211))
* `azurerm_virtual_machine` - fixes a crash caused by an empty `os_profile_windows_config` block ([#222](https://github.com/hashicorp/terraform-provider-azurerm/issues/222))
* Checking to ensure the HTTP Response isn't `nil` before accessing it (fixes ([#200](https://github.com/hashicorp/terraform-provider-azurerm/issues/200)]) [[#204](https://github.com/hashicorp/terraform-provider-azurerm/issues/204))
## 0.1.4 (July 26, 2017)
BUG FIXES:
* `azurerm_dns_*` - upgrading to version `2016-04-01` of the Azure DNS API by switching from Riviera -> Azure SDK for Go ([#192](https://github.com/hashicorp/terraform-provider-azurerm/issues/192))
## 0.1.3 (July 21, 2017)
FEATURES:
* **New Resource:** `azurerm_dns_ptr_record` ([#141](https://github.com/hashicorp/terraform-provider-azurerm/issues/141))
* **New Resource:**`azurerm_image` ([#8](https://github.com/hashicorp/terraform-provider-azurerm/issues/8))
* **New Resource:** `azurerm_servicebus_queue` ([#151](https://github.com/hashicorp/terraform-provider-azurerm/issues/151))
IMPROVEMENTS:
* `azurerm_client_config` - added a `service_principal_object_id` attribute to the data source ([#175](https://github.com/hashicorp/terraform-provider-azurerm/issues/175))
* `azurerm_search_service` - added import support ([#172](https://github.com/hashicorp/terraform-provider-azurerm/issues/172))
* `azurerm_servicebus_topic` - added a `status` field to allow disabling the topic ([#150](https://github.com/hashicorp/terraform-provider-azurerm/issues/150))
* `azurerm_storage_account` - Added support for Require secure transfer ([#167](https://github.com/hashicorp/terraform-provider-azurerm/issues/167))
* `azurerm_storage_table` - updating the name validation ([#143](https://github.com/hashicorp/terraform-provider-azurerm/issues/143))
* `azurerm_virtual_machine` - making `admin_password` optional for Linux VM's ([#154](https://github.com/hashicorp/terraform-provider-azurerm/issues/154))
* `azurerm_virtual_machine_scale_set` - adding a `plan` block for Marketplace images ([#161](https://github.com/hashicorp/terraform-provider-azurerm/issues/161))
## 0.1.2 (June 29, 2017)
FEATURES:
* **New Data Source:** `azurerm_managed_disk` ([#121](https://github.com/hashicorp/terraform-provider-azurerm/issues/121))
* **New Resource:** `azurerm_application_insights` ([#3](https://github.com/hashicorp/terraform-provider-azurerm/issues/3))
* **New Resource:** `azurerm_cosmosdb_account` ([#108](https://github.com/hashicorp/terraform-provider-azurerm/issues/108))
* `azurerm_network_interface` now supports import ([#119](https://github.com/hashicorp/terraform-provider-azurerm/issues/119))
IMPROVEMENTS:
* Ensuring consistency in when storing the `location` field in the state for the `azurerm_availability_set`, `azurerm_express_route_circuit`, `azurerm_load_balancer`, `azurerm_local_network_gateway`, `azurerm_managed_disk`, `azurerm_network_security_group`
`azurerm_public_ip`, `azurerm_resource_group`, `azurerm_route_table`, `azurerm_storage_account`, `azurerm_virtual_machine` and `azurerm_virtual_network` resources ([#123](https://github.com/hashicorp/terraform-provider-azurerm/issues/123))
* `azurerm_redis_cache` - now supports backup settings for Premium Redis Cache's ([#130](https://github.com/hashicorp/terraform-provider-azurerm/issues/130))
* `azurerm_storage_account` - exposing a formatted Connection String for Blob access ([#142](https://github.com/hashicorp/terraform-provider-azurerm/issues/142))
BUG FIXES:
* `azurerm_cdn_endpoint` - fixing update of the `origin_host_header` ([#134](https://github.com/hashicorp/terraform-provider-azurerm/issues/134))
* `azurerm_container_service` - exposes the FQDN of the `master_profile` as a computed field ([#125](https://github.com/hashicorp/terraform-provider-azurerm/issues/125))
* `azurerm_key_vault` - fixing import / the validation on Access Policies ([#124](https://github.com/hashicorp/terraform-provider-azurerm/issues/124))
* `azurerm_network_interface` - Normalizing the location field in the state ([#122](https://github.com/hashicorp/terraform-provider-azurerm/issues/122))
* `azurerm_network_interface` - fixing a crash when importing a NIC with a Public IP ([#128](https://github.com/hashicorp/terraform-provider-azurerm/issues/128))
* `azurerm_network_security_rule`: `network_security_group_name` is now `ForceNew` ([#138](https://github.com/hashicorp/terraform-provider-azurerm/issues/138))
* `azurerm_subnet` now correctly detects changes to Network Securtiy Groups and Routing Table's ([#113](https://github.com/hashicorp/terraform-provider-azurerm/issues/113))
* `azurerm_virtual_machine_scale_set` - making `storage_profile_os_disk`.`name` optional ([#129](https://github.com/hashicorp/terraform-provider-azurerm/issues/129))
## 0.1.1 (June 21, 2017)
BUG FIXES:
* Sort ResourceID.Path keys for consistent output ([#116](https://github.com/hashicorp/terraform-provider-azurerm/issues/116))
## 0.1.0 (June 20, 2017)
BACKWARDS INCOMPATIBILITIES / NOTES:
FEATURES:
* **New Data Source:** `azurerm_resource_group` [[#15022](https://github.com/hashicorp/terraform-provider-azurerm/issues/15022)](https://github.com/hashicorp/terraform/pull/15022)
IMPROVEMENTS:
* Add diff supress func to endpoint_location [[#15094](https://github.com/hashicorp/terraform-provider-azurerm/issues/15094)](https://github.com/hashicorp/terraform/pull/15094)
BUG FIXES:
* Fixing the Deadlock issue ([#6](https://github.com/hashicorp/terraform-provider-azurerm/issues/6))

View File

@ -0,0 +1,375 @@
Copyright (c) 2017 HashiCorp, Inc.
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@ -0,0 +1,63 @@
<a href="https://terraform.io">
<img src=".github/tf.png" alt="Terraform logo" title="Terraform" align="left" height="50" />
</a>
# Terraform Provider for Azure (Resource Manager)
The AzureRM Terraform Provider allows managing resources within Azure Resource Manager.
When using version 4.0 of the AzureRM Provider we recommend using the latest version of Terraform Core ([the latest version can be found here](https://developer.hashicorp.com/terraform/install)).
* [Terraform Website](https://www.terraform.io)
* [AzureRM Provider Documentation](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs)
* [AzureRM Provider Usage Examples](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples)
* [Slack Workspace for Contributors](https://terraform-azure.slack.com) ([Request Invite](https://join.slack.com/t/terraform-azure/shared_invite/zt-3qcv2dj6v-aKas6O6FSBZaxSSZph~Uvg))
## Usage Example
```hcl
# 1. Specify the version of the AzureRM Provider to use
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=4.0.0"
}
}
}
# 2. Configure the AzureRM Provider
provider "azurerm" {
# The AzureRM Provider supports authenticating using via the Azure CLI, a Managed Identity
# and a Service Principal. More information on the authentication methods supported by
# the AzureRM Provider can be found here:
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#authenticating-to-azure
# The features block allows changing the behaviour of the Azure Provider, more
# information can be found here:
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/features-block
features {}
}
# 3. Create a resource group
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
# 4. Create a virtual network within the resource group
resource "azurerm_virtual_network" "example" {
name = "example-network"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
address_space = ["10.0.0.0/16"]
}
```
* [Usage documentation for the AzureRM Provider can be found in the Terraform Registry](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs).
* [Learn more about Terraform and the AzureRM Provider on HashiCorp Learn](https://learn.hashicorp.com/collections/terraform/azure-get-started).
* [Additional examples can be found in the `./examples` folder within this repository](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples).
## Developing & Contributing to the Provider
The [DEVELOPER.md](DEVELOPER.md) file is a basic outline on how to build and develop the provider while more detailed guides geared towards contributors can be found in the [`/contributing`](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/contributing) directory of this repository.

View File

@ -0,0 +1,317 @@
## 3.9.1 (September 11, 2026)
NOTES:
* Upgrade the Go toolchain to 1.26.8. ([#812](https://github.com/hashicorp/terraform-provider-random/issues/812))
* Update golang.org/x/mod to v0.40.0 and google.golang.org/protobuf to v1.36.12. ([#814](https://github.com/hashicorp/terraform-provider-random/issues/814))
## 3.9.0 (May 12, 2026)
FEATURES:
* resource/random_bytes: add ephemeral random_bytes resource ([#711](https://github.com/hashicorp/terraform-provider-random/issues/711))
ENHANCEMENTS:
* Added linux/s390x build target for IBM Z platform support ([#784](https://github.com/hashicorp/terraform-provider-random/issues/784))
BUG FIXES:
* resource/random_password, resource/random_string: Fix UTF-8 character handling to correctly count characters instead of bytes when using multi-byte UTF-8 characters in override_special ([#741](https://github.com/hashicorp/terraform-provider-random/issues/741))
## 3.8.1 (January 27, 2026)
NOTES:
* This release introduces no functional changes but has been signed with a valid certificate for the windows binary. ([#749](https://github.com/hashicorp/terraform-provider-random/issues/749))
## 3.8.0 (January 12, 2026)
ENHANCEMENTS:
* Add uuid4 and uuid7 resources to generate valid random uuids of the appropriate version ([#402](https://github.com/hashicorp/terraform-provider-random/issues/402))
## 3.7.2 (April 22, 2025)
NOTES:
* Update dependencies ([#683](https://github.com/hashicorp/terraform-provider-random/issues/683))
## 3.7.1 (February 25, 2025)
NOTES:
* New [ephemeral resource](https://developer.hashicorp.com/terraform/language/resources/ephemeral) `random_password` now supports [ephemeral values](https://developer.hashicorp.com/terraform/language/values/variables#exclude-values-from-state). ([#625](https://github.com/hashicorp/terraform-provider-random/issues/625))
FEATURES:
* ephemeral/random_password: New ephemeral resource that generates a password string. When used in combination with a managed resource write-only attribute, Terraform will not store the password in the plan or state file. ([#625](https://github.com/hashicorp/terraform-provider-random/issues/625))
## 3.7.0 (February 25, 2025)
NOTES:
* New [ephemeral resource](https://developer.hashicorp.com/terraform/language/resources/ephemeral) `random_password` now supports [ephemeral values](https://developer.hashicorp.com/terraform/language/values/variables#exclude-values-from-state). ([#625](https://github.com/hashicorp/terraform-provider-random/issues/625))
FEATURES:
* ephemeral/random_password: New ephemeral resource that generates a password string. When used in combination with a managed resource write-only attribute, Terraform will not store the password in the plan or state file. ([#625](https://github.com/hashicorp/terraform-provider-random/issues/625))
## 3.7.0-alpha1 (February 13, 2025)
NOTES:
* all: This release is being used to test new build and release actions.
## 3.6.3 (September 11, 2024)
NOTES:
* all: This release introduces no functional changes. It does however include dependency updates which address upstream CVEs. ([#604](https://github.com/hashicorp/terraform-provider-random/issues/604))
## 3.6.2 (May 21, 2024)
NOTES:
* resource/random_pet: Results have been updated to the latest upstream petname data ([#581](https://github.com/hashicorp/terraform-provider-random/issues/581))
## 3.6.1 (April 16, 2024)
BUG FIXES:
* all: Prevent `keepers` from triggering an in-place update following import ([#385](https://github.com/hashicorp/terraform-provider-random/issues/385))
* resource/random_shuffle: Prevent inconsistent result after apply when result_count is set to 0 ([#409](https://github.com/hashicorp/terraform-provider-random/issues/409))
* provider/random_password: Fix bug which causes panic when special, upper, lower and number/numeric are all false ([#551](https://github.com/hashicorp/terraform-provider-random/issues/551))
* provider/random_string: Fix bug which causes panic when special, upper, lower and number/numeric are all false ([#551](https://github.com/hashicorp/terraform-provider-random/issues/551))
## 3.6.0 (December 04, 2023)
FEATURES:
* resource/random_bytes: New resource that generates an array of random bytes intended to be used as key or secret ([#272](https://github.com/hashicorp/terraform-provider-random/issues/272))
## 3.5.1 (April 12, 2023)
BUG FIXES:
* resource/random_password: Prevent error with `bcrypt` by truncating the bytes that are hashed to a maximum length of 72 ([#397](https://github.com/hashicorp/terraform-provider-random/issues/397))
## 3.5.0 (April 11, 2023)
NOTES:
* This Go module has been updated to Go 1.19 per the [Go support policy](https://golang.org/doc/devel/release.html#policy). Any consumers building on earlier Go versions may experience errors. ([#378](https://github.com/hashicorp/terraform-provider-random/issues/378))
## 3.4.3 (September 08, 2022)
NOTES:
* resource/random_password: The values for `lower`, `number`, `special`, `upper`, `min_lower`, `min_numeric`, `min_special`, `min_upper` and `length` could be null if the resource was imported using version 3.3.1 or before. The value for `length` will be automatically calculated and assigned and default values will be assigned for the other attributes listed after this upgrade ([#313](https://github.com/hashicorp/terraform-provider-random/pull/313))
* resource/random_string: The values for `lower`, `number`, `special`, `upper`, `min_lower`, `min_numeric`, `min_special`, `min_upper` and `length` could be null if the resource was imported using version 3.3.1 or before. The value for `length` will be automatically calculated and assigned and default values will be assigned for the other attributes listed after this upgrade ([#313](https://github.com/hashicorp/terraform-provider-random/pull/313))
* resource/random_password: If the resource was created between versions 3.4.0 and 3.4.2, the `bcrypt_hash` value would not correctly verify against the `result` value. Affected resources will automatically regenerate a valid `bcrypt_hash` after this upgrade. ([#308](https://github.com/hashicorp/terraform-provider-random/pull/308))
* resource/random_password: The `override_special` attribute may show a plan difference from empty string (`""`) to `null` if previously applied with version 3.4.2. The plan should show this as an in-place update and it should occur only once after upgrading. ([#312](https://github.com/hashicorp/terraform-provider-random/pull/312))
* resource/random_string: The `override_special` attribute may show a plan difference from empty string (`""`) to `null` if previously applied with version 3.4.2. The plan should show this as an in-place update and it should occur only once after upgrading. ([#312](https://github.com/hashicorp/terraform-provider-random/pull/312))
BUG FIXES:
* resource/random_password: Assign default values to `lower`, `number`, `special`, `upper`, `min_lower`, `min_numeric`, `min_special` and `min_upper` if null. Assign length of `result` to `length` if null ([#313](https://github.com/hashicorp/terraform-provider-random/pull/313))
* resource/random_string: Assign default values to `lower`, `number`, `special`, `upper`, `min_lower`, `min_numeric`, `min_special` and `min_upper` if null. Assign length of `result` to `length` if null ([#313](https://github.com/hashicorp/terraform-provider-random/pull/313))
* resource/random_password: Fixed incorrect `bcrypt_hash` generation since version 3.4.0 ([#308](https://github.com/hashicorp/terraform-provider-random/pull/308))
* resource/random_password: Prevented difference with `override_special` when upgrading from version 3.3.2 and earlier ([#312](https://github.com/hashicorp/terraform-provider-random/pull/312))
* resource/random_string: Prevented difference with `override_special` when upgrading from version 3.3.2 and earlier ([#312](https://github.com/hashicorp/terraform-provider-random/pull/312))
## 3.4.2 (September 02, 2022)
BUG FIXES:
* all: Prevent `keeper` with `null` values from forcing replacement ([305](https://github.com/hashicorp/terraform-provider-random/pull/305)).
* resource/random_password: During upgrade state, ensure `min_upper` is populated ([304](https://github.com/hashicorp/terraform-provider-random/pull/304)).
* resource/random_string: During upgrade state, ensure `min_upper` is populated ([304](https://github.com/hashicorp/terraform-provider-random/pull/304)).
## 3.4.1 (August 31, 2022)
BUG FIXES:
* resource/random_password: During attribute plan modifier, only return error if `number` and `numeric` are both present and do not match ([301](https://github.com/hashicorp/terraform-provider-random/pull/301)).
* resource/random_string: During attribute plan modifier, only return error if `number` and `numeric` are both present and do not match ([301](https://github.com/hashicorp/terraform-provider-random/pull/301)).
## 3.4.0 (August 30, 2022)
NOTES:
* Provider has been re-written using the new [`terraform-plugin-framework`](https://www.terraform.io/plugin/framework) ([#177](https://github.com/hashicorp/terraform-provider-random/pull/177)).
* resource/random_password: `number` was deprecated in [v3.3.0](https://github.com/hashicorp/terraform-provider-random/releases/tag/v3.3.0) and will be removed in the next major release.
* resource/random_string: `number` was deprecated in [v3.3.0](https://github.com/hashicorp/terraform-provider-random/releases/tag/v3.3.0) and will be removed in the next major release.
## 3.3.2 (June 23, 2022)
BUG FIXES:
* resource/random_password: When importing set defaults for all attributes that have a default defined ([256](https://github.com/hashicorp/terraform-provider-random/pull/256)).
* resource/random_string: When importing set defaults for all attributes that have a default defined ([256](https://github.com/hashicorp/terraform-provider-random/pull/256)).
## 3.3.1 (June 07, 2022)
BUG FIXES:
* resource/random_password: During schema upgrade, copy value of attribute `number` to attribute `numeric`, only if said value is a boolean (i.e. not `null`) ([262](https://github.com/hashicorp/terraform-provider-random/pull/262))
* resource/random_string: During schema upgrade, copy value of attribute `number` to attribute `numeric`, only if said value is a boolean (i.e. not `null`) ([262](https://github.com/hashicorp/terraform-provider-random/pull/262))
## 3.3.0 (June 06, 2022)
ENHANCEMENTS:
* resource/random_password: `number` is now deprecated and `numeric` has been added to align attribute naming. `number` will be removed in the next major release ([#258](https://github.com/hashicorp/terraform-provider-random/pull/258)).
* resource/random_string: `number` is now deprecated and `numeric` has been added to align attribute naming. `number` will be removed in the next major release ([#258](https://github.com/hashicorp/terraform-provider-random/pull/258)).
## 3.2.0 (May 18, 2022)
NEW FEATURES:
* resource/random_password: New attribute `bcrypt_hash`, which is the hashed password ([73](https://github.com/hashicorp/terraform-provider-random/pull/73), [102](https://github.com/hashicorp/terraform-provider-random/issues/102), [254](https://github.com/hashicorp/terraform-provider-random/pull/254))
NOTES:
* Adds or updates DESIGN.md, README.md, CONTRIBUTING.md and SUPPORT.md docs ([176](https://github.com/hashicorp/terraform-provider-random/issues/176), [235](https://github.com/hashicorp/terraform-provider-random/issues/235), [242](https://github.com/hashicorp/terraform-provider-random/pull/242)).
* Removes usage of deprecated fields, types and functions ([243](https://github.com/hashicorp/terraform-provider-random/issues/243), [244](https://github.com/hashicorp/terraform-provider-random/pull/244)).
* Tests all minor Terraform versions ([238](https://github.com/hashicorp/terraform-provider-random/issues/238), [241](https://github.com/hashicorp/terraform-provider-random/pull/241))
* Switches to linting with golangci-lint ([237](https://github.com/hashicorp/terraform-provider-random/issues/237), [240](https://github.com/hashicorp/terraform-provider-random/pull/240)).
## 3.1.3 (April 22, 2022)
BUG FIXES:
* resource/random_password: Prevent crash when length is less than 0 ([#129](https://github.com/hashicorp/terraform-provider-random/issues/129), [#181](https://github.com/hashicorp/terraform-provider-random/issues/181), [#200](https://github.com/hashicorp/terraform-provider-random/pull/200), [#233](https://github.com/hashicorp/terraform-provider-random/issues/233)).
* resource/random_string: Prevent crash when length is less than 0 ([#129](https://github.com/hashicorp/terraform-provider-random/issues/129), [#181](https://github.com/hashicorp/terraform-provider-random/issues/181), [#200](https://github.com/hashicorp/terraform-provider-random/pull/200), [#233](https://github.com/hashicorp/terraform-provider-random/issues/233)).
* resource/random_password: Prevent confusing inconsistent result error when length is 0 ([#222](https://github.com/hashicorp/terraform-provider-random/issues/222), [#233](https://github.com/hashicorp/terraform-provider-random/issues/233)).
* resource/random_string: Prevent confusing inconsistent result error when length is 0 ([#222](https://github.com/hashicorp/terraform-provider-random/issues/222), [#233](https://github.com/hashicorp/terraform-provider-random/issues/233)).
## 3.1.2 (March 17, 2022)
BUG FIXES:
* resource/random_pet: Prevented deterministic results since 3.1.1 ([#217](https://github.com/hashicorp/terraform-provider-random/issues/217).
## 3.1.1 (March 16, 2022)
NOTES:
* Updated [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) to `v0.7.0`:
this improves generated documentation, with attributes now correctly formatted as `code`
and provided with anchors.
* Functionally identical to the previous 3.1.0 release.
## 3.1.0 (February 19, 2021)
Binary releases of this provider now include the darwin-arm64 platform. This version contains no further changes.
## 3.0.1 (January 12, 2021)
BUG FIXES:
* `resource_integer`: Integers in state that do not cleanly fit into float64s no longer lose their precision ([#132](https://github.com/terraform-providers/terraform-provider-random/issues/132))
## 3.0.0 (October 09, 2020)
Binary releases of this provider will now include the linux-arm64 platform.
BREAKING CHANGES:
* Upgrade to version 2 of the Terraform Plugin SDK, which drops support for Terraform 0.11. This provider will continue to work as expected for users of Terraform 0.11, which will not download the new version. ([#118](https://github.com/terraform-providers/terraform-provider-random/issues/118))
* Remove deprecated `b64` attribute ([#118](https://github.com/terraform-providers/terraform-provider-random/issues/118))
## 2.3.1 (October 26, 2020)
NOTES: This version is identical to v2.3.0, but has been compiled using Go v1.14.5 to fix https://github.com/hashicorp/terraform-provider-random/issues/120.
## 2.3.0 (July 07, 2020)
NOTES:
* The provider now uses the binary driver for acceptance tests ([#99](https://github.com/terraform-providers/terraform-provider-random/issues/99))
NEW FEATURES:
* Added import handling for `random_string` and `random_password` ([#104](https://github.com/terraform-providers/terraform-provider-random/issues/104))
## 2.2.1 (September 25, 2019)
NOTES:
* The provider has switched to the standalone TF SDK, there should be no noticeable impact on compatibility. ([#76](https://github.com/terraform-providers/terraform-provider-random/issues/76))
## 2.2.0 (August 08, 2019)
NEW FEATURES:
* `random_password` is similar to `random_string` but is marked sensitive for logs and output [[#52](https://github.com/terraform-providers/terraform-provider-random/issues/52)]
## 2.1.2 (April 30, 2019)
* This release includes another Terraform SDK upgrade intended to align with that being used for other providers as we prepare for the Core v0.12.0 release. It should have no significant changes in behavior for this provider.
## 2.1.1 (April 12, 2019)
* This release includes only a Terraform SDK upgrade intended to align with that being used for other providers as we prepare for the Core v0.12.0 release. It should have no significant changes in behavior for this provider.
## 2.1.0 (March 20, 2019)
IMPROVEMENTS:
* The provider is now compatible with Terraform v0.12, while retaining compatibility with prior versions.
## 2.0.0 (August 15, 2018)
BACKWARDS INCOMPATIBILITIES / NOTES:
* `random_string`: set the ID for random_string resources to "none". Any terraform configuration referring to `random_string.foo.id` will need to be updated to reference `random_string.foo.result` ([#17](https://github.com/terraform-providers/terraform-provider-random/issues/17))
NEW FEATURES:
* `random_uuid` generates random uuid string that is intended to be used as unique identifiers for other resources ([#38](https://github.com/terraform-providers/terraform-provider-random/issues/38))
BUG FIXES:
* Use UnixNano() instead of Unix() for the current time seed in NewRand() ([#27](https://github.com/terraform-providers/terraform-provider-random/issues/27))
* `random_shuffle`: if `random_shuffle` is given an empty list, it will return an empty list
IMPROVEMENTS:
* Replace ReadPet function in `resource_pet` with schema.Noop ([#34](https://github.com/terraform-providers/terraform-provider-random/issues/34))
## 1.3.1 (May 22, 2018)
BUG FIXES:
* Add migration and new schema version for `resource_string` ([#29](https://github.com/terraform-providers/terraform-provider-random/issues/29))
## 1.3.0 (May 21, 2018)
BUG FIXES:
* `random_integer` now supports update ([#25](https://github.com/terraform-providers/terraform-provider-random/issues/25))
IMPROVEMENTS:
* Add optional minimum character constraints to `random_string` ([#22](https://github.com/terraform-providers/terraform-provider-random/issues/22))
## 1.2.0 (April 03, 2018)
NEW FEATURES:
* `random_integer` and `random_id` are now importable. ([#20](https://github.com/terraform-providers/terraform-provider-random/issues/20))
## 1.1.0 (December 01, 2017)
NEW FEATURES:
* `random_integer` resource generates a single integer within a given range. ([#12](https://github.com/terraform-providers/terraform-provider-random/issues/12))
## 1.0.0 (September 15, 2017)
NEW FEATURES:
* `random_string` resource generates random strings of a given length consisting of letters, digits and symbols. ([#5](https://github.com/terraform-providers/terraform-provider-random/issues/5))
## 0.1.0 (June 21, 2017)
NOTES:
* Same functionality as that of Terraform 0.9.8. Repacked as part of [Provider Splitout](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/)

View File

@ -0,0 +1,375 @@
Copyright IBM Corp. 2017, 2026
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@ -0,0 +1,122 @@
# Terraform Provider: Random
The Random provider supports the use of randomness within Terraform configurations. The
provider resources can be used to generate a random [id](docs/resources/id.md),
[integer](docs/resources/integer.md), [password](docs/resources/password.md),
[pet](docs/resources/pet.md), [shuffle](docs/resources/shuffle.md) (random permutation
of a list of strings), [string](docs/resources/string.md) or
[uuid](docs/resources/uuid.md).
## Documentation, questions and discussions
Official documentation on how to use this provider can be found on the
[Terraform Registry](https://registry.terraform.io/providers/hashicorp/random/latest/docs).
In case of specific questions or discussions, please use the
HashiCorp [Terraform Providers Discuss forums](https://discuss.hashicorp.com/c/terraform-providers/31),
in accordance with HashiCorp [Community Guidelines](https://www.hashicorp.com/community-guidelines).
We also provide:
* [Support](.github/SUPPORT.md) page for help when using the provider
* [Contributing](.github/CONTRIBUTING.md) guidelines in case you want to help this project
* [Design](DESIGN.md) documentation to understand the scope and maintenance decisions
The remainder of this document will focus on the development aspects of the provider.
## Requirements
* [Terraform](https://www.terraform.io/downloads) (>= 0.12)
* [Go](https://go.dev/doc/install) (1.26)
* [GNU Make](https://www.gnu.org/software/make/)
* [golangci-lint](https://golangci-lint.run/usage/install/#local-installation) (optional)
## Development
### Building
1. `git clone` this repository and `cd` into its directory
2. `make build` will trigger the Golang build
The provided `GNUmakefile` defines additional commands generally useful during development,
like for running tests, generating documentation, code formatting and linting.
Taking a look at it's content is recommended.
### Testing
In order to test the provider, you can run
* `make test` to run provider tests
* `make testacc` to run provider acceptance tests
It's important to note that acceptance tests (`testacc`) will actually spawn
`terraform` and the provider. Read more about they work on the
[official page](https://www.terraform.io/plugin/sdkv2/testing/acceptance-tests).
### Generating documentation
This provider uses [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/)
to generate documentation and store it in the `docs/` directory.
Once a release is cut, the Terraform Registry will download the documentation from `docs/`
and associate it with the release version. Read more about how this works on the
[official page](https://www.terraform.io/registry/providers/docs).
Use `make generate` to ensure the documentation is regenerated with any changes.
### Using a development build
If [running tests and acceptance tests](#testing) isn't enough, it's possible to set up a local terraform configuration
to use a development builds of the provider. This can be achieved by leveraging the Terraform CLI
[configuration file development overrides](https://www.terraform.io/cli/config/config-file#development-overrides-for-provider-developers).
First, use `make install` to place a fresh development build of the provider in your [`${GOBIN}`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies) (defaults to `${GOPATH}/bin` or `${HOME}/go/bin` if `${GOPATH}` is not set). Repeat
this every time you make changes to the provider locally.
Then, in your `${HOME}/.terraformrc` (Unix) / `%APPDATA%\terraform.rc` (Windows), a `provider_installation` that contains
the following `dev_overrides`:
```hcl
provider_installation {
dev_overrides {
"hashicorp/random" = "${GOBIN}" //< replace `${GOBIN}` with the actual path on your system
}
direct {}
}
```
Note that it's also possible to use a dedicated Terraform configuration file and invoke `terraform` while setting
the environment variable `TF_CLI_CONFIG_FILE=my_terraform_config_file`.
Once the `dev_overrides` are in place, any local execution of `terraform plan` and `terraform apply` will
use the version of the provider found in the given `${GOBIN}` directory,
instead of the one indicated in your terraform configuration.
### Testing GitHub Actions
This project uses [GitHub Actions](https://docs.github.com/en/actions/automating-builds-and-tests) to realize its CI.
Sometimes it might be helpful to locally reproduce the behaviour of those actions,
and for this we use [act](https://github.com/nektos/act). Once installed, you can _simulate_ the actions executed
when opening a PR with:
```shell
# List of workflows for the 'pull_request' action
$ act -l pull_request
# Execute the workflows associated with the `pull_request' action
$ act pull_request
```
## Releasing
The releasable builds are generated from the [build GH workflow](./.github/workflows/build.yml) and the release/promotion process
is completed via internal HashiCorp deployment tooling. Prior to release, the changelog should be updated in `main` with
the changie tool, example:
```sh
changie batch 3.7.2 && changie merge
```
## License
[Mozilla Public License v2.0](./LICENSE)

View File

@ -0,0 +1,42 @@
{
"version": 3,
"backend": {
"type": "azurerm",
"config": {
"access_key": null,
"ado_service_connection_id": null,
"client_certificate": null,
"client_certificate_password": null,
"client_certificate_path": null,
"client_id": null,
"client_id_file_path": null,
"client_secret": null,
"client_secret_file_path": null,
"container_name": "terraform-state",
"customer_provided_key": null,
"encryption_scope": null,
"endpoint": null,
"environment": null,
"key": "iacdemo-terraform.tfstate",
"metadata_host": null,
"msi_endpoint": null,
"oidc_request_token": null,
"oidc_request_url": null,
"oidc_token": null,
"oidc_token_file_path": null,
"resource_group_name": "idj-terraform-rg",
"sas_token": null,
"snapshot": null,
"storage_account_name": "idjterraform",
"subscription_id": null,
"tenant_id": null,
"timeout_seconds": null,
"use_aks_workload_identity": null,
"use_azuread_auth": null,
"use_cli": null,
"use_msi": null,
"use_oidc": null
},
"hash": 2845048157
}
}

BIN
iac/function_app.zip Normal file

Binary file not shown.

102
iac/functions.tf Normal file
View File

@ -0,0 +1,102 @@
# Create a random pet to generate a unique resource group name
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
# Create a resource group
resource "azurerm_resource_group" "example" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
# Random String for unique naming of resources
resource "random_string" "name" {
length = 8
special = false
upper = false
lower = true
numeric = false
}
# Create a storage account
resource "azurerm_storage_account" "example" {
name = coalesce(var.sa_name, random_string.name.result)
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = var.sa_account_tier
account_replication_type = var.sa_account_replication_type
}
# Create a storage container
resource "azurerm_storage_container" "example" {
name = "example-flexcontainer"
storage_account_id = azurerm_storage_account.example.id
container_access_type = "private"
}
# Create a Log Analytics workspace for Application Insights
resource "azurerm_log_analytics_workspace" "example" {
name = coalesce(var.ws_name, random_string.name.result)
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "PerGB2018"
retention_in_days = 30
}
# Create an Application Insights instance for monitoring
resource "azurerm_application_insights" "example" {
name = coalesce(var.ai_name, random_string.name.result)
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
application_type = "web"
workspace_id = azurerm_log_analytics_workspace.example.id
}
# Create a service plan
resource "azurerm_service_plan" "example" {
name = coalesce(var.asp_name, random_string.name.result)
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
sku_name = "FC1"
os_type = "Linux"
}
data "archive_file" "function_app" {
type = "zip"
source_dir = "${path.module}/.."
output_path = "${path.module}/function_app.zip"
excludes = [".git", ".gitea", "iac", "helm-chart", ".terraform*", ".vscode"]
}
# Create a function app
resource "azurerm_function_app_flex_consumption" "example" {
name = coalesce(var.fa_name, random_string.name.result)
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
service_plan_id = azurerm_service_plan.example.id
storage_container_type = "blobContainer"
storage_container_endpoint = "${azurerm_storage_account.example.primary_blob_endpoint}${azurerm_storage_container.example.name}"
storage_authentication_type = "StorageAccountConnectionString"
storage_access_key = azurerm_storage_account.example.primary_access_key
runtime_name = var.runtime_name
runtime_version = var.runtime_version
maximum_instance_count = 50
instance_memory_in_mb = 2048
zip_deploy_file = data.archive_file.function_app.output_path
site_config {
application_insights_connection_string = azurerm_application_insights.example.connection_string
}
app_settings = {
"OLLAMA_HOST" = "http://harbor.freshbrewed.science:11444"
"OLLAMA_MODEL" = "gemma4:e4b"
"JOKE_PROMPT" = "tell me a dad joke about programming"
"PORT" = "80"
"SCM_DO_BUILD_DURING_DEPLOYMENT" = "true"
"ENABLE_ORYX_BUILD" = "true"
}
}

20
iac/outputs.tf Normal file
View File

@ -0,0 +1,20 @@
# Terraform outputs
output "resource_group_name" {
value = azurerm_resource_group.example.name
}
output "sa_name" {
value = azurerm_storage_account.example.name
}
output "asp_name" {
value = azurerm_service_plan.example.name
}
output "fa_name" {
value = azurerm_function_app_flex_consumption.example.name
}
output "fa_url" {
value = "https://${azurerm_function_app_flex_consumption.example.name}.azurewebsites.net"
}

28
iac/providers.tf Normal file
View File

@ -0,0 +1,28 @@
terraform {
backend "azurerm" {
resource_group_name = var.backend_resource_group_name
storage_account_name = var.backend_storage_account_name
container_name = var.backend_container_name
key = var.backend_key
}
required_version = ">=1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>4.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
subscription_id = var.subscription_id
tenant_id = var.tenant_id
}

9
iac/terraform.tfvars Normal file
View File

@ -0,0 +1,9 @@
# Provider
subscription_id = "d955c0ba-13dc-44cf-a29a-8fed74cbb22d" # Mine
tenant_id = "28c575f6-ade1-4838-8e7c-7e6d1ba0eb4a"
# Backend
backend_resource_group_name = "idj-terraform-rg"
backend_storage_account_name = "idjterraform"
backend_container_name = "terraform-state"
backend_key = "iacdemo-terraform.tfstate"

102
iac/variables.tf Normal file
View File

@ -0,0 +1,102 @@
variable "subscription_id" {
description = "The subscription ID for Azure"
type = string
}
variable "tenant_id" {
description = "The Tennant ID for Azure"
type = string
}
variable "backend_resource_group_name" {
description = "The resource group name for the backend"
type = string
}
variable "backend_storage_account_name" {
description = "The storage account name for the backend"
type = string
}
variable "backend_container_name" {
description = "The container name for the backend"
type = string
}
variable "backend_key" {
description = "The key for the backend state file"
type = string
}
variable "resource_group_name" {
type = string
default = ""
description = "The name of the Azure resource group. If blank, a random name will be generated."
}
variable "resource_group_name_prefix" {
type = string
default = "rg"
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
}
variable "resource_group_location" {
type = string
default = "eastus"
description = "Location of the resource group."
}
variable "sa_account_tier" {
description = "The tier of the storage account. Possible values are Standard and Premium."
type = string
default = "Standard"
}
variable "sa_account_replication_type" {
description = "The replication type of the storage account. Possible values are LRS, GRS, RAGRS, and ZRS."
type = string
default = "LRS"
}
variable "sa_name" {
description = "The name of the storage account. If blank, a random name will be generated."
type = string
default = ""
}
variable "ws_name" {
description = "The name of the Log Analytics workspace. If blank, a random name will be generated."
type = string
default = ""
}
variable "ai_name" {
description = "The name of the Application Insights instance. If blank, a random name will be generated."
type = string
default = ""
}
variable "asp_name" {
description = "The name of the App Service Plan. If blank, a random name will be generated."
type = string
default = ""
}
variable "fa_name" {
description = "The name of the Function App. If blank, a random name will be generated."
type = string
default = ""
}
variable "runtime_name" {
description = "The name of the language worker runtime."
type = string
default = "python" # Allowed: dotnet-isolated, java, node, powershell, python
}
variable "runtime_version" {
description = "The version of the language worker runtime."
type = string
default = "3.11" # Supported versions: see https://aka.ms/flexfxversions
}

View File

@ -1,2 +1,3 @@
Flask>=3.0.0 Flask>=3.0.0
requests>=2.31.0 requests>=2.31.0
azure-functions