Skip to content

Commit

Permalink
rollback on quota id, edit usage in tf docs
Browse files Browse the repository at this point in the history
  • Loading branch information
qby-chhol committed Dec 12, 2023
1 parent 4ad20af commit e2edebb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ content: |-
{{ indent 0 "#" }} Usage
It's very easy to use!
To use this module, the source and target Management Groups you want to use for Subscription moving are required.
The Management Groups are recommended to have the same display name as the ID for ease of use.
Only the main.tf needs to be run to deploy the function app with the function, which will run immediately.
```hcl
{{ include "examples/basic/main.tf" }}
```
Expand Down
2 changes: 1 addition & 1 deletion AzFunction/SubMover/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
param($Timer)

#region Global variables
$azQuotaID = 'MS-AZR-0029P' # updated from MSDN_2014-09-01
$azQuotaID = 'MSDN_2014-09-01'
$sourceManagementGroupName = $env:source_management_group_name
$targetManagementGroup = $env:target_management_group_name
$ErrorActionPreference = "Stop"
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

----
## Description
This module deploys an Azure Function App with a Function, which moves every VSE Subscription from a source management group to a target management group, based on the Quota ID MS-AZR-0029P.
The function runs every 5 minutes.
This module deploys an Azure Function App with a Function, which moves every VSE Subscription from a source management group to a target management group, based on the Quota ID MSDN_2014_09_01.
The function runs every 5 minutes.

<!-- BEGIN_TF_DOCS -->
## Usage
Expand All @@ -16,24 +16,25 @@ provider "azurerm" {
features {}
}
resource "azurerm_management_group" "source" {
name = "Test-Source"
data "azurerm_management_group" "source" {
name = "CHHOL-New"
}
resource "azurerm_management_group" "target" {
name = "Test-Target"
data "azurerm_management_group" "target" {
name = "CHHOL-Sandbox"
}
module "vse_subscription_mover" {
source = "../.."
location = "westeurope"
resource_group_name = "rg-SubMover-dev-01"
function_app_name = "func-dev-SubMover-test-01"
app_service_plan_name = "plan-dev-SubMover-test-01"
storage_account_name = "stfuntestsubmover01"
source = "../.."
location = "westeurope"
resource_group_name = "rg-SubMover-dev-01"
function_app_name = "func-dev-SubMover-test-01"
app_service_plan_name = "plan-dev-SubMover-test-01"
storage_account_name = "stfunchholsubmover01"
application_insights_name = "appi-SubMover-dev-01"
source_management_group = azurerm_management_group.source
target_management_group = azurerm_management_group.target
source_management_group = data.azurerm_management_group.source
target_management_group = data.azurerm_management_group.target
}
```

Expand All @@ -52,9 +53,9 @@ module "vse_subscription_mover" {
| <a name="input_function_app_name"></a> [function\_app\_name](#input\_function\_app\_name) | Name of the Azure Function App in which the function will be deployed. | `string` | n/a | yes |
| <a name="input_location"></a> [location](#input\_location) | Name of the location where the resources will be provisioned. | `string` | n/a | yes |
| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | Name of the resource group in which to create the resources. Changing this forces new resources to be created. | `string` | n/a | yes |
| <a name="input_source_management_group"></a> [source\_management\_group](#input\_source\_management\_group) | The source management group from which the Subscriptions will be moved from. The name used here is not the display name, it is the ID shown next to the display name in the Azure Portal Management Group view. | <pre>object({<br> name = string<br> id = string<br> })</pre> | n/a | yes |
| <a name="input_source_management_group"></a> [source\_management\_group](#input\_source\_management\_group) | The source management group from which the Subscriptions will be moved from. The name used here is not the display name, it is the ID shown next to the display name in the Azure Portal Management Group view. | <pre>object({<br> name = string<br> id = string<br> })</pre> | n/a | yes |
| <a name="input_storage_account_name"></a> [storage\_account\_name](#input\_storage\_account\_name) | Name of the storage account used for the Azure Function App. | `string` | n/a | yes |
| <a name="input_target_management_group"></a> [target\_management\_group](#input\_target\_management\_group) | The target management group to which the subscriptions will be moved. The name used here is not the display name, it is the ID shown next to the display name in the Azure Portal Management Group view. | <pre>object({<br> name = string<br> id = string<br> })</pre> | n/a | yes |
| <a name="input_target_management_group"></a> [target\_management\_group](#input\_target\_management\_group) | The target management group to which the subscriptions will be moved. The name used here is not the display name, it is the ID shown next to the display name in the Azure Portal Management Group view. | <pre>object({<br> name = string<br> id = string<br> })</pre> | n/a | yes |
## Outputs

No outputs.
Expand Down

0 comments on commit e2edebb

Please sign in to comment.