Compare commits

...

650 Commits

Author SHA1 Message Date
a39f70e47a set prevent_deletion_if_contains_resources to false 2024-09-14 13:51:29 +08:00
a855962fb2 switch to new testing environment 2024-09-14 13:45:38 +08:00
784a1aba72 fix broken config 2024-09-14 13:29:00 +08:00
1ff77143ef bump azurerm to v3 so we can use oidc 2024-09-14 13:17:14 +08:00
521970084e try to fix 201-vmss-packer-jumpbox 2024-09-14 12:30:32 +08:00
1b66215af1 try to fix 201-vmss-packer-jumpbox 2024-09-14 12:23:05 +08:00
39dcf38e31 try to fix 201-vmss-packer-jumpbox 2024-09-14 11:28:42 +08:00
3c3a07e589 try to fix 201-vmss-packer-jumpbox 2024-09-14 11:27:16 +08:00
8e98c2eb21 revert change to quickstart 2024-09-14 11:18:57 +08:00
d6ee54a2ba bump test dep version 2024-09-14 11:18:57 +08:00
e25b4f02b0 trigger ci 2024-09-14 11:18:57 +08:00
719693e7d9 correct e2e test 2024-09-14 10:48:13 +08:00
b482962a1b migrate to new release branch based workflow 2024-09-14 09:18:50 +08:00
ca492527f3 fix checkout 2024-09-13 10:27:40 +08:00
9badce8c4f correct GH_TOKEN 2024-09-13 10:22:52 +08:00
f8057aea5e correct input name 2024-09-13 10:21:13 +08:00
869b6f6930 convert e2e to a workflow_disptach event 2024-09-13 10:18:16 +08:00
5196ebf436 Revert "convert to use oidc as e2e testing authentication method"
This reverts commit 07093a38f1.
2024-09-12 15:06:23 +08:00
07093a38f1 convert to use oidc as e2e testing authentication method 2024-09-12 14:54:01 +08:00
76d27fa498 add CODEOWNERS to protect workflows 2024-09-11 04:11:14 +00:00
04b859d108 Update TestRecord 2024-09-08 03:46:29 +00:00
24b748736e Update TestRecord 2024-09-01 03:31:47 +00:00
5b29b3c6ff Update TestRecord 2024-08-25 03:30:01 +00:00
62e5708587 Update TestRecord 2024-08-18 03:30:26 +00:00
6d2e266aec Update TestRecord 2024-08-11 03:28:37 +00:00
47105169df Update TestRecord 2024-08-04 03:34:18 +00:00
773a8bc32a Update TestRecord 2024-08-01 04:12:13 +00:00
eb5d7cca9a revert deletion of TestRecord, update action permission 2024-08-01 08:43:22 +08:00
55688a5012 Revert "remove all TestRecord related tasks since we have no write permission anymore"
This reverts commit ecea4eb4c4.
2024-08-01 08:29:35 +08:00
e98d6e9583 Bump github.com/hashicorp/go-getter from 1.7.1 to 1.7.5 in /test
Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.1 to 1.7.5.
- [Release notes](https://github.com/hashicorp/go-getter/releases)
- [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml)
- [Commits](https://github.com/hashicorp/go-getter/compare/v1.7.1...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-getter
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 08:16:37 +08:00
ecea4eb4c4 remove all TestRecord related tasks since we have no write permission anymore 2024-07-30 00:06:09 +00:00
20ed8541d9 Merge pull request #338 from vhorne/fw-fix-typo
fix typo - jump to server
2024-07-29 14:13:20 -07:00
981e497396 fix typo - jump to server 2024-07-26 08:18:14 -07:00
674f3d10c7 Initial put 2024-07-22 09:01:18 +08:00
6065e8c1a2 Merge pull request #330 from TomArcherMsft/UserStory281914
User Story 281914
2024-07-15 18:10:48 -06:00
c1bd8b8a27 Added README.md 2024-07-15 12:04:32 -07:00
e9dfde8f88 terraform fmt 2024-07-11 09:23:27 -07:00
c20885dabc Added required fields to default_node_pool block 2024-07-11 05:39:38 -07:00
15a19838ad Fixes 2024-07-11 05:21:16 -07:00
62f77281a0 Merge pull request #331 from andyaviles121/aistudiobasic
Basic AI Studio resource creation updates
2024-07-10 14:04:06 -07:00
e442bda05b Added output 2024-07-10 09:20:14 -07:00
84022f9adf Fixing code 2024-07-10 08:56:57 -07:00
29e0406146 updated outputs and variables used 2024-07-10 11:44:01 -04:00
b54a5ae10f Merge branch 'Azure:master' into aistudiobasic 2024-07-10 11:27:39 -04:00
65acca1e0c Fixed file name 2024-07-10 07:26:49 -07:00
795c1b540a Initial put 2024-07-10 06:31:48 -07:00
b355126422 Merge pull request #329 from TomArcherMsft/UserStory275199
User Story 275199
2024-07-03 15:45:49 -07:00
64c9af27e2 Merge pull request #326 from TomArcherMsft/UserStory256543
User Story 256543
2024-07-03 15:41:02 -07:00
189718f6c1 Merge pull request #316 from TomArcherMsft/UserStory208753
User Story 208753 - App Service Backup
2024-07-01 23:02:48 -07:00
b56dda974f fix packer error by monkey patch the version output 2024-07-02 13:53:46 +08:00
0fd2a5d129 Fixing command to get public key 2024-07-02 13:53:46 +08:00
bf2f1f5939 completed readme 2024-07-01 19:21:33 -07:00
7c29b17ca6 fixed node pool name len 2024-07-01 19:01:53 -07:00
bee854b03b changed params of node pool name 2024-07-01 17:19:12 -07:00
068cf2da3f changed params of terraform init 2024-07-01 17:18:04 -07:00
1bd62d28a8 declared user & pwd as vars 2024-07-01 17:00:31 -07:00
da5efce177 fixes 2 2024-07-01 16:48:54 -07:00
5182c37a0f fixes 2024-07-01 15:57:55 -07:00
6e7acfb695 Create a Windows-based Azure Kubernetes Service (AKS) cluster 2024-07-01 13:19:54 -07:00
40be72ba42 Merge pull request #313 from TomArcherMsft/UserStory202889
User Story 202889
2024-06-26 11:51:48 -06:00
c015ce05d3 renamed outputs.tf 2024-06-26 08:09:22 +08:00
db1dc1b5bb matching contributor guidelines 2024-06-26 08:09:22 +08:00
de72279095 removed credentials as it was not expected 2024-06-26 08:09:22 +08:00
d5c754a94b included random string suffix 2024-06-26 08:09:22 +08:00
cd38055ba3 added in azurerm key_vault provider section in main.tf 2024-06-26 08:09:22 +08:00
c15b0e61a3 removed connections schema validation skip 2024-06-26 08:09:22 +08:00
9df50ca6b2 fixed according to comments 2024-06-26 08:09:22 +08:00
6d7c599850 merged cmk into hub.tf 2024-06-26 08:09:22 +08:00
097321f7d5 added files 2024-06-26 08:09:22 +08:00
85af378d98 renamed outputs.tf 2024-06-21 13:35:30 -04:00
2f17431ec7 matching contributor guidelines 2024-06-21 12:29:29 -04:00
be4de1c357 Corrections 2024-06-19 13:24:42 -07:00
295e98af05 Fixed code 2024-06-19 12:28:51 -07:00
757ad9785e removed credentials as it was not expected 2024-06-19 11:51:11 -04:00
d7eb1aa3cc included random string suffix 2024-06-17 09:50:53 -04:00
50e642f10d initial put 2024-06-13 09:32:07 -07:00
e589974a53 Merge branch 'Azure:master' into aistudiobasic 2024-06-12 14:30:02 -04:00
ffa4aa614b Changed per review 2024-06-10 10:41:46 -07:00
bb30e6465e added in azurerm key_vault provider section in main.tf 2024-06-05 13:12:21 -04:00
7ce10b04ff Added code of conduct 2024-05-21 15:52:30 -07:00
b083b78cc3 Merge pull request #318 from ravick4u/feature/create-azure-container-app
Added new folder to create azure container app
2024-05-17 15:45:15 -07:00
275036cf3c removed connections schema validation skip 2024-05-17 20:15:08 +00:00
af2f3b7866 fixed according to comments 2024-05-17 20:13:17 +00:00
8a17dd2a7b Add dns record for built in endpoint 2024-05-17 09:02:14 +08:00
ae299a4355 Update doc 2024-05-17 09:02:14 +08:00
25aa1d089a format terraform 2024-05-17 09:02:14 +08:00
8c845be0a2 Add sample for iothub with private link 2024-05-17 09:02:14 +08:00
c4bdeb74c0 merged cmk into hub.tf 2024-05-15 21:17:25 +00:00
661af04fe8 added files 2024-05-15 20:45:38 +00:00
8039a0b4c9 Added new folder to create azure container app 2024-04-26 12:02:46 -04:00
369cd83197 Merge pull request #317 from ravick4u/feature/fixlinkstorageaccount
fix link in storage account with static website
2024-04-24 14:04:10 -07:00
3a15d1fc0d fix link in storage account with static website 2024-04-23 10:54:02 -04:00
1d574ee63d install packer before run e2e test in case we need packer 2024-03-07 22:39:01 +08:00
89f82a6cd7 modified output for NAT gateway from feedback 2024-02-21 10:20:28 +08:00
095c904b90 fixed formatting 2024-02-21 10:20:28 +08:00
9083f1a72b added provider requested in error output of tests 2024-02-21 10:20:28 +08:00
174d5fbb03 Added sample for a SQL private endpoint for Azure Private Link 2024-02-21 10:20:28 +08:00
6e33ab9696 Fixing plurality of output names 2024-02-08 12:30:19 +08:00
d80c430a56 Setting default values to those used by HashiCorp in their sample 2024-02-08 12:30:19 +08:00
f6f2e9317a Fixed default value 2024-02-08 12:30:19 +08:00
8a7032349d Wordsmithed the introduction 2024-02-08 12:30:19 +08:00
4958b3bdff Generated sample from henglu examples 2024-02-08 12:30:19 +08:00
4c73d9da3b Removed incorrect output 2024-02-07 05:00:39 -08:00
d895942b25 User Story 208753 2024-02-07 04:44:15 -08:00
482e26632b added sample for creating a NAT gateway with a virtual machine and corresponding network, subnet and public IP addresses 2024-02-02 09:41:05 +08:00
7e1008fa74 Update TestRecord 2024-01-28 02:04:04 +00:00
5257f91911 terraform fmt 2024-01-26 07:37:18 -08:00
368ab4ff9b Added outputs 2024-01-26 07:31:18 -08:00
0837a1275c Update TestRecord 2024-01-21 05:46:08 +00:00
0083ff0a12 Update TestRecord 2024-01-19 07:17:08 +00:00
c54e7eb73b removed unused variable 2024-01-19 15:16:54 +08:00
d3d6a90f20 removed unused variable 2024-01-19 15:16:54 +08:00
af2cfe9093 edited readme 2024-01-19 15:16:54 +08:00
8060a92890 added terraform for create a virtual network with two subnets quickstart in virtual network docset 2024-01-19 15:16:54 +08:00
4e87d80177 Update TestRecord 2024-01-14 01:57:26 +00:00
15bd1287bf Update TestRecord 2024-01-08 08:52:30 +00:00
eb44e5afbe try to fix broken test 2024-01-08 16:52:13 +08:00
feaac00db9 Reapply "remove 301-service-fabric since the image it used is no longer available"
This reverts commit 950f1c0346.
2024-01-08 09:14:53 +08:00
207632c32b remove 301-service-fabric-apim since the image it used is no longer available 2024-01-08 09:14:53 +08:00
2801b3b7a9 remove 301-service-fabric since the image it used is no longer available 2024-01-08 09:14:53 +08:00
b1559f83a9 Revert "remove 301-service-fabric since the image it used is no longer available"
This reverts commit 6a0437b809a2cf28db0660837b77f0fd92450db3.
2024-01-08 09:14:53 +08:00
1b14401f4a remove 301-service-fabric since the image it used is no longer available 2024-01-08 09:14:53 +08:00
2ef49582eb update code 2024-01-08 09:14:53 +08:00
ae80f13644 update code 2024-01-08 09:14:53 +08:00
b1766a7fd6 update code 2024-01-08 09:14:53 +08:00
06cb83b693 Fix 301-service-fabric 2024-01-08 09:14:53 +08:00
e009588b2e Update TestRecord 2024-01-07 03:00:09 +00:00
c01be0474c Update TestRecord 2024-01-05 07:15:59 +00:00
e47e43c578 update code 2024-01-05 15:15:42 +08:00
5b0751e2e3 update code 2024-01-05 15:15:42 +08:00
23326bb72c Fix 201-machine-learning-moderately-secure 2024-01-05 15:15:42 +08:00
efe99dbdb2 fix e2e test by querying msi's client id and pass it into the container 2024-01-04 19:42:56 +08:00
fd52e1afed trigger example test 2024-01-04 14:56:04 +08:00
846c40bdb7 trigger example test 2024-01-04 14:56:04 +08:00
696a7c9089 trigger example test 2024-01-04 14:56:04 +08:00
26a578a267 trigger example test 2024-01-04 14:56:04 +08:00
f71b56e99a trigger example test 2024-01-04 14:56:04 +08:00
22b2e39335 fix 201vmsspacker jumpbox, MSI_ID is object id not client id, we need az cli to retrieve client id 2024-01-04 14:56:04 +08:00
b6d3ffd601 Update TestRecord 2024-01-03 02:01:05 +00:00
7e2f19b6cb add random suffix for machine learning workspace to avoid testing failure. 2024-01-03 10:00:49 +08:00
cc391fef1f Revert "Fix 201-machine-learning-moderately-secure"
This reverts commit e98e893d2d.
2024-01-03 10:00:49 +08:00
bbaf15cce9 Revert "update code"
This reverts commit 18087e206b.
2024-01-03 10:00:49 +08:00
9679e8d470 remove terragrunt config 2024-01-03 10:00:49 +08:00
5e1d8c38aa rename subtest 2024-01-03 10:00:49 +08:00
9259270d0c try to make 202-mlmsev testable 2024-01-03 10:00:49 +08:00
a39e09c2d5 update code 2024-01-03 10:00:49 +08:00
57a6577c0d Fix 201-machine-learning-moderately-secure 2024-01-03 10:00:49 +08:00
2c2775f299 pin github action versions 2024-01-03 09:35:23 +08:00
273f40246d Update TestRecord 2024-01-02 00:47:29 +00:00
cb3d6100e0 update code 2024-01-02 08:47:14 +08:00
32e167c179 update code 2024-01-02 08:47:14 +08:00
c6c516ed9f Fix Terraform Template 2024-01-02 08:47:14 +08:00
c0b2f8ea11 Update TestRecord 2023-12-31 02:13:52 +00:00
0aa98ad322 Update TestRecord 2023-12-24 01:51:19 +00:00
982855c02d Update TestRecord 2023-12-17 02:28:42 +00:00
81dea1b7f3 Update TestRecord 2023-12-10 02:15:27 +00:00
e2518d4322 Update TestRecord 2023-12-04 04:23:22 +00:00
91b46e5a4c make e2e tests parallel 2023-12-04 10:01:46 +08:00
11ad06e781 Update TestRecord 2023-11-30 21:56:33 +00:00
73a62df59e Merge pull request #298 from mbender-ms/avnm-create-management-group-scope
virtual network manager - New Terraform Template - Quickstart Create virtual network manager with Management Group Scope
2023-11-30 13:56:17 -08:00
99037bb0e5 fix example and e2e test 2023-11-30 10:39:02 +08:00
5895b4f1c4 updates from Review 2023-11-30 10:39:02 +08:00
3e66747328 finished testing 2023-11-30 10:39:02 +08:00
75c6fa2455 update terraform 2023-11-30 10:39:01 +08:00
2cfbc95445 201-vmss-appgw-waf - remove unused case (#276) 2023-11-28 09:26:35 +08:00
a9967b1afa 201-storage-static-website-cdn-ssl - remove unused case (#278) 2023-11-28 09:25:17 +08:00
abe19919f1 201-web-app-windows-vnet - remove unused case (#283) 2023-11-28 09:24:13 +08:00
d76f364b81 201-aks-gpu-nodepool - remove unused case (#285) 2023-11-28 09:23:29 +08:00
056c7928e1 201-aks-advanced-networking - remove unused case (#286) 2023-11-28 09:22:11 +08:00
ea0802157a 301-hub-spoke-network-3vm - remove unused case (#287) 2023-11-28 09:21:14 +08:00
d55380d2d4 301-aks-windows-nodepool - remove unused case (#288) 2023-11-28 09:05:17 +08:00
9edb2d544f Update TestRecord 2023-11-26 06:22:08 +00:00
a09aa80fe9 Update TestRecord 2023-11-23 02:42:08 +00:00
dcad1a24c3 Fix 201-aks-acr-identity (#292) 2023-11-23 10:41:55 +08:00
9037930ade Update TestRecord 2023-11-19 06:00:15 +00:00
01f9c49cd0 Update TestRecord 2023-11-17 09:40:45 +00:00
97c14ebe74 Fix 201-vmss-disk-encryption-extension (#277) 2023-11-17 17:40:30 +08:00
2ca5b80520 Update TestRecord 2023-11-17 09:39:58 +00:00
256f1edff2 Fix 201-vmss-jumpbox (#275)
* Fix 201-vmss-jumpbox
2023-11-17 17:39:39 +08:00
a09e5f225b Update TestRecord 2023-11-17 02:47:23 +00:00
960d0719c4 Fix 201-function-app-key-vault-ref (#291) 2023-11-17 10:47:09 +08:00
3d31e20518 Update TestRecord 2023-11-17 02:46:44 +00:00
06730dbb45 Fix 201-postgresql-fs-db (#279) 2023-11-17 10:46:31 +08:00
1eed1d2c56 Update TestRecord 2023-11-17 02:46:07 +00:00
9ff4e9f95a Fix 201-function-app (#290) 2023-11-17 10:45:54 +08:00
b15cfb14ad Update TestRecord 2023-11-17 02:22:22 +00:00
aad151de90 User Story 177223 (#269)
* Added output of endpoint; Renamed readme
2023-11-17 10:22:05 +08:00
ca8ddca40e Update readme.md (#297) 2023-11-16 09:58:36 +08:00
3579842ada Update TestRecord 2023-11-16 01:54:14 +00:00
773bba8680 Fix 101-managed-instance (#273) 2023-11-16 09:53:59 +08:00
984e6bd413 Update TestRecord 2023-11-15 05:27:45 +00:00
6e5cdfc2a6 101-devtest-labs - generate the vm name with random value (#272)
* 101-devtest-labs - update the vm name
2023-11-15 13:27:30 +08:00
d136bbb5a1 Update TestRecord 2023-11-15 04:38:52 +00:00
69d738882f 101-machine-learning - update the settings of random_string (#271) 2023-11-15 12:38:36 +08:00
f72c62d2ad Update TestRecord 2023-11-14 14:40:06 +00:00
757cdd7134 Fix 201-mysql-fs-db (#284) 2023-11-14 22:39:47 +08:00
72c7e787ec Skip empty example (#270)
* skip empty examples that contain no tf files

* refactor code
2023-11-13 11:27:32 +08:00
161494719e Update TestRecord 2023-11-12 07:02:47 +00:00
ba98f7c013 Update TestRecord 2023-11-05 07:29:24 +00:00
4def5c4002 Update TestRecord 2023-10-29 07:07:22 +00:00
61d807a87b Update TestRecord 2023-10-24 03:38:27 +00:00
00b03117df User Story 171709 (#267)
* Updating sample for consistency
2023-10-24 11:38:10 +08:00
03dbc8db99 Update TestRecord 2023-10-22 07:10:39 +00:00
f9eccadd36 Update TestRecord 2023-10-17 20:11:08 +00:00
e8f70dc93c Merge pull request #253 from cshea-msft/chashea-patch-1
firewall quickstart with ipgroups
2023-10-17 13:10:52 -07:00
89772f9027 Merge pull request #254 from cshea-msft/chashea-patch-02
fw quickstart with multiple addresses
2023-10-17 13:10:27 -07:00
78d3aabd53 Update TestRecord 2023-10-17 20:10:15 +00:00
7179c30bbf Merge pull request #252 from cshea-msft/chashea-patch-03
Creating AzureFirewall with AV Zones quickstart
2023-10-17 13:09:55 -07:00
3a91285ae3 Merge branch 'Azure:master' into chashea-patch-03 2023-10-17 08:58:13 -04:00
f069db857e Merge branch 'Azure:master' into chashea-patch-02 2023-10-17 08:58:02 -04:00
214f85247f Merge branch 'Azure:master' into chashea-patch-1 2023-10-17 08:57:54 -04:00
ec82d414d3 Update TestRecord 2023-10-16 21:44:36 +00:00
1d14811509 Merge pull request #258 from pauljewellmsft/amlfs-sample
Add Terraform code for deploying Azure Managed Lustre file system
2023-10-16 14:44:16 -07:00
6330a303c7 Update outputs.tf 2023-10-16 15:18:45 -04:00
60bba8f8af Incorporate review feedback 2023-10-16 15:12:22 -04:00
9a5792ab3f Merge branch 'master' of https://github.com/Azure/terraform into amlfs-sample 2023-10-16 10:19:00 -04:00
6fd7056df5 Update TestRecord 2023-10-15 06:51:37 +00:00
21c4654b2d Add code for AMLFS resource 2023-10-12 15:09:09 -04:00
629a403870 Initial changes for AMLFS sample 2023-10-11 17:09:41 -04:00
534bfe3c19 Update TestRecord 2023-10-11 01:34:31 +00:00
c607e8db9e Updated sample (#256) 2023-10-11 09:34:10 +08:00
fd8b296704 Update TestRecord 2023-10-08 06:43:12 +00:00
1f19491026 fixed jump-subnet 2023-10-06 10:11:06 -04:00
371cd6947e fix format 2023-10-05 17:18:34 -04:00
708dbf9f80 fixed nsg protocol error 2023-10-05 17:00:51 -04:00
e24feee41a formatting 2023-10-05 16:54:59 -04:00
deee58f798 add ssh key to module 2023-10-05 16:52:15 -04:00
f436fad9ef small space change 2023-10-05 15:58:18 -04:00
d2fe413a19 made small changes to file 2023-10-05 15:56:50 -04:00
67de624015 fixed minor issues 2023-10-05 15:33:57 -04:00
f4a6a235e2 update file with changes 2023-10-05 14:04:10 -04:00
6d957e8a99 updating providers.tf 2023-10-04 15:02:11 -04:00
e25785c539 update providers.tf 2023-10-04 15:00:02 -04:00
3c051b5d19 updating providers file 2023-10-04 14:59:29 -04:00
d389b6df65 chang to main.tf 2023-10-04 09:38:56 -04:00
e80ace340d updating readme 2023-10-03 17:12:10 -04:00
477932520d updating readme 2023-10-03 17:10:50 -04:00
69a69c4969 fixed files on feedback 2023-10-03 17:08:46 -04:00
757c9646ae made minor changes 2023-10-03 09:44:43 -04:00
44857345c7 update changes to files 2023-10-02 21:32:54 -04:00
00d4ef3f0c update files from comments 2023-10-02 20:37:33 -04:00
cf042efa84 Update TestRecord 2023-10-01 06:25:11 +00:00
533b50d60f Update TestRecord 2023-09-26 23:25:17 +00:00
9bf8cf38f8 Merge pull request #255 from ericd-mst-github/erd-tf-vm-autoshutdown
added TF code for Azure Automation runbook
2023-09-26 16:25:02 -07:00
e13fcdbffa modified outputs.tf based on feedback 2023-09-26 10:57:49 -04:00
acabdbdb34 formatting updates for variables markdown table 2023-09-26 10:33:39 -04:00
51abcf64bf readme updates for variables markdown table 2023-09-26 10:28:13 -04:00
f46699d1f2 updated variables.tf with formatting and validation blocks where needed 2023-09-26 10:16:31 -04:00
efb8d0f25c updated providers.tf 2023-09-26 10:00:13 -04:00
f82db3eb77 removed commented code 2023-09-26 09:56:46 -04:00
e1e1f80f59 readme changes for variables 2023-09-25 17:12:51 -04:00
78c37329b4 added TF code for Azure Automation runbook 2023-09-25 17:04:52 -04:00
ec8fa91e05 update files 2023-09-25 16:18:40 -04:00
e0c258c3d7 update readme 2023-09-25 13:48:04 -04:00
295ee5a644 update readme 2023-09-25 13:38:56 -04:00
06cb833672 update files 2023-09-25 10:39:55 -04:00
02691ea927 commit files to folder 2023-09-24 21:13:18 -04:00
eda163c0f7 update changes to file 2023-09-24 20:38:46 -04:00
5c810c97a3 update files 2023-09-24 12:28:21 -04:00
4c0e3f6034 Update TestRecord 2023-09-24 06:10:24 +00:00
d6cb019394 add new files to new branch 2023-09-23 16:05:24 -04:00
a242f2310b made changes 2023-09-23 15:44:06 -04:00
dcd3461cda creating new fw quickstart 2023-09-23 15:42:30 -04:00
bf91a62e3b Merge branch 'Azure:master' into master 2023-09-23 10:55:54 -04:00
c2ccaa2266 Update TestRecord 2023-09-20 12:37:28 +00:00
445889b3ee bump go mod versions (#251) 2023-09-20 14:11:09 +08:00
5eb79ccd6c remove deprecated packer file (#248) 2023-09-20 07:47:20 +08:00
f2a6901f3f Convert legacy Packer json template to hcl2 template (#247)
* convert legacy Packer json template to hcl2 template
2023-09-19 13:37:17 +08:00
bb15543608 Update TestRecord 2023-09-17 06:12:00 +00:00
981578f540 Update TestRecord 2023-09-10 06:36:38 +00:00
c6c6c9c678 Update TestRecord 2023-09-04 02:24:48 +00:00
8659e09ccb Add an example of sql security alert policy (#241)
* add example of sql security alert policy

---------

Co-authored-by: Nanxuan Xu <nanxu@microsoft.com>
2023-09-04 10:24:34 +08:00
9a2f9b8af3 Update TestRecord 2023-09-04 02:24:06 +00:00
8aa0c51a71 azfw quickstarts (#245)
* adding azfw quickstarts
2023-09-04 10:23:48 +08:00
382bc865d3 Update TestRecord 2023-09-04 02:06:10 +00:00
7ec608cc1e Fixing broken AKS/AGIC sample (#240)
* Fixing broken sample and update

---------

Co-authored-by: hezijie <lonegunmanb@hotmail.com>
2023-09-04 10:05:54 +08:00
dd26a7d74f Update TestRecord 2023-09-03 05:46:55 +00:00
40d6dc17fe Update TestRecord 2023-08-27 06:39:59 +00:00
e46e9cec2c removing files from this branch 2023-08-22 19:21:06 -04:00
ed29f3c468 adding azfw quickstarts 2023-08-22 19:02:39 -04:00
c1747083b4 Update TestRecord 2023-08-20 05:59:13 +00:00
d1b9572df1 Update TestRecord 2023-08-13 05:44:21 +00:00
bb9ca145b8 Update TestRecord 2023-08-11 02:34:29 +00:00
435a067b5d User Story 145880 (#243)
* Updating Front Door Standard/Premium code sample
2023-08-11 10:34:09 +08:00
fee12df179 Update TestRecord 2023-08-11 02:11:53 +00:00
e34f713c9e Updated Front Door Classic code sample (#244) 2023-08-11 10:11:38 +08:00
2d6bb88c73 Update TestRecord 2023-08-09 02:15:39 +00:00
9e77030272 Update 101-front-door-standard-premium to use azurerm 3.67.0 (#242)
* Update 101-front-door-standard-premium to use azurerm 3.67.0

* Update provider version
2023-08-09 10:15:20 +08:00
d13b385744 Update TestRecord 2023-08-06 05:55:38 +00:00
300a1988aa Update TestRecord 2023-08-01 03:43:17 +00:00
d0f95da522 Updated article (#239) 2023-08-01 11:43:01 +08:00
0cc90f4455 Update TestRecord 2023-07-30 07:09:38 +00:00
e361ddd231 Update TestRecord 2023-07-24 01:01:53 +00:00
58245fa62c User Story 125263 (#238)
* Updated to use AzApi to obtain SSH (instead of tls)
2023-07-24 09:01:38 +08:00
b405c2cce8 Update TestRecord 2023-07-16 05:56:28 +00:00
3b05c31fd3 Update TestRecord 2023-07-13 01:25:14 +00:00
aecb7d60e3 User Story 124432 (#236)
* Replaced password with SSH key
2023-07-13 09:24:59 +08:00
7c224d76a1 Update TestRecord 2023-07-09 05:50:56 +00:00
4a451dd9f7 Update TestRecord 2023-07-07 02:31:15 +00:00
e9538db55e User Story 89540 (#231)
* Fixing Windows VM cluster article code
2023-07-07 10:30:53 +08:00
f8b805db85 Update TestRecord 2023-07-02 11:12:02 +00:00
7ccf04124f Update TestRecord 2023-06-27 17:36:47 +00:00
ab98a8b09d Merge pull request #234 from mbender-ms/avnm-update-create-mesh
Tests passed so merging.
Update 101-virtual-network-manager-create-mesh
2023-06-27 10:36:30 -07:00
a966811863 updates to vnet code and test 2023-06-27 09:38:36 -05:00
8fedbd9b92 Merge branch 'Azure:master' into avnm-update-create-mesh 2023-06-26 14:59:21 -05:00
eb55df526f Update TestRecord 2023-06-25 05:47:31 +00:00
2ee94c1116 Updates for Azure Policy add 2023-06-20 10:43:54 -05:00
71252cd220 Updates for Azure Policy add 2023-06-20 10:37:04 -05:00
47a204b73f Updates for Azure Policy add 2023-06-20 10:29:54 -05:00
27c2712af1 Updates to outputs 2023-06-20 09:48:42 -05:00
7a098d5ccc Merge branch 'master' of https://github.com/mbender-ms/terraform 2023-06-20 09:47:07 -05:00
fdb120086a Merge branch 'master' of https://github.com/Azure/terraform 2023-06-20 09:46:15 -05:00
6ad93edac4 Merge branch 'Azure:master' into master 2023-06-19 16:02:30 -05:00
47ddd8e1af Update TestRecord 2023-06-18 05:48:10 +00:00
f0c6b0c4fc Update TestRecord 2023-06-11 05:39:25 +00:00
862926c583 Update TestRecord 2023-06-07 22:34:03 +00:00
e0c99d63b8 Merge pull request #230 from TomArcherMsft/UserStory91128
User Story 91128
2023-06-07 15:33:47 -07:00
1cec01890b Using splat expressions 2023-06-06 15:13:52 -07:00
5777e4a8ae Added output var for randomly generated vnet names 2023-06-06 14:40:25 -07:00
d3f3a3c73b Merge branch 'Azure:master' into master 2023-06-06 08:10:49 -05:00
998c8216ba Update TestRecord 2023-06-05 03:00:37 +00:00
aae1a9af55 virtual network manager - initial commit (#226)
* initial commit
---------

Co-authored-by: Michael Bender <michael.bender@microsoft.com>
2023-06-05 11:00:21 +08:00
5e5c122308 Merge branch 'master' of https://github.com/Azure/terraform 2023-06-04 21:15:16 -05:00
dba97b976b Update TestRecord 2023-06-04 06:02:18 +00:00
b2737b65a6 Update TestRecord 2023-06-01 21:02:44 +00:00
69ef9452ff Merge pull request #227 from TomArcherMsft/UserStory95456
User Story 95456
2023-06-01 14:02:27 -07:00
c55631aea8 Wordsmithed description of msi_id variable 2023-05-31 07:29:11 -07:00
e4ce8b240d Update TestRecord 2023-05-31 05:44:45 +00:00
195aebd12b User Story 60501: 101-databricks-cmk-dbfs (#219)
* Part of POC to test generating sample code and articles using OpenAI.
2023-05-31 13:44:28 +08:00
2e4686f8e6 Merge branch 'master' of https://github.com/Azure/terraform 2023-05-30 14:18:35 -05:00
75fdf6cddd Update TestRecord 2023-05-28 05:32:27 +00:00
05bf429cba Replaced use of service principal with identity 2023-05-27 17:09:34 -07:00
99fa801597 Moved code into sp.tf to make it more self-contained 2023-05-26 16:21:01 -07:00
c3623b46bd Updated readme 2023-05-26 11:41:39 -07:00
fe231e8d91 Removed Log Analytics resources from sample as not used in article 2023-05-26 11:37:59 -07:00
d0a579d375 Update TestRecord 2023-05-25 17:48:50 +00:00
48760f85d4 Merge pull request #225 from TomArcherMsft/UserStory90135
User Story 90135
2023-05-25 10:48:35 -07:00
6cab78c426 Merge pull request #224 from TomArcherMsft/UserStory89659
User Story 89659
2023-05-25 10:30:25 -07:00
9b5bab7df2 Made suggested change 2023-05-24 12:26:18 -07:00
88d524b952 Made edits per Code Review 2023-05-24 11:59:56 -07:00
b316c4dd0d Ran 'terraform fmt' 2023-05-24 11:02:38 -07:00
36e167c702 Update TestRecord 2023-05-21 05:53:59 +00:00
bc381cc73e Changed admin username 2023-05-19 08:10:54 -07:00
40ac990971 Edits per Code Review 2023-05-19 08:03:44 -07:00
c7bd6dc586 Edits per Code Review 2023-05-18 11:07:54 -07:00
0e669e82ec updates 2023-05-16 21:33:19 -05:00
435ce1451b Update TestRecord 2023-05-14 05:30:18 +00:00
669f6c96c6 Added validation for workspace sku 2023-05-12 17:30:37 -07:00
71cee46b77 Ran 'terraform fmt' 2023-05-12 17:10:12 -07:00
b4d429be35 User Story 90135 2023-05-12 08:52:11 -07:00
3433d4d76d Changed deprecated TF resource (azurerm_virtual_machine) 2023-05-10 05:04:19 -07:00
3110ce9954 Merge pull request #221 from TomArcherMsft/UserStory89504
User Story 89504
2023-05-09 12:41:10 -07:00
7db7b5fa27 GitHub Issue #1125 - azure-dev-docs 2023-05-09 10:38:30 -07:00
d710a692c9 Update TestRecord 2023-05-07 06:02:14 +00:00
0a323c07bc Update TestRecord 2023-04-30 04:02:50 +00:00
a2b1d39edd Update TestRecord 2023-04-23 05:39:41 +00:00
c31337ee74 Update TestRecord 2023-04-22 02:37:43 +00:00
1c2b68b884 User Story 60501: 101-stream-analytics-job (#216)
* Part of POC to test generating sample code and articles using OpenAI.
2023-04-22 10:37:21 +08:00
817c23d293 Update TestRecord 2023-04-20 22:41:33 +00:00
9550abf245 User Story 60501: 101-sql-database (#217)
* Part of POC to test generating sample code and articles using OpenAI.

* Changes per Code Review
2023-04-21 06:41:18 +08:00
43fb22bcaf Update TestRecord 2023-04-17 06:35:35 +00:00
84e02fea91 Part of POC to test generating sample code and articles using OpenAI. (#212) 2023-04-17 14:35:14 +08:00
cb11824f70 Update TestRecord 2023-04-16 05:46:30 +00:00
6113f340a6 Update TestRecord 2023-04-12 18:17:30 +00:00
cdef177a64 Merge pull request #211 from TomArcherMsft/UserStory60501-notification-hub
User Story 60501: 101-notification-hub
2023-04-12 11:17:08 -07:00
67452c3289 New sample (converted from Bicep via OpenAI) 2023-04-12 09:30:19 -07:00
f90f330230 Update TestRecord 2023-04-11 19:55:39 +00:00
a74afd54bf Merge pull request #202 from TomArcherMsft/UserStory60501-ddos-protection-plan
User Story 60501: 101-ddos-protection-plan
2023-04-11 12:55:19 -07:00
55b9a77434 Update TestRecord 2023-04-09 05:30:27 +00:00
c23f636926 Update TestRecord 2023-04-05 02:55:25 +00:00
6ac4eb3abf User Story 60501: 101-key-vault-key (#203)
* New sample (converted from Bicep via OpenAI)
2023-04-05 10:55:02 +08:00
8d0f0dd09d Merge pull request #208 from TomArcherMsft/fix-cdn-sample
Added CDN profile name to outputs
2023-04-04 11:43:08 -07:00
5836e55603 Update TestRecord 2023-04-02 05:28:57 +00:00
53a8eaf5b3 Update TestRecord 2023-03-31 00:55:29 +00:00
3987ea0854 User Story 60501: batch-account-with-storage (#194)
* New sample (converted from Bicep via OpenAI)

* Edit per Code Review

* Changes per Code Review
2023-03-31 08:55:09 +08:00
27dba4b578 Added CDN profile name to outputs 2023-03-30 11:22:14 -07:00
12122dbf3d Update TestRecord 2023-03-30 16:43:41 +00:00
9d84541646 Merge pull request #195 from TomArcherMsft/UserStory60501-cdn-with-custom-origin
User Story 60501: cdn-with-custom-origin
2023-03-30 09:43:23 -07:00
47b979e026 Removed listing of unused variables from readme 2023-03-27 17:20:54 -07:00
665d3c64ee fixes in readme.md 2023-03-27 17:15:15 -07:00
08c275cf7a Output of fqdn 2023-03-27 17:11:24 -07:00
a2c685bc3f Merge branch 'master' of https://github.com/Azure/terraform into UserStory60501-ddos-protection-plan 2023-03-27 11:21:26 -07:00
cf415bbf2b Update TestRecord 2023-03-26 05:28:33 +00:00
30f1682c74 Fixes 2023-03-25 16:10:16 -07:00
a4ae7b817c New sample (converted from Bicep via OpenAI) 2023-03-25 11:12:55 -07:00
631c382fac Revert "rename file back to fix broken CI"
This reverts commit f3044799f3.
2023-03-23 10:42:48 +08:00
f3044799f3 rename file back to fix broken CI 2023-03-23 09:15:46 +08:00
8074be48ec Update TestRecord 2023-03-21 12:01:37 +00:00
bb3f78b7c6 fix 201-postgresql-fs-db example (#200) 2023-03-21 20:01:19 +08:00
e6e6068127 fix broken example (#201) 2023-03-21 20:01:05 +08:00
0806bf1677 Update TestRecord 2023-03-21 07:29:58 +00:00
14b200bbba fix broken example (#199) 2023-03-21 15:29:41 +08:00
298c56005b Update TestRecord 2023-03-21 00:37:04 +00:00
51841010fa Merge pull request #196 from TomArcherMsft/UserStory60501-cognitive-services-account
User Story 60501: cognitive-services-account
2023-03-20 17:18:12 -07:00
355bb60f88 Update TestRecord 2023-03-21 00:05:15 +00:00
73532b771a Merge pull request #193 from TomArcherMsft/UserStory60501-azure-cognitive-search
User Story 60501: azure-cognitive-search
2023-03-20 16:57:33 -07:00
fc577f6773 Update TestRecord 2023-03-19 05:17:21 +00:00
690c7ee48f Removed quotes from variable default column in README.MD 2023-03-18 13:41:58 -07:00
566ede9f1e New sample (converted from Bicep via OpenAI) 2023-03-18 13:34:12 -07:00
bb54b1f836 New sample (converted from Bicep via OpenAI) 2023-03-18 12:49:54 -07:00
771442acd4 New sample (converted from Bicep via OpenAI) 2023-03-17 12:00:33 -07:00
35b3afaf63 fix e2e test 2023-03-16 13:48:57 +08:00
e6a85b7606 Update TestRecord 2023-03-15 19:39:53 +00:00
819d49bdc9 Merge pull request #192 from TomArcherMsft/UserStory60501-aci-linuxcontainer-public-ip
User Story 60501: aci-linuxcontainer-public-ip
2023-03-15 12:39:25 -07:00
11eff2b14a ignore TestRecord 2023-03-15 09:06:49 +08:00
3fa3dc60a0 Update TestRecord 2023-03-15 00:49:34 +00:00
2f73fa933f Fix concurrent error in cosmosdb example (#191)
* fix concurrent error in cosmosdb example

* change to random_string to reduce the collision rate

* fix 101-cosmos-db-free-tier account name too long issue

---------

Co-authored-by: zjhe <hezijie@microsoft.com>
2023-03-15 08:49:16 +08:00
87a654c36c Changing ver info per Zijie 2023-03-14 13:41:19 -07:00
f8c0796ad4 Updated README 2023-03-14 13:20:25 -07:00
47483432a8 New sample (converted from Bicep via OpenAI) 2023-03-14 13:13:52 -07:00
c4d4d696a5 Update TestRecord 2023-03-13 23:25:10 +00:00
513af170ca Fix 101-front-door-standard-premium (#189)
* add random string to resource group name to avoid concurrent test issue

* change region to obtain quota

---------

Co-authored-by: zjhe <hezijie@microsoft.com>
2023-03-14 07:24:55 +08:00
3d1a3532c8 Update TestRecord 2023-03-13 23:24:40 +00:00
3cc146daba 101-front-door-premium-storage-blobs-private-link (#190)
Co-authored-by: zjhe <hezijie@microsoft.com>
2023-03-14 07:24:22 +08:00
b9a16174f1 Update TestRecord 2023-03-13 23:24:05 +00:00
8aa98d5569 Fix 101-storage-static-website (#188)
* fix 101-storage-static-website

---------

Co-authored-by: zjhe <hezijie@microsoft.com>
2023-03-14 07:23:47 +08:00
fcd4f1d54f Update TestRecord 2023-03-13 23:21:13 +00:00
bf49ecaafd Fix 101-synapse (#187)
* fix 101-synapse

Co-authored-by: zjhe <hezijie@microsoft.com>
2023-03-14 07:20:21 +08:00
03954463dc Update TestRecord 2023-03-13 22:45:49 +00:00
74df43335e Merge pull request #164 from TomArcherMsft/UserStory60501-azurerm_dns_zone
User Story 60501: azurerm_dns_zone
2023-03-13 15:45:30 -07:00
2032651394 Incorporating more feedback 2023-03-12 20:01:20 -07:00
1d00bbe97c add devcontainer config so we can have a better codespace environment 2023-03-13 10:53:30 +08:00
1e14200cda Update TestRecord 2023-03-12 06:06:51 +00:00
39ecf96c67 Used brackets to split long ternary conditional across multiple lines 2023-03-11 14:07:59 -08:00
3d2e3e7ae5 Removed heredoc attempt 2023-03-11 13:56:03 -08:00
3047ab006f Added heredoc syntax so that reader doesn't have to scroll horizontally 2023-03-11 12:21:02 -08:00
33a3b48bb5 Edits per Code Review 2023-03-11 11:05:40 -08:00
2d84414f76 Update TestRecord 2023-03-10 22:42:04 +00:00
ae25ed44ce Merge pull request #158 from TomArcherMsft/UserStory60501-azure-api-management-create
User Story 60501: Azure API Management
2023-03-10 14:41:48 -08:00
4c70e44527 Update TestRecord 2023-03-10 22:11:42 +00:00
c3ff407cc9 Merge pull request #186 from TomArcherMsft/UserStory60501-analysis-services-create
Changed var name
2023-03-10 14:11:22 -08:00
13e56f514d Removed unused variable 2023-03-09 17:56:34 -08:00
2f367438a0 Corrected version format 2023-03-09 17:51:11 -08:00
700fa7921e Changed var name 2023-03-09 13:01:57 -08:00
ce4ead51b5 Added info to readme 2023-03-09 12:30:19 -08:00
dc7eb43fc5 Updated outputs.tf to include rg name 2023-03-09 11:35:26 -08:00
562d51ac13 Edits per Code Review 2023-03-09 11:08:55 -08:00
40cd7a974e Update TestRecord 2023-03-08 20:48:54 +00:00
042640b2df fix weekly e2e test permission issue 2023-03-08 22:31:04 +08:00
800ed76ce6 fix weekly e2e test permission issue 2023-03-08 14:13:17 +08:00
32196f0dd6 Update TestRecord 2023-03-07 20:02:29 +00:00
3fd4b1b0a7 Merge pull request #155 from TomArcherMsft/UserStory60501-analysis-services-create
User Story 60501: Azure Analysis Services
2023-03-07 12:02:06 -08:00
5a1bf92dd1 Ran 'terraform fmt' 2023-03-07 05:46:49 -08:00
bdf176ca43 fix weekly e2e test 2023-03-06 15:36:19 +08:00
cdc2e20046 Update TestRecord 2023-03-06 07:06:18 +00:00
c7dcad203c fix 101-front-door-premium-storage-blobs-private-link (#185) 2023-03-06 15:06:00 +08:00
e9e0d03cc3 Update TestRecord 2023-03-06 05:49:00 +00:00
327a771a19 101-managed-instance patch (#181)
* fix example
2023-03-06 13:48:38 +08:00
0b3252df72 Edits per Tech Review 2023-03-05 18:11:41 -08:00
6f269e7869 Update TestRecord 2023-03-06 02:00:17 +00:00
4264b769e8 fix example (#177) 2023-03-06 09:59:55 +08:00
24f9f839b9 try to fix weekly-e2e commit issue 2023-03-06 09:55:09 +08:00
c0efebc9f3 Update TestRecord 2023-03-02 05:42:15 +00:00
5e48773198 201-web-app-postgres-keyvault patch (#179)
* fix example
2023-03-02 13:41:59 +08:00
95a5b0cac4 Update TestRecord 2023-03-02 05:38:55 +00:00
42921d4a1f fix example (#178) 2023-03-02 13:38:37 +08:00
52ada02207 Update TestRecord 2023-03-02 05:37:46 +00:00
452dac32c9 101-machine-learning patch (#172)
* fix 101-machine-learning example

* fix example
2023-03-02 13:37:30 +08:00
7c06cacc7e Update TestRecord 2023-03-02 05:36:22 +00:00
841ae58a2f Removed unused variable. (#165) 2023-03-02 13:36:02 +08:00
dfb496f340 Update TestRecord 2023-03-02 02:55:07 +00:00
8dca60b848 201-mysql-fs-db patch (#182)
* fix example

* fix example

* fix example
2023-03-02 10:54:49 +08:00
b32087dbf6 Update TestRecord 2023-03-01 02:23:31 +00:00
819a4b141d fix 201-aks-helm (#183) 2023-03-01 10:23:16 +08:00
4b813f543c Update TestRecord 2023-03-01 02:22:55 +00:00
a09536cbbe User story66570 (#184)
* Changes to VM image; Added type attr to all vars
2023-03-01 10:22:35 +08:00
082873b8e4 Merge pull request #180 from TomArcherMsft/UserStory60501-devtest-lab
Updates to 101-devtest-labs sample
2023-02-27 12:58:21 -08:00
33a101cd1d Added output of values 2023-02-27 12:14:54 -08:00
190850d393 Update TestRecord 2023-02-24 07:25:41 +00:00
2eba295342 101-web-app-windows-dotnet patch (#173)
* fix 101-web-app-windows-dotnet example
2023-02-24 15:25:22 +08:00
86ffc09726 Update TestRecord 2023-02-24 07:24:43 +00:00
a543607bdd fix 101-web-app-linux-java example (#174) 2023-02-24 15:24:23 +08:00
4ada2e44f0 Update TestRecord 2023-02-24 07:23:34 +00:00
b2d0dbc2e7 fix example (#176) 2023-02-24 15:23:15 +08:00
2bbd727b41 Update TestRecord 2023-02-24 06:58:10 +00:00
077374c7c6 fix 101-web-app-linux-container example (#175) 2023-02-24 14:57:52 +08:00
20d8beea6d Update TestRecord 2023-02-23 23:08:09 +00:00
9deef32e75 Merge pull request #154 from TomArcherMsft/UserStory60501-devtest-lab
User Story 60501: devtest-labs
2023-02-23 15:07:50 -08:00
6f0c59c97f Update TestRecord 2023-02-23 18:39:47 +00:00
eb63491dc1 Merge pull request #168 from lonegunmanb/f-201-aks-acr-identity
Fix 201-aks-acr-identity
2023-02-23 10:39:30 -08:00
19d21ddcfa Merge pull request #2 from lonegunmanb/UserStory60501-devtest-lab
Fix 101-devtest-labs automation test by adding some default value for variables
2023-02-22 18:48:12 -08:00
dfcd06404e add type for variables 2023-02-23 09:26:31 +08:00
93f6488941 fix 101-devtest-labs automation test 2023-02-23 09:23:44 +08:00
3028ca87db upgrade default node pool type 2023-02-22 09:42:01 +08:00
3aa58b926f Update TestRecord 2023-02-22 01:32:34 +00:00
343534d2ec 201-aks-rbac-dashboard-admin patch (#148)
* fix 201-aks-rbac-dashboard-admin

* remove azuread provider block

* rename aks resource to main

---------

Co-authored-by: zjhe <hezijie@microsoft.com>
2023-02-22 09:32:13 +08:00
6e59008b91 Update TestRecord 2023-02-21 06:29:15 +00:00
ef09110e94 101-front-door-classic patch (#170)
* fix example
2023-02-21 14:28:55 +08:00
0ba1d6ae57 Update TestRecord 2023-02-21 06:18:07 +00:00
4e0ad3a89c 101-firewall-standard patch (#169)
* fix example

* add variable type
2023-02-21 14:17:48 +08:00
559ba2cdf0 amending azurerm provider block to fix this exmaple 2023-02-21 11:27:41 +08:00
30427c1bf9 fix incorrect depends_on 2023-02-21 10:46:56 +08:00
a198987b19 use identity 2023-02-21 10:38:21 +08:00
1e7ae5e1c8 Update TestRecord 2023-02-21 02:17:51 +00:00
a0db8af3a5 fix example (#167) 2023-02-21 10:17:36 +08:00
ed79d1aa3b fix 201-aks-acr-identity 2023-02-21 10:14:26 +08:00
30ab022102 Update TestRecord 2023-02-19 01:53:22 +00:00
e6f76b868e Update TestRecord 2023-02-18 05:10:13 +00:00
7afaf61150 revert deletion of aci.tf to fix broken doc build pipeline (#166)
Co-authored-by: zjhe <hezijie@microsoft.com>
2023-02-18 13:09:57 +08:00
82ec8c1eab Update TestRecord 2023-02-17 04:59:48 +00:00
5d3a3f367c 201-vm-disk-encryption-extension patch (#152) 2023-02-17 12:59:18 +08:00
624d602345 Update TestRecord 2023-02-17 02:29:31 +00:00
f4ddf1cd2e fix 101-cosmos-db-serverside-functionality example (#163) 2023-02-17 10:29:14 +08:00
c4d0e56052 Update TestRecord 2023-02-17 01:46:32 +00:00
c5185847d9 fix 101-cosmos-db-azure-container-instance example (#159) 2023-02-17 09:46:14 +08:00
2705688717 Update TestRecord 2023-02-17 01:45:47 +00:00
cf17d34de4 fix 101-cosmos-db-manualscale example (#162) 2023-02-17 09:45:31 +08:00
87e15c5c8a Update TestRecord 2023-02-17 01:45:18 +00:00
3e43a4eae0 fix 101-cosmos-db-free-tier example (#160) 2023-02-17 09:44:57 +08:00
f3b13826b1 Removed artifact 2023-02-16 13:32:15 -08:00
40bbcd79d4 New sample (converted from Bicep via OpenAI) 2023-02-16 13:29:36 -08:00
def91ae46b Edits per Code Review 2023-02-16 11:15:46 -08:00
8d76264d99 Edits per Code Review 2023-02-16 11:04:32 -08:00
d8e9d4b7ae Edits per Code Review 2023-02-16 10:55:02 -08:00
66edc2e080 New sample 2023-02-16 06:00:37 -08:00
d8c965a294 Update TestRecord 2023-02-16 06:35:47 +00:00
99e0a341a1 fix 101-cosmos-db-autoscale example (#157) 2023-02-16 14:35:27 +08:00
4d37eb18bf Update TestRecord 2023-02-16 05:35:34 +00:00
07573fcb7a 201-vmss-disk-encryption-extension patch (#153)
* fix 201-vmss-disk-encryption-extension example
2023-02-16 13:35:14 +08:00
e3525093f0 Example of OpenAI generated article 2023-02-15 16:02:33 -08:00
d57838d056 Updated README.MD 2023-02-15 13:15:52 -08:00
bef739cc06 Added log file 2023-02-15 12:27:05 -08:00
deeba27652 New sample (converted from Bicep via OpenAI) 2023-02-15 10:27:14 -08:00
c2a3a784d8 Update TestRecord 2023-02-14 06:01:48 +00:00
5557a85e0b fix 101-cosmos-db-aad-rbac example (#144) 2023-02-14 14:01:24 +08:00
911b419f25 Update TestRecord 2023-02-14 05:38:00 +00:00
77c841daa2 201-confidential-vmss patch (#142)
* fix 201-confidential-vmss example
2023-02-14 13:37:44 +08:00
44e546e979 Update TestRecord 2023-02-14 02:01:11 +00:00
e8f97f4e5d rename gw resource to main (#151)
Co-authored-by: zjhe <hezijie@microsoft.com>
2023-02-14 10:00:49 +08:00
f51789dfe5 Update TestRecord 2023-02-13 09:47:53 +00:00
JT
cab55217b4 201-aks-log-analytics patch (#150)
* 201-aks-log-analytics patch
2023-02-13 17:47:34 +08:00
107616137c Update TestRecord 2023-02-13 09:28:27 +00:00
f4a4eed225 fix 101-application-gateway (#149)
Co-authored-by: zjhe <hezijie@microsoft.com>
2023-02-13 17:28:10 +08:00
bbe290c906 Update TestRecord 2023-02-12 01:04:14 +00:00
c7fcee840c Update TestRecord 2023-02-11 03:34:39 +00:00
5ca09eaaf6 201-confidential-vm patch (#146)
* fix 201-confidential-vm example

---------

Co-authored-by: zjhe <hezijie@microsoft.com>
2023-02-11 11:34:22 +08:00
da7427ee53 Update TestRecord 2023-02-11 03:34:02 +00:00
031b021fae change analytical_storage_ttl default value to -1 (#147) 2023-02-11 11:33:44 +08:00
3f692e024a Update TestRecord 2023-02-10 07:17:44 +00:00
62fe33ce64 101-attestation-provider patch (#145)
* try to fix 101-attestation-provider

---------

Co-authored-by: zjhe <hezijie@microsoft.com>
2023-02-10 15:17:25 +08:00
cdd05cd894 update test framework to use msi id when possible, update gitignore file 2023-02-10 15:03:31 +08:00
82a1bc5993 Update TestRecord 2023-02-10 03:06:51 +00:00
a522c44462 101-cosmos-db-analyticalstore patch (#143)
* change azurerm version

* add default values
2023-02-10 11:06:33 +08:00
9a4284c545 Update TestRecord 2023-02-10 02:14:53 +00:00
6baa9203b7 201-confidential-os-disk patch (#141)
* add default value for variables; add random string for rgn
2023-02-10 10:14:32 +08:00
dd30e9384e Uploaded updated sample for HashiCorp article (#135) 2023-02-08 10:37:41 +08:00
aa014f1118 Update TestRecord 2023-02-05 00:50:39 +00:00
62c65dcf48 add ci (#140) 2023-02-04 20:12:13 +08:00
6ec09b5972 Merge pull request #134 from ericd-mst-github/erd-windows-terraform
created new 101 folder and added tf files and readme.md
2023-01-26 11:13:35 -08:00
141c927011 corrected markdown table format 2023-01-12 19:21:11 -05:00
adbdb46a71 added default column and values to readme.md 2023-01-10 16:39:20 -05:00
9c625d05b4 removed depends_on line 2023-01-10 14:06:48 -05:00
1eb6e680f9 created new 101 folder and added tf files and readme.md 2022-12-15 10:42:43 -05:00
a830531ca9 Merge pull request #129 from johndowns/quickstart-101-front-door-premium-storage-blobs-private-link
Add quickstart for Front Door Premium with blob origin and Private Link
2022-12-13 09:28:59 -08:00
06955e5e54 Update readme 2022-11-25 20:52:33 +13:00
0bc2f2b309 Updates 2022-11-25 20:45:11 +13:00
b7d0d3fd2c Add quickstart 2022-11-25 19:28:32 +13:00
276af30347 Merge pull request #122 from johndowns/quickstart-101-front-door-standard-premium
Add quickstart for Front Door Standard/Premium
2022-11-21 13:43:11 -08:00
fb65ceaa11 Merge pull request #121 from johndowns/quickstart-101-front-door-classic
Add quickstart for Front Door (classic)
2022-11-21 13:42:38 -08:00
bf90566b86 Merge pull request #124 from murggu/murggu/synapse-101
Add Synapse 101 and 201 quickstarts
2022-11-21 13:00:44 -08:00
f40d33642c Fix PR comments 2022-11-21 11:35:48 +01:00
664d1069b8 remova .gitignores 2022-11-18 22:17:36 +01:00
d5a7e742a2 fix tfvars example 2022-11-18 22:14:08 +01:00
eb6b615ae3 fix comments 2022-11-18 22:12:00 +01:00
497661a7aa Update readme 2022-11-18 12:48:30 +13:00
5e0b259c1e Updates from PR review 2022-11-18 12:46:31 +13:00
eaa4dedbd4 Updates from PR review 2022-11-18 12:41:32 +13:00
8d63bf55f2 Merge pull request #34 from charotAmine/fix-appservice-linux
fix stack settings
2022-11-17 14:55:18 -08:00
3ecb5bf13c Merge pull request #48 from jlpedrosa/contrib_gopath_update
Update clone path in contribution readme
2022-11-17 14:54:01 -08:00
e2cb1d3cd2 Merge pull request #49 from jlpedrosa/contrib_provider_location
Add other options to locate terraform provider binary
2022-11-17 14:53:24 -08:00
9ee8a53341 Merge pull request #50 from jlpedrosa/contrib_docs_env_options
Add the configuration to use the integrated UI in vscode
2022-11-17 14:52:39 -08:00
431c9e062e Merge pull request #52 from c4m4/master
Replacing Reader with AcrPull in azurerm_role_assignment.aks_acr
2022-11-17 14:49:46 -08:00
878ca149f9 Merge pull request #128 from jloeffler7/explicitly-disable-storage-public-blob-access
Explicitly disable storage blob public access for workspace templates
2022-11-17 14:45:51 -08:00
665947ee0e Fix formatting 2022-11-17 17:43:12 -05:00
a9d3c7dc30 Merge pull request #125 from harrycruz/patch-1
Update main.tf
2022-11-17 13:28:43 -08:00
fb2d3928a9 Explicitly disable storage blob public access for workspace templates 2022-11-17 11:03:43 -05:00
96afa1f2cd Add example for azure function app using key vault reference (#114)
add examples for function app using key vault reference
2022-11-16 14:54:13 +08:00
e32966e242 Adding guidance for function app (#116)
* adding guidance for function app
2022-11-16 13:56:21 +08:00
150b11b528 Update main.tf
Proposing update of repository as per suggestion of https://github.com/Azure/terraform/issues/101. Otherwise, the code as is cannot be initialized. Thank you!
2022-11-09 22:29:14 +01:00
a0ddf338d3 update readme.md 2022-11-08 13:57:31 +01:00
d65c97c307 Add synapse 201 2022-11-08 13:47:23 +01:00
ebf66eab0b add tags 2022-11-08 12:58:29 +01:00
a165449f64 Update README.md 2022-11-08 12:52:09 +01:00
063a26bb31 Add synapse 101 2022-11-08 12:47:54 +01:00
329bfd1f6e Merge pull request #111 from urosran/sql-managed-instance
- SQL Managed Instance Minimal Example
2022-11-04 14:53:42 -07:00
25a6da8b00 Merge remote-tracking branch 'origin/master' into sql-managed-instance 2022-11-04 11:44:12 +01:00
66f805be99 Merge remote-tracking branch 'origin/master' into sql-managed-instance 2022-11-04 11:42:42 +01:00
e70d967524 remove depends on clauses 2022-11-04 09:59:03 +01:00
f0587e9875 Merge pull request #123 from jensheerin/patch-1
Update moduleUrl
2022-10-31 10:44:16 -07:00
15221652a1 Update moduleUrl
Update URL with latest configuration zip file
2022-10-30 22:30:06 -04:00
c370e76a95 Merge pull request #119 from kgremban/master
new quickstart sample 201-device-provisioning-service
2022-10-27 13:50:34 +08:00
20eba75a88 Update readme 2022-10-25 10:23:04 +13:00
3226d364a8 Add quickstart 2022-10-25 10:20:57 +13:00
c008240f61 Add quickstart for Front Door (classic) 2022-10-25 10:13:53 +13:00
24645b6398 Review fixes and updated readme 2022-10-14 11:15:49 -07:00
db43ecd3a5 lonegunmanb feedback 2022-10-12 11:43:29 -07:00
8a9f0ff064 rename folder 2022-10-03 09:38:38 -07:00
f4775c5bf6 new quickstart sample 101-device-provisioning-service 2022-09-29 14:52:07 -07:00
3b5aa1adc5 - format 2022-09-06 12:52:48 +02:00
079f82b656 - pr comments 2022-09-06 12:52:01 +02:00
467e0a67f7 Merge pull request #112 from TomArcherMsft/UserStory1983528
User Story 1983528
2022-09-01 10:33:30 +08:00
4c228bd73e Fixed table format 2022-08-31 09:35:54 -07:00
4321812b10 Fixed table format 2022-08-31 09:34:42 -07:00
bfd9232a64 Fixed table format 2022-08-31 09:32:59 -07:00
373e9b1e09 Forcing PR creation 2022-08-31 09:27:45 -07:00
cfe7e1086d - pr comments 2022-08-31 15:17:30 +02:00
8e632a3be6 - remove all outputs for now 2022-08-31 13:49:09 +02:00
6bd1ba4c6e - first commit 2022-08-31 13:47:23 +02:00
5b72658397 Merge pull request #110 from TomArcherMsft/UserStory1983164
User Story 1983164
2022-08-31 11:33:26 +08:00
2633db1ff1 Updated azurerm provider version constraint 2022-08-30 20:26:35 -07:00
ebaa5f71de Updated azurerm provider version constraint 2022-08-30 20:16:54 -07:00
ec38ba616c Updated names per Azure requirements 2022-08-30 13:53:03 -07:00
49b61b78a2 Updated azurerm_cosmosdb_account attribute name 2022-08-30 13:27:51 -07:00
22350913fd Moving cosmosdb quickstart code to samples repo 2022-08-30 10:54:01 -07:00
cb17e827ba Merge pull request #105 from Azure/users/GitHubPolicyService/46ac6b72-fb6d-4399-a02a-714c519189f1
Adding Microsoft SECURITY.MD
2022-08-30 11:37:32 +08:00
5481663a4b Merge pull request #109 from TomArcherMsft/UserStory1982922
User Story 1982922
2022-08-30 09:23:18 +08:00
03f800dbe4 Relaxing version constraint on tls provider 2022-08-29 18:19:05 -07:00
71e54587eb Changed resource names to snake case 2022-08-29 18:16:52 -07:00
85f9e9a803 Added tls provider block 2022-08-29 17:45:43 -07:00
7cf420ddb5 Updated readme for several samples 2022-08-29 16:41:46 -07:00
0a1a441dc9 Updated readme with terraform types being utilized 2022-08-29 16:24:11 -07:00
62b49e2a91 Added code 2022-08-29 15:43:40 -07:00
9072d1d114 Moving create-linux-vm-with-infrastructure article code to engineering team sample repo 2022-08-29 15:30:41 -07:00
0016d17db4 Merge pull request #108 from TomArcherMsft/UserStory1981979
User Story 1981979
2022-08-30 03:06:39 +08:00
363738bfca Merge pull request #1 from lonegunmanb/UserStory1981979_zj
Re-org code structure and fix a potential bug caused by `random_password.password`.
2022-08-29 07:45:39 -07:00
e3c66ca15d Sort all variables, outputs, arguments and blocks in resource block.
Adjust code file's style.
Add `numeric = false` for `random_string.name` in `201-mysql-fs-db` module as the name is used as `azurerm_mysql_flexible_server.default`'s `administrator_login` and the login name doesn't support a name start with number.
Add minimum constraints for `random_password.password` in `201-mysql-fs-db` module as the password required a minimum complexity.
2022-08-29 17:03:29 +08:00
65cb9c7f0e more changes 2022-08-29 00:05:42 -07:00
dceafac08d more changes 2022-08-28 23:51:22 -07:00
7305ee2a26 changing array syntax 2022-08-28 23:45:08 -07:00
bd27b46fdc fixing random provider info 2022-08-28 23:39:27 -07:00
b6f52f38d3 changes per tech review 2022-08-28 23:30:10 -07:00
e866f8430d readme files 2022-08-28 09:12:59 -07:00
0bb3ff10c1 readme files 2022-08-28 08:17:56 -07:00
df14b6229d Marked various output values as sensitive 2022-08-27 22:19:04 -07:00
7b46e0c27a Removed deprecated block and fixed sku value 2022-08-27 22:08:55 -07:00
0419cad12a Updating main to use new rg var name 2022-08-27 21:25:20 -07:00
9a26ecdd6c Updating main to use new rg var name 2022-08-27 21:22:02 -07:00
1f4ae04892 Fixing article 2022-08-27 18:54:06 -07:00
4832632b2c Merge pull request #107 from TomArcherMsft/UserStory1977015
User Story 1977015
2022-08-24 22:27:43 +08:00
1eb58101ba Per review, changed var name from camel case to snake case 2022-08-24 07:01:30 -07:00
1043acb836 Per review, removed blank line 2022-08-24 06:55:46 -07:00
4a706b9f6d Ran 'terraform fmt' against code being modified in this PR' 2022-08-24 06:50:04 -07:00
32a23622d0 Updated file naming per review 2022-08-24 06:43:54 -07:00
de3b6a2a42 Updated variables to snake case per review 2022-08-24 06:35:20 -07:00
26a919e903 Updating code to align with Contributor Guide template 2022-08-23 19:02:18 -07:00
efb8caa590 Replacing Reader with AcrPull in azurerm_role_assignment.aks_acr 2020-07-18 13:19:53 +02:00
9a88dd7a8c Add the configuration to use the integrated UI in vscode 2020-06-19 17:35:09 +01:00
a862be723e Add other options to locate terraform provider binary 2020-06-19 14:34:12 +01:00
91d4d99a37 Update clone path in contribution readme 2020-06-19 13:43:06 +01:00
378f92b8d7 fix stack settings 2019-11-10 12:24:38 +01:00
609 changed files with 109991 additions and 5044 deletions

View File

@ -0,0 +1,26 @@
{
"image": "mcr.microsoft.com/azterraform:latest",
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--init",
"--network=host"
],
"mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
"customizations": {
"vscode": {
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.goroot": "/usr/local/go"
},
"extensions": [
"hashicorp.terraform",
"golang.Go"
]
}
}
}

2
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,2 @@
.github/workflows/ @lonegunmanb @TomArcherMsft
.github/CODEOWNERS @lonegunmanb @TomArcherMsft

60
.github/workflows/e2e.yaml vendored Normal file
View File

@ -0,0 +1,60 @@
name: E2E Test Check
on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '.github/workflows/**'
- 'quickstart/**'
- 'test/**'
- 'test/e2e/**'
permissions:
actions: write
contents: read
id-token: write
jobs:
e2e-check:
runs-on: ubuntu-latest
environment:
name: test
steps:
- name: Checking for Fork
shell: pwsh
run: |
$isFork = "${{ github.event.pull_request.head.repo.fork }}"
if($isFork -eq "true") {
echo "### WARNING: This workflow is disabled for forked repositories. Please follow the [release branch process](https://azure.github.io/Azure-Verified-Modules/contributing/terraform/terraform-contribution-flow/#5-create-a-pull-request-to-the-upstream-repository) if end to end tests are required." >> $env:GITHUB_STEP_SUMMARY
}
- name: checkout
if: github.event.pull_request.head.repo.fork == false
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
- name: Get changed files
if: github.event.pull_request.head.repo.fork == false
id: changed-files
uses: tj-actions/changed-files@v34
with:
dir_names: "true"
separator: ","
files: "quickstart/*"
files_ignore: "**/TestRecord.md"
dir_names_max_depth: 2
- name: test pr
if: github.event.pull_request.head.repo.fork == false
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "change files" $ALL_CHANGED_FILES
export ARM_OIDC_REQUEST_TOKEN=$ACTIONS_ID_TOKEN_REQUEST_TOKEN
export ARM_OIDC_REQUEST_URL=$ACTIONS_ID_TOKEN_REQUEST_URL
export ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }}
export ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }}
export ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }}
export CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
docker run --rm -v $(pwd):/src -w /src/test --network=host -e MSI_ID -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_CLIENT_ID -e ARM_OIDC_REQUEST_TOKEN -e ARM_OIDC_REQUEST_URL -e ARM_USE_OIDC=true -e CHANGED_FOLDERS mcr.microsoft.com/azterraform:latest sh -c "pkenv install 1.10.2 && go mod tidy && go test -timeout=360m -v ./e2e"
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
with:
name: TestRecord-${{ inputs.pr_number }}
retention-days: 60
path: |
quickstart/**/TestRecord.md.tmp

30
.github/workflows/pr-check.yaml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Pre Pull Request Check
on:
pull_request:
types: [ 'opened', 'synchronize' ]
paths:
- '.github/**'
- '.github/workflows/**'
- 'quickstart/**'
jobs:
prepr-check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f #v41.0.1
with:
dir_names: "true"
separator: ","
files: "quickstart/*"
dir_names_max_depth: 2
- name: pr-check
run: |
export CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
if [ -z "${{ github.event.number }}" ]; then
CHANGED_FOLDERS=$(find ./quickstart -maxdepth 1 -mindepth 1 -type d | tr '\n' ',')
fi
docker run --rm -v $(pwd):/src -w /src -e CHANGED_FOLDERS mcr.microsoft.com/azterraform:latest make pr-check

42
.github/workflows/pr-merged.yaml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Main Branch Push
on:
push:
branches:
- main
- master
paths:
- 'quickstart/**'
permissions:
actions: write
contents: write
jobs:
main-branch-push:
runs-on: ubuntu-latest
steps:
- name: get-default-branch
run: |
branch=$(curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY" | jq -r '.default_branch')
echo "default_branch=$branch" >> $GITHUB_ENV
- name: checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
- uses: 8BitJonny/gh-get-current-pr@2215326c76d51bfa3f2af0a470f32677f6c0cae9 #2.1.0
id: PR
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e #v2.28.0
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: e2e.yaml
pr: ${{ steps.PR.outputs.number }}
name: TestRecord-${{ steps.PR.outputs.number }}
path: TestRecord
if_no_artifact_found: ignore
- name: Update
run: |
sh scripts/update-test-record.sh
- name: Commit & Push changes
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'Update TestRecord'
branch: ${{ env.default_branch }}

40
.github/workflows/weekly-e2e.yaml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Weekly E2E Test Check
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
actions: write
contents: write
jobs:
full-e2e-check:
runs-on: [self-hosted, 1ES.Pool=terraform-azurerm-doc]
timeout-minutes: 1440
environment:
name: crontests
steps:
- name: checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
- name: test all examples
continue-on-error: true
timeout-minutes: 1440
run: |
git config --global --add safe.directory '*'
az login --identity --username $MSI_ID > /dev/null
export ARM_SUBSCRIPTION_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .id')
export ARM_TENANT_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .tenantId')
ARM_CLIENT_ID=$(az identity list | jq -r --arg MSI_ID "$MSI_ID" '.[] | select(.principalId == $MSI_ID) | .clientId')
docker run --rm -v $(pwd):/src -w /src/test -e MSI_ID -e ARM_SUBSCRIPTION_ID -e ARM_CLIENT_ID -e ARM_TENANT_ID -e ARM_USE_MSI=true -e CHANGED_FOLDERS mcr.microsoft.com/azterraform sh -c "go mod tidy && go test -timeout=1440m -parallel 10 -v ./e2e"
- name: Update
run: |
docker run --rm -v $(pwd):/src -w /src mcr.microsoft.com/azterraform sh scripts/update-test-record.sh
cd .git
sudo chmod -R a+rwX .
sudo find . -type d -exec chmod g+s '{}' +
- name: Commit & Push changes
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'Update TestRecord'
branch: ${{ env.default_branch }}

12
.gitignore vendored
View File

@ -9,4 +9,14 @@ _repo.*/
.idea .idea
.ionide/ .ionide/
.openpublishing.buildcore.ps1.vscode/ .openpublishing.buildcore.ps1.vscode/
*.DS_Store *.DS_Store
.terraform
.terraform.lock.hcl
*.tmp
go.sum
TestRecord
**/TestRecord.md.tmp
terraform.tfstate
terraform.tfstate.backup

10
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,10 @@
# Microsoft Open Source Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
Resources:
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)

90
GNUmakefile Normal file
View File

@ -0,0 +1,90 @@
fmt:
@echo "==> Fixing source code with gofmt..."
# This logic should match the search logic in scripts/gofmtcheck.sh
find . -name '*.go' | grep -v vendor | xargs gofmt -s -w
fumpt:
@echo "==> Fixing source code with Gofumpt..."
# This logic should match the search logic in scripts/gofmtcheck.sh
find . -name '*.go' | grep -v vendor | xargs gofumpt -w
gosec:
@echo "==> Checking go code with gosec..."
cd test && gosec -tests ./...
tffmt:
@echo "==> Formatting terraform code..."
terraform fmt -recursive
tffmtcheck:
@sh "$(CURDIR)/scripts/terraform-fmt.sh"
tfvalidatecheck:
@sh "$(CURDIR)/scripts/terraform-validate.sh"
terrafmtcheck:
@sh "$(CURDIR)/scripts/terrafmt-check.sh"
gofmtcheck:
@sh "$(CURDIR)/scripts/gofmtcheck.sh"
@sh "$(CURDIR)/scripts/fumptcheck.sh"
golint:
@sh "$(CURDIR)/scripts/run-golangci-lint.sh"
tflint:
@sh "$(CURDIR)/scripts/run-tflint.sh"
lint: golint tflint gosec
checkovcheck:
@sh "$(CURDIR)/scripts/checkovcheck.sh"
checkovplancheck:
@sh "$(CURDIR)/scripts/checkovplancheck.sh"
fmtcheck: tfvalidatecheck # tffmtcheck terrafmtcheck
pr-check: fmtcheck
unit-test:
@sh "$(CURDIR)/scripts/run-unit-test.sh"
e2e-test:
@sh "$(CURDIR)/scripts/run-e2e-test.sh"
version-upgrade-test:
@sh "$(CURDIR)/scripts/version-upgrade-test.sh"
terrafmt:
@echo "==> Fixing test and document terraform blocks code with terrafmt..."
@find . -name '*.md' -o -name "*.go" | grep -v -e '.github' -e '.terraform' -e 'vendor' | while read f; do terrafmt fmt -f $$f; done
pre-commit: tffmt terrafmt depsensure fmt fumpt generate
depsensure:
@sh "$(CURDIR)/scripts/deps-ensure.sh"
depscheck:
@sh "$(CURDIR)/scripts/deps-check.sh"
generate:
@echo "--> Generating doc"
@rm -f .terraform.lock.hcl
@terraform-docs markdown table --output-file README.md --output-mode inject ./
@markdown-table-formatter README.md
gencheck:
@echo "==> Generating..."
@cp README.md README-generated.md
@terraform-docs markdown table --output-file README-generated.md --output-mode inject ./
@markdown-table-formatter README-generated.md
@echo "==> Comparing generated code to committed code..."
@diff -q README.md README-generated.md || \
(echo; echo "Unexpected difference in generated document. Run 'make pre-commit' to update the generated document and commit."; exit 1)
test: fmtcheck
@TEST=$(TEST) ./scripts/run-gradually-deprecated.sh
@TEST=$(TEST) ./scripts/run-test.sh
.PHONY: fmt fmtcheck pr-check

View File

@ -1,24 +1,24 @@
# Contributing # Contributing
This project welcomes contributions and suggestions. This project welcomes contributions and suggestions.
## Modules ## Modules
Module summary Module summary
[Module contribution guide](./module/CONTRIBUTE.md) [Module contribution guide](./module/CONTRIBUTE.md)
## Providers ## Providers
Provider summary Provider summary
[Provider contribution guide](./provider/CONTRIBUTE.md) [Provider contribution guide](./provider/CONTRIBUTE.md)
# Contributing # Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com. the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA. provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

View File

@ -44,7 +44,7 @@ If you are running Windows, then you need to install Git Bash and Make for Windo
First, go to the [AzureRM Terraform provider](https://github.com/terraform-providers/terraform-provider-azurerm) project page and fork the repository into your GitHub account. First, go to the [AzureRM Terraform provider](https://github.com/terraform-providers/terraform-provider-azurerm) project page and fork the repository into your GitHub account.
Once done, you need to clone your fork into the `$GOPATH/src/github.com/terraform-providers/terraform-provider-azurerm` folder. As the provider uses go modules, you can clone the repository in any path.
## Build the sources ## Build the sources
@ -73,6 +73,9 @@ If the third-party plugin folder is empty, the init operation will download the
More information [here](https://www.terraform.io/docs/extend/how-terraform-works.html#plugin-locations). More information [here](https://www.terraform.io/docs/extend/how-terraform-works.html#plugin-locations).
`terraform init` will look for the providers in the folder where the `.tf` files are located, so it is possible to just copy the provider from `$GOPATH/bin` to your current folder and it will be used instead of getting downloaded.
## Debug the AzureRM provider using Visual Studio Code and Delve ## Debug the AzureRM provider using Visual Studio Code and Delve
It is possible to use Visual Studio Code and Delve (the Golang debugger) to debug the AzureRM provider. It is possible to use Visual Studio Code and Delve (the Golang debugger) to debug the AzureRM provider.
@ -131,6 +134,20 @@ ARM_TEST_LOCATION_ALT=<AZURE_LOCATION_2>
TF_ACC=1 TF_ACC=1
``` ```
If you would preffer to use the UI to launch the tests, it is aso possible to specify the environment variables used by vscode integrated testing by modifying the settings.json. Two options are available
* Use the built in variables definition:
```json
"go.testEnvVars": {
"ARM_CLIENT_ID" : "<YOUR_SERVICE_PRINCIPAL_CLIENT_ID>"
...
...
},
```
* Use the contents of a file as `private.env`
```json
"go.testEnvFile": "${workspaceRoot}/.vscode/private.env"
```
*Note: it is possible to customize the logging level of Terraform. It might be super useful in some situations. It can be done by setting the `TF_LOG` environment variable. Refer to [the official debugging documentation](https://www.terraform.io/docs/internals/debugging.html) for more details.* *Note: it is possible to customize the logging level of Terraform. It might be super useful in some situations. It can be done by setting the `TF_LOG` environment variable. Refer to [the official debugging documentation](https://www.terraform.io/docs/internals/debugging.html) for more details.*
Once done, you can just press F5 and the debug will start! You can place breakpoints in your code to do step by step debugging: Once done, you can just press F5 and the debug will start! You can place breakpoints in your code to do step by step debugging:

View File

@ -0,0 +1,918 @@
## 08 Sep 24 00:21 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 00:21 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 00:21 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 00:20 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 00:24 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 00:22 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 01:02 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 28 Jan 24 00:23 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.89.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 21 Jan 24 00:18 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.88.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 14 Jan 24 00:17 UTC
Success: true
### Versions
Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.87.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 07 Jan 24 00:17 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.86.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 31 Dec 23 00:19 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 24 Dec 23 00:19 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 17 Dec 23 00:25 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 10 Dec 23 00:25 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.84.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 04 Dec 23 02:19 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.83.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 26 Nov 23 00:23 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.82.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 19 Nov 23 00:16 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.81.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 12 Nov 23 00:22 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.80.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 05 Nov 23 00:22 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.79.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 29 Oct 23 00:23 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.78.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 22 Oct 23 00:17 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.77.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 15 Oct 23 00:23 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.76.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 08 Oct 23 00:16 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 01 Oct 23 00:23 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 24 Sep 23 00:22 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.74.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Sep 23 06:26 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 17 Sep 23 00:10 UTC
Success: true
### Versions
Terraform v1.5.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 10 Sep 23 00:17 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.72.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 03 Sep 23 00:10 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 27 Aug 23 00:16 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Aug 23 00:17 UTC
Success: true
### Versions
Terraform v1.5.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.70.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 13 Aug 23 00:10 UTC
Success: true
### Versions
Terraform v1.5.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.69.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 06 Aug 23 00:14 UTC
Success: true
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.68.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 30 Jul 23 00:17 UTC
Success: true
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.67.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Jul 23 00:18 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.65.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Jul 23 00:17 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.64.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 02 Jul 23 00:11 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.63.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 25 Jun 23 00:11 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.62.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 18 Jun 23 00:17 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.61.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 11 Jun 23 00:17 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.60.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 04 Jun 23 00:13 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.59.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 28 May 23 00:10 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.58.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 21 May 23 00:10 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.57.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 14 May 23 00:10 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.56.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 07 May 23 00:11 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.55.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 30 Apr 23 00:17 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.54.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 23 Apr 23 00:11 UTC
Success: true
### Versions
Terraform v1.4.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.53.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Apr 23 00:17 UTC
Success: true
### Versions
Terraform v1.4.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.52.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Apr 23 00:16 UTC
Success: true
### Versions
Terraform v1.4.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.51.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 02 Apr 23 00:10 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.50.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 26 Mar 23 00:11 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.49.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 19 Mar 23 00:11 UTC
Success: true
### Versions
Terraform v1.4.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.48.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 15 Mar 23 00:52 UTC
Success: true
### Versions
Terraform v1.3.9
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.47.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---

View File

@ -0,0 +1,36 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
name = random_pet.rg_name.id
location = var.resource_group_location
}
resource "random_string" "container_name" {
length = 25
lower = true
upper = false
special = false
}
resource "azurerm_container_group" "container" {
name = "${var.container_group_name_prefix}-${random_string.container_name.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
ip_address_type = "Public"
os_type = "Linux"
restart_policy = var.restart_policy
container {
name = "${var.container_name_prefix}-${random_string.container_name.result}"
image = var.image
cpu = var.cpu_cores
memory = var.memory_in_gb
ports {
port = var.port
protocol = "TCP"
}
}
}

View File

@ -0,0 +1,3 @@
output "container_ipv4_address" {
value = azurerm_container_group.container.ip_address
}

View File

@ -0,0 +1,16 @@
terraform {
required_version = ">=1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,26 @@
# Azure Container Instance with public IP
This template deploys an Azure Container Instance with a public IP address.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_container_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_group)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `image` | Container image to deploy. | mcr.microsoft.com/azuredocs/aci-helloworld" |
| `port` | Port to open on the container and the public IP address. | 80 |
| `cpu_cores` | Quantity of CPU cores to allocate to the container. | 1 |
| `memory_in_gb` | Amount of memory to allocate to the container in gigabytes. | 2 |
| `restart_policy` | Behavior of Azure runtime if container has stopped. | Always |
## Example
To see how to run this example, see [Create an Azure Container Instance with a public IP address using Terraform](https://learn.microsoft.com/azure/container-instances/container-instances-quickstart-terraform).

View File

@ -0,0 +1,57 @@
variable "resource_group_location" {
type = string
default = "eastus"
description = "Location for all resources."
}
variable "resource_group_name_prefix" {
type = string
default = "rg"
description = "Prefix of the resource group name that's combined with a random value so name is unique in your Azure subscription."
}
variable "container_group_name_prefix" {
type = string
description = "Prefix of the container group name that's combined with a random value so name is unique in your Azure subscription."
default = "acigroup"
}
variable "container_name_prefix" {
type = string
description = "Prefix of the container name that's combined with a random value so name is unique in your Azure subscription."
default = "aci"
}
variable "image" {
type = string
description = "Container image to deploy. Should be of the form repoName/imagename:tag for images stored in public Docker Hub, or a fully qualified URI for other registries. Images from private registries require additional registry credentials."
default = "mcr.microsoft.com/azuredocs/aci-helloworld"
}
variable "port" {
type = number
description = "Port to open on the container and the public IP address."
default = 80
}
variable "cpu_cores" {
type = number
description = "The number of CPU cores to allocate to the container."
default = 1
}
variable "memory_in_gb" {
type = number
description = "The amount of memory to allocate to the container in gigabytes."
default = 2
}
variable "restart_policy" {
type = string
description = "The behavior of Azure runtime if container has stopped."
default = "Always"
validation {
condition = contains(["Always", "Never", "OnFailure"], var.restart_policy)
error_message = "The restart_policy must be one of the following: Always, Never, OnFailure."
}
}

View File

@ -0,0 +1,45 @@
# Azure AI Studio
This deployment configuration specifies an [Azure AI hub](https://learn.microsoft.com/en-us/azure/ai-studio/concepts/ai-resources),
and its associated resources including Azure Key Vault, Azure Storage. You can optionally provision and attach Azure Application Insights and Azure Container Registry.
This configuration describes the minimal set of resources you require to get started with Azure AI Studio.
## Resources
| Terraform Resource Type | Description |
| - | - |
| `azurerm_resource_group` | The resource group all resources get deployed into. |
| `azurerm_key_vault` | An Azure Key Vault instance associated to the Azure Machine Learning workspace. |
| `azurerm_storage_account` | An Azure Storage instance associated to the Azure Machine Learning workspace. |
| `azurerm_application_insights` | An Azure Application Insights instance associated to the Azure Machine Learning workspace. |
| `azurerm_container_registry` | An Azure Container Registry instance associated to the Azure Machine Learning workspace. |
## Variables
| Name | Description | Default |
| ---- | ----------- | ------- |
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `prefix` | This variable is used to name the hub, project, and dependent resources. | ai |
| `sku` | The SKU for AI Services resources | S0
## Usage
After git cloning the repo, run the following commands after having docker running on your machine.
```bash
terraform init
az login
terraform plan -out demo.tfplan
terraform apply "demo.tfplan"
```
## Common mistakes
1. Make sure docker is running
1. Make sure to have logged into your Azure Subscription by running ```az login```.
1. Ensure that you have the correct RBAC permissions for in your subscription, hub, and project.

View File

@ -0,0 +1,126 @@
## 08 Sep 24 02:33 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:35 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:22 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:25 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 02:09 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.14.0
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 02:13 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.14.0
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:14 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.14.0
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---

View File

@ -0,0 +1,160 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
// RESOURCE GROUP
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
data "azurerm_client_config" "current" {
}
// STORAGE ACCOUNT
resource "azurerm_storage_account" "default" {
name = "${var.prefix}storage${random_string.suffix.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
account_tier = "Standard"
account_replication_type = "GRS"
allow_nested_items_to_be_public = false
}
// KEY VAULT
resource "azurerm_key_vault" "default" {
name = "${var.prefix}keyvault${random_string.suffix.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
tenant_id = data.azurerm_client_config.current.tenant_id
sku_name = "standard"
purge_protection_enabled = false
}
// AzAPI AIServices
resource "azapi_resource" "AIServicesResource"{
type = "Microsoft.CognitiveServices/accounts@2023-10-01-preview"
name = "AIServicesResource${random_string.suffix.result}"
location = azurerm_resource_group.rg.location
parent_id = azurerm_resource_group.rg.id
identity {
type = "SystemAssigned"
}
body = jsonencode({
name = "AIServicesResource${random_string.suffix.result}"
properties = {
//restore = true
customSubDomainName = "${random_string.suffix.result}domain"
apiProperties = {
statisticsEnabled = false
}
}
kind = "AIServices"
sku = {
name = var.sku
}
})
response_export_values = ["*"]
}
// Azure AI Hub
resource "azapi_resource" "hub" {
type = "Microsoft.MachineLearningServices/workspaces@2024-04-01-preview"
name = "${random_pet.rg_name.id}-aih"
location = azurerm_resource_group.rg.location
parent_id = azurerm_resource_group.rg.id
identity {
type = "SystemAssigned"
}
body = jsonencode({
properties = {
description = "This is my Azure AI hub"
friendlyName = "My Hub"
storageAccount = azurerm_storage_account.default.id
keyVault = azurerm_key_vault.default.id
/* Optional: To enable these field, the corresponding dependent resources need to be uncommented.
applicationInsight = azurerm_application_insights.default.id
containerRegistry = azurerm_container_registry.default.id
*/
/*Optional: To enable Customer Managed Keys, the corresponding
encryption = {
status = var.encryption_status
keyVaultProperties = {
keyVaultArmId = azurerm_key_vault.default.id
keyIdentifier = var.cmk_keyvault_key_uri
}
}
*/
}
kind = "hub"
})
}
// Azure AI Project
resource "azapi_resource" "project" {
type = "Microsoft.MachineLearningServices/workspaces@2024-04-01-preview"
name = "my-ai-project${random_string.suffix.result}"
location = azurerm_resource_group.rg.location
parent_id = azurerm_resource_group.rg.id
identity {
type = "SystemAssigned"
}
body = jsonencode({
properties = {
description = "This is my Azure AI PROJECT"
friendlyName = "My Project"
hubResourceId = azapi_resource.hub.id
}
kind = "project"
})
}
// AzAPI AI Services Connection
resource "azapi_resource" "AIServicesConnection" {
type = "Microsoft.MachineLearningServices/workspaces/connections@2024-04-01-preview"
name = "Default_AIServices${random_string.suffix.result}"
parent_id = azapi_resource.hub.id
body = jsonencode({
properties = {
category = "AIServices",
target = jsondecode(azapi_resource.AIServicesResource.output).properties.endpoint,
authType = "AAD",
isSharedToAll = true,
metadata = {
ApiType = "Azure",
ResourceId = azapi_resource.AIServicesResource.id
}
}
})
response_export_values = ["*"]
}
/* The following resources are OPTIONAL.
// APPLICATION INSIGHTS
resource "azurerm_application_insights" "default" {
name = "${var.prefix}appinsights${random_string.suffix.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
application_type = "web"
}
// CONTAINER REGISTRY
resource "azurerm_container_registry" "default" {
name = "${var.prefix}contreg${random_string.suffix.result}"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
sku = "premium"
admin_enabled = true
}
*/

View File

@ -0,0 +1,11 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.id
}
output "workspace_name" {
value = azapi_resource.project.id
}
output "endpoint" {
value = jsondecode(azapi_resource.AIServicesResource.output).properties.endpoint
}

View File

@ -0,0 +1,33 @@
terraform {
required_version = ">= 1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
azapi = {
source = "azure/azapi"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {
key_vault {
recover_soft_deleted_key_vaults = false
purge_soft_delete_on_destroy = false
purge_soft_deleted_keys_on_destroy = false
}
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
provider "azapi" {
}

View File

@ -0,0 +1,40 @@
variable "resource_group_location" {
type = string
default = "eastus"
description = "Location of the resource group."
}
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 "prefix" {
type = string
description="This variable is used to name the hub, project, and dependent resources."
default = "ai"
}
variable "sku" {
type = string
description = "The sku name of the Azure Analysis Services server to create. Choose from: B1, B2, D1, S0, S1, S2, S3, S4, S8, S9. Some skus are region specific. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region"
default = "S0"
}
resource "random_string" "suffix" {
length = 4
special = false
upper = false
}
/*Optional: For Customer Managed Keys, uncomment this part AND the corresponding section in main.tf
variable "cmk_keyvault_key_uri" {
description = "Key vault uri to access the encryption key."
}
variable "encryption_status" {
description = "Indicates whether or not the encryption is enabled for the workspace."
default = "Enabled"
}
*/

View File

@ -0,0 +1,25 @@
# Windows-based Azure Kubernetes Service (AKS) cluster
This template deploys an AKS cluster with Windows nodes.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_virtual_network](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network)
- [azurerm_kubernetes_cluster](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster)
- [azurerm_kubernetes_cluster_node_pool](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster_node_pool)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `node_count_linux` | Initial quantity of Linux nodes for the node pool. | 1 |
| `node_count_windows` | Initial quantity of Windows nodes for the node pool. | 1 |
| `admin_username` | Admin username for the Windows node pool. | azureuser |
| `admin_password` | Admin password for the Windows node pool. | Passw0rd1234Us! |
## Example

View File

@ -0,0 +1,119 @@
## 08 Sep 24 02:31 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:36 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:23 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:30 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 02:14 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 02:27 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:15 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---

View File

@ -0,0 +1,73 @@
# Generate random resource group name
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
resource "random_pet" "azurerm_kubernetes_cluster_name" {
prefix = "cluster"
}
resource "random_pet" "azurerm_kubernetes_cluster_dns_prefix" {
prefix = "dns"
}
resource "random_string" "azurerm_kubernetes_cluster_node_pool" {
length = 6
special = false
numeric = false
lower = true
upper = false
}
resource "azurerm_virtual_network" "vnet" {
name = "myvnet"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
address_space = ["10.1.0.0/16"]
subnet {
name = "subnet1"
address_prefix = "10.1.1.0/24"
}
}
resource "azurerm_kubernetes_cluster" "aks" {
name = random_pet.azurerm_kubernetes_cluster_name.id
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
dns_prefix = random_pet.azurerm_kubernetes_cluster_dns_prefix.id
identity {
type = "SystemAssigned"
}
default_node_pool {
name = "agentpool"
vm_size = "Standard_D2_v2"
node_count = var.node_count_linux
vnet_subnet_id = element(tolist(azurerm_virtual_network.vnet.subnet), 0).id
}
windows_profile {
admin_username = var.admin_username
admin_password = var.admin_password
}
network_profile {
network_plugin = "azure"
load_balancer_sku = "standard"
}
}
resource "azurerm_kubernetes_cluster_node_pool" "win" {
name = random_string.azurerm_kubernetes_cluster_node_pool.result
kubernetes_cluster_id = azurerm_kubernetes_cluster.aks.id
vm_size = "Standard_D4s_v3"
node_count = var.node_count_windows
os_type = "Windows"
}

View File

@ -0,0 +1,20 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "kubernetes_cluster_name" {
value = azurerm_kubernetes_cluster.aks.name
}
output "kubernetes_cluster_dns_prefix" {
value = azurerm_kubernetes_cluster.aks.dns_prefix
}
output "kubernetes_cluster_node_pool_name" {
value = azurerm_kubernetes_cluster_node_pool.win.name
}
output "kubernetes_cluster_kube_config_raw" {
value = azurerm_kubernetes_cluster.aks.kube_config_raw
sensitive = true
}

View File

@ -0,0 +1,19 @@
terraform {
required_version = ">= 1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {
}
}

View File

@ -0,0 +1,35 @@
variable "resource_group_location" {
type = string
default = "eastus"
description = "Location of the resource group."
}
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 "node_count_linux" {
type = number
description = "The initial quantity of Linux nodes for the node pool."
default = 1
}
variable "node_count_windows" {
type = number
description = "The initial quantity of Windows nodes for the node pool."
default = 1
}
variable "admin_username" {
type = string
description = "The admin username for the Windows node pool."
default = "azureuser"
}
variable "admin_password" {
type = string
description = "The admin password for the Windows node pool."
default = "Passw0rd1234Us!"
}

View File

@ -0,0 +1,19 @@
# Aure Kubernetes Service (AKS) with standard load balancer and Virtual Machine Scale Sets (VMSS)
This template deploys an AKS cluster a standard load balancer and Virtual Machine Scale Sets (VMSS)
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_kubernetes_cluster](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
## Example

View File

@ -0,0 +1,119 @@
## 08 Sep 24 02:21 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:15 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:16 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:18 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 02:04 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 02:09 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:08 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---

View File

@ -0,0 +1,43 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
resource "random_string" "aks_cluster_name" {
length = 12
special = false
}
resource "azurerm_kubernetes_cluster" "aks_cluster" {
name = random_string.aks_cluster_name.result
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
dns_prefix = "myakscluster"
default_node_pool {
type = "VirtualMachineScaleSets"
name = "default"
node_count = 1
max_count = 3
min_count = 1
vm_size = "Standard_DS2_v2"
enable_auto_scaling = true
}
network_profile {
network_plugin = "azure"
load_balancer_sku = "standard"
}
identity {
type = "SystemAssigned"
}
tags = {
Environment = "Production"
}
}

View File

@ -0,0 +1,7 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "aks_cluster_name" {
value = azurerm_kubernetes_cluster.aks_cluster.name
}

View File

@ -0,0 +1,16 @@
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,11 @@
variable "resource_group_location" {
type = string
default = "eastus"
description = "Location of the resource group."
}
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."
}

View File

@ -0,0 +1,995 @@
## 08 Sep 24 02:18 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 01:50 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:12 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:14 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 01:55 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 02:00 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:05 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 28 Jan 24 01:33 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.89.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 21 Jan 24 00:47 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.88.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 14 Jan 24 01:22 UTC
Success: true
### Versions
Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.87.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 07 Jan 24 01:23 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.86.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 31 Dec 23 01:13 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 24 Dec 23 00:47 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 17 Dec 23 01:22 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 10 Dec 23 01:11 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.84.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 04 Dec 23 03:17 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.83.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 26 Nov 23 06:10 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.82.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 19 Nov 23 03:31 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.81.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 12 Nov 23 06:50 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.80.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 05 Nov 23 07:19 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.79.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 29 Oct 23 06:57 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.78.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 22 Oct 23 04:46 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.77.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 15 Oct 23 05:00 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.76.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 08 Oct 23 06:31 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 01 Oct 23 06:23 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 24 Sep 23 04:37 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.74.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Sep 23 10:48 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 17 Sep 23 04:24 UTC
Success: true
### Versions
Terraform v1.5.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 10 Sep 23 04:51 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.72.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 03 Sep 23 05:32 UTC
Success: false
### Versions
### Error
Initializing the backend...
Initializing provider plugins...
- Finding hashicorp/azurerm versions matching "~> 3.0"...
- Finding hashicorp/random versions matching "~> 3.0"...
- Installing hashicorp/azurerm v3.71.0...
- Installing hashicorp/random v3.5.1...
- Installed hashicorp/random v3.5.1 (signed by HashiCorp)
╷
│ Error: Failed to install provider
│ 
│ Error while installing hashicorp/azurerm v3.71.0: write
│ .terraform/providers/registry.terraform.io/hashicorp/azurerm/3.71.0/linux_amd64/terraform-provider-azurerm_v3.71.0_x5:
│ no space left on device
╵

---
## 27 Aug 23 05:15 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Aug 23 05:56 UTC
Success: true
### Versions
Terraform v1.5.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.70.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 13 Aug 23 05:32 UTC
Success: true
### Versions
Terraform v1.5.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.69.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 06 Aug 23 05:47 UTC
Success: false
### Versions
### Error
Initializing the backend...
Initializing provider plugins...
- Finding hashicorp/azurerm versions matching "~> 3.0"...
- Finding hashicorp/random versions matching "~> 3.0"...
- Installing hashicorp/random v3.5.1...
- Installed hashicorp/random v3.5.1 (signed by HashiCorp)
- Installing hashicorp/azurerm v3.68.0...
╷
│ Error: Failed to install provider
│ 
│ Error while installing hashicorp/azurerm v3.68.0: write
│ .terraform/providers/registry.terraform.io/hashicorp/azurerm/3.68.0/linux_amd64/terraform-provider-azurerm_v3.68.0_x5:
│ no space left on device
╵

---
## 30 Jul 23 07:05 UTC
Success: true
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.67.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Jul 23 04:36 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.65.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Jul 23 05:43 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.64.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 02 Jul 23 06:09 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.63.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 25 Jun 23 05:02 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.62.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 18 Jun 23 05:46 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.61.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 11 Jun 23 05:37 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.60.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 04 Jun 23 05:54 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.59.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 28 May 23 05:26 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.58.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 21 May 23 04:32 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.57.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 14 May 23 04:21 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.56.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 07 May 23 06:01 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.55.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 30 Apr 23 04:02 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.54.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 23 Apr 23 04:22 UTC
Success: true
### Versions
Terraform v1.4.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.53.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Apr 23 05:45 UTC
Success: true
### Versions
Terraform v1.4.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.52.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Apr 23 05:13 UTC
Success: true
### Versions
Terraform v1.4.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.51.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 02 Apr 23 04:18 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.50.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 26 Mar 23 04:53 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.49.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 19 Mar 23 04:23 UTC
Success: true
### Versions
Terraform v1.4.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.48.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 12 Mar 23 00:12 UTC
Success: true
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.47.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 10 Mar 23 22:09 UTC
Success: true
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.47.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 08 Mar 23 14:45 UTC
Success: true
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.46.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 07 Mar 23 19:51 UTC
Success: true
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.46.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---

View File

@ -0,0 +1,29 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
name = random_pet.rg_name.id
location = var.resource_group_location
}
resource "random_string" "azurerm_analysis_services_server_name" {
length = 25
upper = false
numeric = false
special = false
}
resource "azurerm_analysis_services_server" "server" {
name = random_string.azurerm_analysis_services_server_name.result
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
sku = var.sku
backup_blob_container_uri = var.backup_blob_container_uri
ipv4_firewall_rule {
name = "AllowFromAll"
range_start = "0.0.0.0"
range_end = "255.255.255.255"
}
}

View File

@ -0,0 +1,7 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "analysis_services_server_name" {
value = azurerm_analysis_services_server.server.name
}

View File

@ -0,0 +1,16 @@
terraform {
required_version = ">=0.12"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,19 @@
# Azure Analysis Services server
This template deploys an Azure Analysis Services server.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [azurerm_analysis_services_server](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/analysis_services_server)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `server_name` | Name of the Azure Analysis Services server. | |
| `sku` | SKU name of the Azure Analysis Services server to create. | S0 |
| `backup_blob_container_uri` | SAS URI to a private Azure Blob Storage container with read, write and list permissions. | null |

View File

@ -0,0 +1,23 @@
variable "resource_group_location" {
type = string
default = "eastus"
description = "Location for all resources."
}
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 "sku" {
type = string
description = "The sku name of the Azure Analysis Services server to create. Choose from: B1, B2, D1, S0, S1, S2, S3, S4, S8, S9. Some skus are region specific. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region"
default = "S0"
}
variable "backup_blob_container_uri" {
type = string
description = "The SAS URI to a private Azure Blob Storage container with read, write and list permissions. Required only if you intend to use the backup/restore functionality. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-backup"
default = null
}

View File

@ -0,0 +1,22 @@
# Azure Windows Web App with Backup
This template deploys an Azure Windows Web App with a backup configured.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_storage_account](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account)
- [azurerm_storage_container](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_container)
- [azurerm_service_plan](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/service_plan)
- [azurerm_windows_web_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_web_app)
## Variables
| Name | Description | Default value |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
## Example

View File

@ -0,0 +1,119 @@
## 08 Sep 24 02:17 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:17 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:11 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:13 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 01:55 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 01:59 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:04 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---

View File

@ -0,0 +1,121 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
resource "random_string" "storage_account_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_storage_account" "example" {
name = random_string.storage_account_name.result
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "random_string" "storage_container_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_storage_container" "example" {
name = random_string.storage_container_name.result
storage_account_name = azurerm_storage_account.example.name
container_access_type = "private"
}
resource "random_string" "service_plan_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_service_plan" "example" {
name = random_string.service_plan_name.result
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
os_type = "Windows"
sku_name = "S1"
}
data "azurerm_storage_account_sas" "example" {
connection_string = azurerm_storage_account.example.primary_connection_string
https_only = true
resource_types {
service = false
container = false
object = true
}
services {
blob = true
queue = false
table = false
file = false
}
# Please change the start_date variable (in variables.tf) to the appropriate
# value for your environment.
start = formatdate(var.start_date, timestamp())
expiry = formatdate(var.start_date, timeadd(timestamp(), "8765h"))
permissions {
read = false
write = true
delete = false
list = false
add = false
create = false
update = false
process = false
tag = false
filter = false
}
}
resource "random_string" "windows_web_app_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_windows_web_app" "example" {
name = random_string.windows_web_app_name.result
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
service_plan_id = azurerm_service_plan.example.id
backup {
name = "Example"
storage_account_url = "https://${azurerm_storage_account.example.name}.blob.core.windows.net/${azurerm_storage_container.example.name}${data.azurerm_storage_account_sas.example.sas}&sr=b"
schedule {
frequency_interval = 30
frequency_unit = "Day"
}
}
site_config {
application_stack {
dotnet_version = "v6.0"
current_stack = "dotnet"
}
}
}

View File

@ -0,0 +1,23 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "storage_account_name" {
value = azurerm_storage_account.example.name
}
output "storage_container_name" {
value = azurerm_storage_container.example.name
}
output "service_plan_name" {
value = azurerm_service_plan.example.name
}
output "windows_web_app_name" {
value = azurerm_windows_web_app.example.name
}
output "windows_web_app_default_hostname" {
value = azurerm_windows_web_app.example.default_hostname
}

View File

@ -0,0 +1,18 @@
terraform {
required_version = ">=1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,18 @@
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 "start_date" {
type = string
default = "2024-06-01"
description = "Start date."
}

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +1,48 @@
resource "azurerm_resource_group" "rg1" { resource "random_string" "rg" {
name = "myResourceGroupAG" length = 8
upper = false
special = false
}
resource "azurerm_resource_group" "rg" {
name = "101-application-gateway-${random_string.rg.result}"
location = "eastus" location = "eastus"
} }
resource "azurerm_virtual_network" "vnet1" { resource "azurerm_virtual_network" "vnet" {
name = "myVNet" name = "myVNet"
resource_group_name = azurerm_resource_group.rg1.name resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg1.location location = azurerm_resource_group.rg.location
address_space = ["10.21.0.0/16"] address_space = ["10.21.0.0/16"]
} }
resource "azurerm_subnet" "frontend" { resource "azurerm_subnet" "frontend" {
name = "myAGSubnet" name = "myAGSubnet"
resource_group_name = azurerm_resource_group.rg1.name resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.vnet1.name virtual_network_name = azurerm_virtual_network.vnet.name
address_prefixes = ["10.21.0.0/24"] address_prefixes = ["10.21.0.0/24"]
} }
resource "azurerm_subnet" "backend" { resource "azurerm_subnet" "backend" {
name = "myBackendSubnet" name = "myBackendSubnet"
resource_group_name = azurerm_resource_group.rg1.name resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.vnet1.name virtual_network_name = azurerm_virtual_network.vnet.name
address_prefixes = ["10.21.1.0/24"] address_prefixes = ["10.21.1.0/24"]
} }
resource "azurerm_public_ip" "pip1" { resource "azurerm_public_ip" "pip" {
name = "myAGPublicIPAddress" name = "myAGPublicIPAddress"
resource_group_name = azurerm_resource_group.rg1.name resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg1.location location = azurerm_resource_group.rg.location
allocation_method = "Static" allocation_method = "Static"
sku = "Standard" sku = "Standard"
} }
resource "azurerm_application_gateway" "main" {
resource "azurerm_application_gateway" "network" {
name = "myAppGateway" name = "myAppGateway"
resource_group_name = azurerm_resource_group.rg1.name resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg1.location location = azurerm_resource_group.rg.location
sku { sku {
name = "Standard_v2" name = "Standard_v2"
@ -57,7 +62,7 @@ resource "azurerm_application_gateway" "network" {
frontend_ip_configuration { frontend_ip_configuration {
name = var.frontend_ip_configuration_name name = var.frontend_ip_configuration_name
public_ip_address_id = azurerm_public_ip.pip1.id public_ip_address_id = azurerm_public_ip.pip.id
} }
backend_address_pool { backend_address_pool {
@ -85,14 +90,15 @@ resource "azurerm_application_gateway" "network" {
http_listener_name = var.listener_name http_listener_name = var.listener_name
backend_address_pool_name = var.backend_address_pool_name backend_address_pool_name = var.backend_address_pool_name
backend_http_settings_name = var.http_setting_name backend_http_settings_name = var.http_setting_name
priority = 1
} }
} }
resource "azurerm_network_interface" "nic" { resource "azurerm_network_interface" "nic" {
count = 2 count = 2
name = "nic-${count.index+1}" name = "nic-${count.index+1}"
location = azurerm_resource_group.rg1.location location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg1.name resource_group_name = azurerm_resource_group.rg.name
ip_configuration { ip_configuration {
name = "nic-ipconfig-${count.index+1}" name = "nic-ipconfig-${count.index+1}"
@ -101,26 +107,26 @@ resource "azurerm_network_interface" "nic" {
} }
} }
resource "azurerm_network_interface_application_gateway_backend_address_pool_association" "nic-assoc01" { resource "azurerm_network_interface_application_gateway_backend_address_pool_association" "nic-assoc" {
count = 2 count = 2
network_interface_id = azurerm_network_interface.nic[count.index].id network_interface_id = azurerm_network_interface.nic[count.index].id
ip_configuration_name = "nic-ipconfig-${count.index+1}" ip_configuration_name = "nic-ipconfig-${count.index+1}"
backend_address_pool_id = azurerm_application_gateway.network.backend_address_pool[0].id backend_address_pool_id = one(azurerm_application_gateway.main.backend_address_pool).id
} }
resource "random_password" "password" { resource "random_password" "password" {
length = 16 length = 16
special = true special = true
lower = true lower = true
upper = true upper = true
number = true numeric = true
} }
resource "azurerm_windows_virtual_machine" "vm" { resource "azurerm_windows_virtual_machine" "vm" {
count = 2 count = 2
name = "myVM${count.index+1}" name = "myVM${count.index+1}"
resource_group_name = azurerm_resource_group.rg1.name resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg1.location location = azurerm_resource_group.rg.location
size = "Standard_DS1_v2" size = "Standard_DS1_v2"
admin_username = "azureadmin" admin_username = "azureadmin"
admin_password = random_password.password.result admin_password = random_password.password.result
@ -144,7 +150,7 @@ resource "azurerm_windows_virtual_machine" "vm" {
} }
resource "azurerm_virtual_machine_extension" "vm-extensions" { resource "azurerm_virtual_machine_extension" "vm-extensions" {
count = 2 count = 2
name = "vm${count.index+1}-ext" name = "vm${count.index+1}-ext"
virtual_machine_id = azurerm_windows_virtual_machine.vm[count.index].id virtual_machine_id = azurerm_windows_virtual_machine.vm[count.index].id
publisher = "Microsoft.Compute" publisher = "Microsoft.Compute"

View File

@ -0,0 +1,3 @@
output "gateway_frontend_ip" {
value = "http://${azurerm_public_ip.pip.ip_address}"
}

View File

@ -1,11 +1,14 @@
terraform { terraform {
required_version = ">=1.2"
required_version = ">=0.12"
required_providers { required_providers {
azurerm = { azurerm = {
source = "hashicorp/azurerm" source = "hashicorp/azurerm"
version = ">=2.97.0" version = "~> 3.0"
}
random = {
source = "hashicorp/random"
version = "~> 3.0"
} }
} }
} }

View File

@ -21,7 +21,3 @@ variable "listener_name" {
variable "request_routing_rule_name" { variable "request_routing_rule_name" {
default = "myRoutingRule" default = "myRoutingRule"
} }
variable "redirect_configuration_name" {
default = "myRedirectConfig"
}

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,43 @@
terraform { resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
required_version = ">=0.12"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>2.0"
}
}
}
provider "azurerm" {
features {}
} }
resource "azurerm_resource_group" "rg" { resource "azurerm_resource_group" "rg" {
name = var.resource_group_name
location = var.resource_group_location location = var.resource_group_location
name = random_pet.rg_name.id
} }
resource "azurerm_attestation_provider" "corpAttestation" { locals {
name = var.attestation_provider_name create_signing_cert = try(!fileexists(var.cert_path), true)
resource_group_name = azurerm_resource_group.rg.name }
location = azurerm_resource_group.rg.location
policy_signing_certificate_data = file(var.policy_file) resource "tls_private_key" "signing_cert" {
count = local.create_signing_cert ? 1 : 0
algorithm = "RSA"
rsa_bits = 4096
}
resource "tls_self_signed_cert" "attestation" {
count = local.create_signing_cert ? 1 : 0
private_key_pem = tls_private_key.signing_cert[0].private_key_pem
validity_period_hours = 12
allowed_uses = [
"cert_signing",
]
}
resource "random_string" "attestation_suffix" {
length = 8
numeric = false
special = false
upper = false
}
resource "azurerm_attestation_provider" "corp_attestation" {
location = azurerm_resource_group.rg.location
name = "${var.attestation_provider_name}${random_string.attestation_suffix.result}"
resource_group_name = azurerm_resource_group.rg.name
policy_signing_certificate_data = try(tls_self_signed_cert.attestation[0].cert_pem, file(var.cert_path))
} }

View File

@ -0,0 +1,3 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}

View File

@ -0,0 +1,22 @@
terraform {
required_version = ">=0.12"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>2.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
tls = {
source = "hashicorp/tls"
version = "4.0.4"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,21 @@
# Azure attestation provider
This template deploys an [Attestation provider](/azure/attestation/overview) on Azure.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [azurerm_attestation_provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/attestation)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `attestation_provider_name` | Name of the Attestation provider | attestationprovider007 |
## Example
To see how to run this example, see [Configure an Azure Attestation provider using Terraform](https://docs.microsoft.com/en-us/azure/developer/terraform/create-attestation-provider).

View File

@ -1,15 +1,17 @@
variable "resource_group_name" { variable "attestation_provider_name" {
default = "myResourceGroup" default = "attestation"
} }
variable "resource_group_location" { variable "cert_path" {
default = "eastus"
}
variable "policy_file" {
default = "~/.certs/cert.pem" default = "~/.certs/cert.pem"
} }
variable "attestation_provider_name" { variable "resource_group_location" {
default = "attestationprovider007" default = "eastus"
description = "Location of the resource group."
}
variable "resource_group_name_prefix" {
default = "rg"
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
} }

View File

@ -0,0 +1,126 @@
## 08 Sep 24 02:16 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v2.99.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:04 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v2.99.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:09 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v2.99.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:11 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.15.0
+ provider registry.terraform.io/hashicorp/azurerm v2.99.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 01:52 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.14.0
+ provider registry.terraform.io/hashicorp/azurerm v2.99.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 01:55 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.14.0
+ provider registry.terraform.io/hashicorp/azurerm v2.99.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 02:58 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v1.14.0
+ provider registry.terraform.io/hashicorp/azurerm v2.99.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---

View File

@ -0,0 +1,80 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
data "azurerm_subscription" "current" {}
resource "azurerm_virtual_network" "example" {
name = "myVnet"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
}
resource "azurerm_subnet" "example" {
name = "mySubnet"
resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefixes = ["10.0.2.0/24"]
}
resource "azurerm_network_interface" "example" {
name = "myNic"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
ip_configuration {
name = "internal"
subnet_id = azurerm_subnet.example.id
private_ip_address_allocation = "Dynamic"
}
}
resource "azurerm_linux_virtual_machine" "example" {
name = "myVm"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
size = "Standard_F2"
network_interface_ids = [
azurerm_network_interface.example.id,
]
computer_name = "hostname"
admin_username = var.username
admin_ssh_key {
username = var.username
public_key = azapi_resource_action.ssh_public_key_gen.output.publicKey
}
identity {
type = "SystemAssigned"
}
os_disk {
caching = "ReadWrite"
storage_account_type = "Standard_LRS"
}
source_image_reference {
publisher = "Canonical"
offer = "0001-com-ubuntu-server-jammy"
sku = "22_04-lts"
version = "latest"
}
}
data "azurerm_role_definition" "contributor" {
name = "Contributor"
}
resource "azurerm_role_assignment" "example" {
scope = data.azurerm_subscription.current.id
role_definition_name = "Contributor"
principal_id = azurerm_linux_virtual_machine.example.identity[0].principal_id
}

View File

@ -0,0 +1,7 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "azurerm_linux_virtual_machine_name" {
value = azurerm_linux_virtual_machine.example.name
}

View File

@ -0,0 +1,22 @@
terraform {
required_version = ">=0.12"
required_providers {
azapi = {
source = "azure/azapi"
version = "~>1.5"
}
azurerm = {
source = "hashicorp/azurerm"
version = "~>2.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,25 @@
# Authentication using managed identities for Azure services
This template deploys a Linux virtual machine (VM) to show an example of how to use managed identities for Azure services.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [azurerm_virtual_network](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network)
- [azurerm_subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet)
- [azurerm_network_interface](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface)
- [azurerm_linux_virtual_machine](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine)
- [azurerm_role_assignment](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)
## Variables
| **Name** | **Description** | **Default** |
|---|---|---|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `username` | The username for the local account that will be created on the new VM. | azureadmin |
## Example
To see how to run this example, see [Authenticate Terraform using Managed Identity for Azure services](https://docs.microsoft.com/azure/developer/terraform/authenticate-to-azure-using-msi).

View File

@ -0,0 +1,24 @@
resource "random_pet" "ssh_key_name" {
prefix = "ssh"
separator = ""
}
resource "azapi_resource_action" "ssh_public_key_gen" {
type = "Microsoft.Compute/sshPublicKeys@2022-11-01"
resource_id = azapi_resource.ssh_public_key.id
action = "generateKeyPair"
method = "POST"
response_export_values = ["publicKey", "privateKey"]
}
resource "azapi_resource" "ssh_public_key" {
type = "Microsoft.Compute/sshPublicKeys@2022-11-01"
name = random_pet.ssh_key_name.id
location = azurerm_resource_group.rg.location
parent_id = azurerm_resource_group.rg.id
}
output "key_data" {
value = azapi_resource_action.ssh_public_key_gen.output.publicKey
}

View File

@ -0,0 +1,17 @@
variable "resource_group_location" {
type = string
description = "Location of the resource group."
default = "eastus"
}
variable "resource_group_name_prefix" {
type = string
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
default = "rg"
}
variable "username" {
type = string
description = "The username for the local account that will be created on the new VM."
default = "azureadmin"
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,986 @@
## 08 Sep 24 02:09 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 01 Sep 24 01:58 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 25 Aug 24 02:02 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 18 Aug 24 02:06 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 11 Aug 24 01:45 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 04 Aug 24 01:49 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 01 Aug 24 02:52 UTC
Success: false
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 28 Jan 24 01:32 UTC
Success: false
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 21 Jan 24 00:44 UTC
Success: false
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 14 Jan 24 01:13 UTC
Success: false
### Versions
Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 07 Jan 24 01:19 UTC
Success: false
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 31 Dec 23 01:10 UTC
Success: false
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 24 Dec 23 00:44 UTC
Success: false
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 17 Dec 23 01:20 UTC
Success: false
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 10 Dec 23 01:06 UTC
Success: false
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 04 Dec 23 03:14 UTC
Success: false
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 26 Nov 23 06:06 UTC
Success: false
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 19 Nov 23 03:24 UTC
Success: false
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 12 Nov 23 06:44 UTC
Success: false
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 05 Nov 23 07:10 UTC
Success: false
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 29 Oct 23 06:47 UTC
Success: false
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 22 Oct 23 04:40 UTC
Success: false
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 15 Oct 23 04:36 UTC
Success: false
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 08 Oct 23 04:50 UTC
Success: false
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 01 Oct 23 06:01 UTC
Success: false
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 24 Sep 23 04:20 UTC
Success: false
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 20 Sep 23 10:35 UTC
Success: false
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 17 Sep 23 04:02 UTC
Success: false
### Versions
Terraform v1.5.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 10 Sep 23 04:37 UTC
Success: false
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 03 Sep 23 05:28 UTC
Success: false
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 27 Aug 23 04:53 UTC
Success: false
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 20 Aug 23 05:40 UTC
Success: false
### Versions
Terraform v1.5.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 13 Aug 23 05:24 UTC
Success: false
### Versions
Terraform v1.5.2
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 06 Aug 23 05:16 UTC
Success: false
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 30 Jul 23 06:48 UTC
Success: false
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 16 Jul 23 04:25 UTC
Success: false
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 09 Jul 23 05:34 UTC
Success: false
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 02 Jul 23 05:47 UTC
Success: false
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 25 Jun 23 04:53 UTC
Success: false
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 18 Jun 23 05:19 UTC
Success: false
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 11 Jun 23 05:19 UTC
Success: false
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 04 Jun 23 05:29 UTC
Success: false
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 28 May 23 05:05 UTC
Success: false
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 21 May 23 04:17 UTC
Success: false
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 14 May 23 03:57 UTC
Success: false
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 07 May 23 05:38 UTC
Success: false
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 30 Apr 23 03:35 UTC
Success: false
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 23 Apr 23 03:57 UTC
Success: false
### Versions
Terraform v1.4.4
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 16 Apr 23 05:17 UTC
Success: false
### Versions
Terraform v1.4.3
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 09 Apr 23 05:09 UTC
Success: false
### Versions
Terraform v1.4.2
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 02 Apr 23 04:10 UTC
Success: false
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 26 Mar 23 04:44 UTC
Success: false
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 19 Mar 23 04:14 UTC
Success: false
### Versions
Terraform v1.4.0
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 12 Mar 23 04:54 UTC
Success: false
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 08 Mar 23 17:53 UTC
Success: false
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 19 Feb 23 01:48 UTC
Success: true
### Versions
Terraform v1.3.7
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 12 Feb 23 00:54 UTC
Success: true
### Versions
Terraform v1.3.7
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---
## 05 Feb 23 00:25 UTC
Success: true
### Versions
Terraform v1.3.7
on linux_amd64
+ provider registry.terraform.io/azure/azapi v0.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.0.2
### Error
---

View File

@ -0,0 +1,510 @@
## 08 Sep 24 02:46 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:31 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:02 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:41 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 02:27 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 02:25 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:25 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 28 Jan 24 01:47 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.89.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 21 Jan 24 01:06 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.88.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 14 Jan 24 01:38 UTC
Success: true
### Versions
Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.87.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 07 Jan 24 01:37 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.86.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 31 Dec 23 01:29 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 24 Dec 23 01:05 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 17 Dec 23 01:38 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 10 Dec 23 01:25 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.84.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 04 Dec 23 03:38 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.83.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 26 Nov 23 06:05 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.82.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 19 Nov 23 03:23 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.81.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 12 Nov 23 06:45 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.80.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 05 Nov 23 07:07 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.79.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 29 Oct 23 06:45 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.78.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 22 Oct 23 04:39 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.77.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 15 Oct 23 04:56 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.76.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 08 Oct 23 04:49 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 01 Oct 23 05:31 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 24 Sep 23 04:34 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.74.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Sep 23 10:45 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 17 Sep 23 04:21 UTC
Success: true
### Versions
Terraform v1.5.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 10 Sep 23 04:48 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.72.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 31 Aug 23 19:44 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---

View File

@ -0,0 +1,120 @@
resource "random_pet" "rg-name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
name = random_pet.rg-name.id
location = var.resource_group_location
}
resource "azurerm_virtual_network" "azfw_vnet" {
name = "azfw-vnet"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
address_space = ["10.10.0.0/24"]
}
resource "azurerm_ip_group" "workload_ip_group" {
name = "workload-ip-group"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
cidrs = ["10.20.0.0/24", "10.30.0.0/24"]
}
resource "azurerm_ip_group" "infra_ip_group" {
name = "infra-ip-group"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
cidrs = ["10.40.0.0/24", "10.50.0.0/24"]
}
resource "azurerm_subnet" "azfw_subnet" {
name = "AzureFirewallSubnet"
resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.azfw_vnet.name
address_prefixes = ["10.10.0.0/26"]
}
resource "azurerm_public_ip" "pip_azfw" {
name = "pip-azfw"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
allocation_method = "Static"
sku = "Standard"
}
resource "azurerm_firewall_policy" "azfw_policy" {
name = "azfw-policy"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
sku = var.firewall_sku_tier
threat_intelligence_mode = "Alert"
}
resource "azurerm_firewall_policy_rule_collection_group" "net_policy_rule_collection_group" {
name = "DefaultNetworkRuleCollectionGroup"
firewall_policy_id = azurerm_firewall_policy.azfw_policy.id
priority = 200
network_rule_collection {
name = "DefaultNetworkRuleCollection"
action = "Allow"
priority = 200
rule {
name = "time-windows"
protocols = ["UDP"]
source_ip_groups = [azurerm_ip_group.workload_ip_group.id, azurerm_ip_group.infra_ip_group.id]
destination_ports = ["123"]
destination_addresses = ["132.86.101.172"]
}
}
}
resource "azurerm_firewall_policy_rule_collection_group" "app_policy_rule_collection_group" {
name = "DefaulApplicationtRuleCollectionGroup"
firewall_policy_id = azurerm_firewall_policy.azfw_policy.id
priority = 300
application_rule_collection {
name = "DefaultApplicationRuleCollection"
action = "Allow"
priority = 500
rule {
name = "AllowWindowsUpdate"
description = "Allow Windows Update"
protocols {
type = "Http"
port = 80
}
protocols {
type = "Https"
port = 443
}
source_ip_groups = [azurerm_ip_group.workload_ip_group.id, azurerm_ip_group.infra_ip_group.id]
destination_fqdn_tags = ["WindowsUpdate"]
}
rule {
name = "Global Rule"
description = "Allow access to Microsoft.com"
protocols {
type = "Https"
port = 443
}
destination_fqdns = ["*.microsoft.com"]
terminate_tls = false
source_ip_groups = [azurerm_ip_group.workload_ip_group.id, azurerm_ip_group.infra_ip_group.id]
}
}
}
resource "azurerm_firewall" "fw" {
name = "azfw"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku_name = "AZFW_VNet"
sku_tier = var.firewall_sku_tier
ip_configuration {
name = "azfw-ipconfig"
subnet_id = azurerm_subnet.azfw_subnet.id
public_ip_address_id = azurerm_public_ip.pip_azfw.id
}
firewall_policy_id = azurerm_firewall_policy.azfw_policy.id
}

View File

@ -0,0 +1,7 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "firewall_name" {
value = azurerm_firewall.fw.name
}

View File

@ -0,0 +1,16 @@
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,23 @@
# Azure Firewall and Azure Firewall Policy
This template deploys an [Azure Firewall](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/firewall) with an [Azure Firewall Policy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/firewall_policy)
## Terraform resource types
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [azurerm_virtual_network](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network)
- [azurerm_subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet)
- [azurerm_ip_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/ip_group)
- [azurerm_public_ip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip)
- [azurerm_firewall_policy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/firewall_policy)
- [azurerm_firewall_policy_rule_collection_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/firewall_policy_rule_collection_group)
- [azurerm_firewall](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/firewall)
## Variables
| Name | Description | Default value |
|-|-|-|
| `resource_group_location` | location for your resources | eastus |
| `firewall_sku_tier` | Sku size for your Firewall and Firewall Policy | Premium |
## Example

View File

@ -0,0 +1,22 @@
variable "resource_group_location" {
type = string
description = "Location for all resources."
default = "eastus"
}
variable "resource_group_name_prefix" {
type = string
description = "Prefix for the Resource Group Name that's combined with a random id so name is unique in your Azure subcription."
default = "rg"
}
variable "firewall_sku_tier" {
type = string
description = "Firewall SKU."
default = "Premium" # Valid values are Standard and Premium
validation {
condition = contains(["Standard", "Premium"], var.firewall_sku_tier)
error_message = "The sku must be one of the following: Standard, Premium"
}
}

View File

@ -0,0 +1,26 @@
# Azure API Management
This template deploys an Azure API Management service, containing an API (based on a provided Open API spec). An API Management group and product are then created that are associated with the service and API.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_api_management](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management)
- [azurerm_api_management_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api)
- [azurerm_api_management_product](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_product)
- [azurerm_api_management_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_group)
- [azurerm_api_management_product_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_product_api)
- [azurerm_api_management_product_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_product_group)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `open_api_spec_content_format` | The format of the content from which the API Definition should be imported. Possible values are: openapi, openapi+json, openapi+json-link, openapi-link, swagger-json, swagger-link-json, wadl-link-json, wadl-xml, wsdl and wsdl-link. | swagger-link-json |
| `open_api_spec_content_value` | The Content from which the API Definition should be imported. When a content_format of *-link-* is specified this must be a URL, otherwise this must be defined inline. | http://conferenceapi.azurewebsites.net/?format=json |
## Example

View File

@ -0,0 +1,119 @@
## 08 Sep 24 03:04 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:34 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:51 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 03:12 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 02:45 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 02:51 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:44 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---

View File

@ -0,0 +1,118 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
resource "random_string" "apim_service_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_api_management" "apim_service" {
name = "${random_string.apim_service_name.result}-apim-service"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
publisher_name = "Example Publisher"
publisher_email = "publisher@example.com"
sku_name = "Developer_1"
tags = {
Environment = "Example"
}
policy {
xml_content = <<XML
<policies>
<inbound />
<backend />
<outbound />
<on-error />
</policies>
XML
}
}
resource "random_string" "api_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "random_string" "content_value" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_api_management_api" "api" {
name = "${random_string.api_name.result}-api"
resource_group_name = azurerm_resource_group.rg.name
api_management_name = azurerm_api_management.apim_service.name
revision = "1"
display_name = "${random_string.api_name.result}-api"
path = "example"
protocols = ["https", "http"]
description = "An example API"
import {
content_format = var.open_api_spec_content_format
content_value = var.open_api_spec_content_value
}
}
resource "random_string" "product_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_api_management_product" "product" {
product_id = "${random_string.product_name.result}-product"
resource_group_name = azurerm_resource_group.rg.name
api_management_name = azurerm_api_management.apim_service.name
display_name = "${random_string.product_name.result}-product"
subscription_required = true
approval_required = false
published = true
description = "An example Product"
}
resource "random_string" "group_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_api_management_group" "group" {
name = "${random_string.group_name.result}-group"
resource_group_name = azurerm_resource_group.rg.name
api_management_name = azurerm_api_management.apim_service.name
display_name = "${random_string.group_name.result}-group"
description = "An example group"
}
resource "azurerm_api_management_product_api" "product_api" {
resource_group_name = azurerm_resource_group.rg.name
api_management_name = azurerm_api_management.apim_service.name
product_id = azurerm_api_management_product.product.product_id
api_name = azurerm_api_management_api.api.name
}
resource "azurerm_api_management_product_group" "product_group" {
resource_group_name = azurerm_resource_group.rg.name
api_management_name = azurerm_api_management.apim_service.name
product_id = azurerm_api_management_product.product.product_id
group_name = azurerm_api_management_group.group.name
}

View File

@ -0,0 +1,60 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "apim_service_name" {
value = azurerm_api_management.apim_service.name
}
output "api_name" {
value = azurerm_api_management_api.api.name
}
output "product_name" {
value = azurerm_api_management_product.product.product_id
}
output "group_name" {
value = azurerm_api_management_group.group.name
}
output "service_id" {
description = "The ID of the API Management Service created"
value = azurerm_api_management.apim_service.id
}
output "gateway_url" {
description = "The URL of the Gateway for the API Management Service"
value = azurerm_api_management.apim_service.gateway_url
}
output "service_public_ip_addresses" {
description = "The Public IP addresses of the API Management Service"
value = azurerm_api_management.apim_service.public_ip_addresses
}
output "api_outputs" {
description = "The IDs, state, and version outputs of the APIs created"
value = {
id = azurerm_api_management_api.api.id
is_current = azurerm_api_management_api.api.is_current
is_online = azurerm_api_management_api.api.is_online
version = azurerm_api_management_api.api.version
version_set_id = azurerm_api_management_api.api.version_set_id
}
}
output "product_id" {
description = "The ID of the Product created"
value = azurerm_api_management_product.product.id
}
output "product_api_id" {
description = "The ID of the Product/API association created"
value = azurerm_api_management_product_api.product_api.id
}
output "product_group_id" {
description = "The ID of the Product/Group association created"
value = azurerm_api_management_product_group.product_group.id
}

View File

@ -0,0 +1,18 @@
terraform {
required_version = ">=1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,27 @@
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 "open_api_spec_content_format" {
type = string
default = "swagger-link-json"
description = "The format of the content from which the API Definition should be imported. Possible values are: openapi, openapi+json, openapi+json-link, openapi-link, swagger-json, swagger-link-json, wadl-link-json, wadl-xml, wsdl and wsdl-link."
validation {
condition = contains(["openapi", "openapi+json", "openapi+json-link", "openapi-link", "swagger-json", "swagger-link-json", "wadl-link-json", "wadl-xml", "wsdl", "wsdl-link"], var.open_api_spec_content_format)
error_message = "open_api_spec_content_format must be one of the following: openapi, openapi+json, openapi+json-link, openapi-link, swagger-json, swagger-link-json, wadl-link-json, wadl-xml, wsdl and wsdl-link."
}
}
variable "open_api_spec_content_value" {
type = string
default = "http://conferenceapi.azurewebsites.net/?format=json"
description = "The Content from which the API Definition should be imported. When a content_format of *-link-* is specified this must be a URL, otherwise this must be defined inline."
}

View File

@ -0,0 +1,935 @@
## 08 Sep 24 02:51 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 02:58 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 02:54 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 02:34 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 03:04 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 02:48 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 03:16 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 28 Jan 24 01:51 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.89.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 21 Jan 24 01:07 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.88.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 14 Jan 24 01:41 UTC
Success: true
### Versions
Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.87.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 07 Jan 24 01:44 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.86.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 31 Dec 23 01:35 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 24 Dec 23 01:08 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 17 Dec 23 01:46 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 10 Dec 23 01:29 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.84.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 04 Dec 23 03:38 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.83.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 26 Nov 23 06:06 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.82.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 19 Nov 23 03:24 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.81.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 12 Nov 23 06:43 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.80.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 05 Nov 23 07:15 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.79.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 29 Oct 23 06:54 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.78.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 22 Oct 23 04:42 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.77.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 15 Oct 23 04:34 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.76.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 08 Oct 23 04:27 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 01 Oct 23 05:59 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 24 Sep 23 04:19 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.74.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Sep 23 10:34 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 17 Sep 23 04:01 UTC
Success: false
### Versions
Terraform v1.5.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 10 Sep 23 04:26 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.72.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 03 Sep 23 05:27 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 27 Aug 23 05:12 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Aug 23 05:38 UTC
Success: true
### Versions
Terraform v1.5.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.70.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 13 Aug 23 05:29 UTC
Success: true
### Versions
Terraform v1.5.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.69.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 06 Aug 23 05:44 UTC
Success: true
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.68.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 30 Jul 23 06:46 UTC
Success: true
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.67.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Jul 23 04:34 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.65.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Jul 23 05:26 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.64.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 02 Jul 23 05:39 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.63.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 25 Jun 23 04:54 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.62.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 18 Jun 23 05:47 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.61.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 11 Jun 23 05:34 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.60.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 04 Jun 23 06:01 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.59.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 28 May 23 05:23 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.58.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 21 May 23 04:28 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.57.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 14 May 23 04:20 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.56.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 07 May 23 05:30 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.55.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 30 Apr 23 04:00 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.54.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 23 Apr 23 04:23 UTC
Success: true
### Versions
Terraform v1.4.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.53.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Apr 23 05:46 UTC
Success: true
### Versions
Terraform v1.4.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.52.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Apr 23 05:00 UTC
Success: true
### Versions
Terraform v1.4.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.51.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 02 Apr 23 04:09 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.50.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 26 Mar 23 04:46 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.49.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 19 Mar 23 04:15 UTC
Success: true
### Versions
Terraform v1.4.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.48.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 12 Mar 23 05:15 UTC
Success: true
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.47.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 10 Mar 23 22:28 UTC
Success: true
### Versions
Terraform v1.3.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.47.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---

View File

@ -0,0 +1,25 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
name = random_pet.rg_name.id
location = var.resource_group_location
}
resource "random_string" "azurerm_api_management_name" {
length = 13
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_api_management" "api" {
name = "apiservice${random_string.azurerm_api_management_name.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
publisher_email = var.publisher_email
publisher_name = var.publisher_name
sku_name = "${var.sku}_${var.sku_count}"
}

View File

@ -0,0 +1,7 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "api_management_service_name" {
value = azurerm_api_management.api.name
}

View File

@ -0,0 +1,16 @@
terraform {
required_version = ">=1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,21 @@
# Azure API Management service
This template deploys an Azure API Management service.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_api_management](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `publisher_email` | Email address of the owner of the service. | test@contoso.com |
| `publisher_name` | Name of the owner of the service. | publisher |
| `sku` | Pricing tier of this API Management service | Developer |
| `sku_count` | Instance size of this API Management service. | 1 |

View File

@ -0,0 +1,51 @@
variable "resource_group_location" {
type = string
default = "eastus"
description = "Location for all resources."
}
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 "publisher_email" {
default = "test@contoso.com"
description = "The email address of the owner of the service"
type = string
validation {
condition = length(var.publisher_email) > 0
error_message = "The publisher_email must contain at least one character."
}
}
variable "publisher_name" {
default = "publisher"
description = "The name of the owner of the service"
type = string
validation {
condition = length(var.publisher_name) > 0
error_message = "The publisher_name must contain at least one character."
}
}
variable "sku" {
description = "The pricing tier of this API Management service"
default = "Developer"
type = string
validation {
condition = contains(["Developer", "Standard", "Premium"], var.sku)
error_message = "The sku must be one of the following: Developer, Standard, Premium."
}
}
variable "sku_count" {
description = "The instance size of this API Management service."
default = 1
type = number
validation {
condition = contains([1, 2], var.sku_count)
error_message = "The sku_count must be one of the following: 1, 2."
}
}

View File

@ -0,0 +1,901 @@
## 08 Sep 24 01:57 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 01:49 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 01:44 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 01:50 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 01:39 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 01:43 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 02:34 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 28 Jan 24 01:25 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.89.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 21 Jan 24 00:43 UTC
Success: true
### Versions
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.88.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 14 Jan 24 01:14 UTC
Success: true
### Versions
Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.87.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 07 Jan 24 01:16 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.86.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 31 Dec 23 01:09 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 24 Dec 23 00:42 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 17 Dec 23 01:18 UTC
Success: true
### Versions
Terraform v1.6.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.85.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 10 Dec 23 01:04 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.84.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
### Error
---
## 04 Dec 23 03:12 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.83.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 26 Nov 23 05:16 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.82.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 19 Nov 23 02:59 UTC
Success: true
### Versions
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.81.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 12 Nov 23 06:19 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.80.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 05 Nov 23 06:52 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.79.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 29 Oct 23 06:30 UTC
Success: true
### Versions
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.78.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 22 Oct 23 04:14 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.77.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 15 Oct 23 04:09 UTC
Success: true
### Versions
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.76.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 08 Oct 23 03:59 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 01 Oct 23 05:34 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.75.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 24 Sep 23 03:53 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.74.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Sep 23 10:06 UTC
Success: true
### Versions
Terraform v1.5.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 17 Sep 23 03:59 UTC
Success: true
### Versions
Terraform v1.5.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.73.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 10 Sep 23 04:01 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.72.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 03 Sep 23 05:02 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 27 Aug 23 04:45 UTC
Success: true
### Versions
Terraform v1.5.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.71.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 20 Aug 23 05:12 UTC
Success: true
### Versions
Terraform v1.5.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.70.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 13 Aug 23 05:03 UTC
Success: true
### Versions
Terraform v1.5.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.69.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 06 Aug 23 05:18 UTC
Success: true
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.68.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 30 Jul 23 06:18 UTC
Success: true
### Versions
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.67.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Jul 23 04:08 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.65.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Jul 23 05:31 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.64.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 02 Jul 23 05:44 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.63.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 25 Jun 23 04:27 UTC
Success: true
### Versions
Terraform v1.5.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.62.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 18 Jun 23 05:21 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.61.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 11 Jun 23 05:16 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.60.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 04 Jun 23 05:36 UTC
Success: true
### Versions
Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.59.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 28 May 23 04:57 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.58.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 21 May 23 04:03 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.57.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 14 May 23 03:55 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.56.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 07 May 23 05:35 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.55.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 30 Apr 23 03:33 UTC
Success: true
### Versions
Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.54.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 23 Apr 23 03:56 UTC
Success: true
### Versions
Terraform v1.4.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.53.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 16 Apr 23 05:19 UTC
Success: true
### Versions
Terraform v1.4.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.52.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
### Error
---
## 09 Apr 23 05:03 UTC
Success: true
### Versions
Terraform v1.4.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.51.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 02 Apr 23 03:44 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.50.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 26 Mar 23 04:20 UTC
Success: true
### Versions
Terraform v1.4.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.49.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---
## 20 Mar 23 01:59 UTC
Success: true
### Versions
Terraform v1.4.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.48.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
### Error
---

View File

@ -0,0 +1,24 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
name = random_pet.rg_name.id
location = var.resource_group_location
}
resource "random_string" "azurerm_search_service_name" {
length = 25
upper = false
numeric = false
special = false
}
resource "azurerm_search_service" "search" {
name = random_string.azurerm_search_service_name.result
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
sku = var.sku
replica_count = var.replica_count
partition_count = var.partition_count
}

View File

@ -0,0 +1,7 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "azurerm_search_service_name" {
value = azurerm_search_service.search.name
}

View File

@ -0,0 +1,16 @@
terraform {
required_version = ">=1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,24 @@
# Azure Cognitive Search
This template deploys an Azure Cognitive Search service.
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_search_service](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/search_service)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `sku` | The pricing tier of the search service you want to create (for example, basic or standard). | standard |
| `replica_count` | The number of replicas that should be created. | 1 |
| `partition_count` | The number of partitions that should be created. | 1 |
## Example
To see how to run this example, see [Deploy an Azure Cognitive Search service using Terraform](https://learn.microsoft.com/azure/search/search-get-started-bicep).

View File

@ -0,0 +1,41 @@
variable "resource_group_location" {
type = string
description = "Location for all resources."
default = "eastus"
}
variable "resource_group_name_prefix" {
type = string
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
default = "rg"
}
variable "sku" {
description = "The pricing tier of the search service you want to create (for example, basic or standard)."
default = "standard"
type = string
validation {
condition = contains(["free", "basic", "standard", "standard2", "standard3", "storage_optimized_l1", "storage_optimized_l2"], var.sku)
error_message = "The sku must be one of the following values: free, basic, standard, standard2, standard3, storage_optimized_l1, storage_optimized_l2."
}
}
variable "replica_count" {
type = number
description = "Replicas distribute search workloads across the service. You need at least two replicas to support high availability of query workloads (not applicable to the free tier)."
default = 1
validation {
condition = var.replica_count >= 1 && var.replica_count <= 12
error_message = "The replica_count must be between 1 and 12."
}
}
variable "partition_count" {
type = number
description = "Partitions allow for scaling of document count as well as faster indexing by sharding your index over multiple search units."
default = 1
validation {
condition = contains([1, 2, 3, 4, 6, 12], var.partition_count)
error_message = "The partition_count must be one of the following values: 1, 2, 3, 4, 6, 12."
}
}

View File

@ -0,0 +1,119 @@
## 08 Sep 24 02:03 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Sep 24 01:57 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 25 Aug 24 01:53 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 18 Aug 24 01:59 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.116.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 11 Aug 24 01:48 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.115.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 04 Aug 24 01:51 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.114.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---
## 01 Aug 24 02:43 UTC
Success: true
### Versions
Terraform v1.9.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v3.113.0
+ provider registry.terraform.io/hashicorp/random v3.6.2
### Error
---

View File

@ -0,0 +1,86 @@
data "azurerm_client_config" "current" {}
# Generate random resource group name
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
location = var.resource_group_location
name = random_pet.rg_name.id
}
# Generate random value for the log analytics workspace name
resource "random_string" "log_analytics_workspace_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_log_analytics_workspace" "log_analytics_workspace" {
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
name = random_string.log_analytics_workspace_name.result
sku = var.log_analytics_workspace_sku
retention_in_days = var.log_analytics_workspace_retention_in_days
}
# Generate random value for the container app environment name
resource "random_string" "container_app_environment_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_container_app_environment" "container_app_environment" {
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
name = random_string.container_app_environment_name.result
log_analytics_workspace_id = azurerm_log_analytics_workspace.log_analytics_workspace.id
}
# Generate random value for the container app name
resource "random_string" "container_app_name" {
length = 8
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_container_app" "container_app" {
resource_group_name = azurerm_resource_group.rg.name
name = random_string.container_app_name.result
container_app_environment_id = azurerm_container_app_environment.container_app_environment.id
revision_mode = var.container_app_revision_mode
ingress {
allow_insecure_connections = false
external_enabled = true
target_port = 80
traffic_weight {
latest_revision = true
percentage = 100
}
}
template {
container {
name = var.container_name
image = var.container_image
cpu = var.container_cpu
memory = var.container_memory
}
}
}

View File

@ -0,0 +1,15 @@
output "resource_group_name" {
value = azurerm_resource_group.rg.name
}
output "log_analytics_workspace_name" {
value = azurerm_log_analytics_workspace.log_analytics_workspace.name
}
output "container_app_environment_name" {
value = azurerm_container_app_environment.container_app_environment.name
}
output "container_app_name" {
value = azurerm_container_app.container_app.name
}

View File

@ -0,0 +1,19 @@
terraform {
required_version = ">=1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~>3.0"
}
random = {
source = "hashicorp/random"
version = "~>3.0"
}
}
}
provider "azurerm" {
features {}
}

View File

@ -0,0 +1,24 @@
# Azure Container App Environment with Container App
This template deploys an [Azure Container App Environment](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_app_environment) with [Azure Container App](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_app).
## Terraform resource types
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_container_app_environment](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_app_environment)
- [azurerm_container_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/container_app)
## Variables
| Name | Description | Default |
|-|-|-|
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `log_analytics_workspace_sku` | Log analytics workspace sku| PerGB2018 |
| `log_analytics_workspace_retention_in_days` | Log analytics workspace retention in days | 30 |
| `container_app_revision_mode` | Container app revision mode | Single |
| `container_name` | Container name | examplecontainerapp |
| `container_image` | Container image | mcr.microsoft.com/azuredocs/containerapps-helloworld:latest |
| `container_cpu` | Container cpu | 0.25 |
| `container_memory` | Container memory | 0.5Gi |

View File

@ -0,0 +1,53 @@
variable "resource_group_location" {
type = string
description = "Location of the resource group."
default = "eastus"
}
variable "resource_group_name_prefix" {
type = string
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
default = "rg"
}
variable "log_analytics_workspace_sku" {
type = string
description = "Log analytics workspace sku"
default = "PerGB2018"
}
variable "log_analytics_workspace_retention_in_days" {
type = number
description = "Log analytics workspace retention in days"
default = 30
}
variable "container_app_revision_mode" {
type = string
description = "Container app revision mode"
default = "Single"
}
variable "container_name" {
type = string
description = "Container name"
default = "examplecontainerapp"
}
variable "container_image" {
type = string
description = "Container image"
default = "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest"
}
variable "container_cpu" {
type = number
description = "Container cpu"
default = 0.25
}
variable "container_memory" {
type = string
description = "Container memory"
default = "0.5Gi"
}

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,12 @@ resource "azurerm_resource_group" "sigrg" {
# generate a random string (consisting of four characters) # generate a random string (consisting of four characters)
# https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string # https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string
resource "random_string" "rando" { resource "random_string" "random" {
length = 4 length = 4
upper = false upper = false
special = false special = false
} }
# Creates Shared Image Gallery # Creates Shared Image Gallery
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/shared_image_gallery # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/shared_image_gallery
resource "azurerm_shared_image_gallery" "sig" { resource "azurerm_shared_image_gallery" "sig" {

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More