Skip to content

Commit bbff5a8

Browse files
author
Adam Coulter
committed
updated readme to match
1 parent 209f0c4 commit bbff5a8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
33
## Additional Requirements
44

5+
### Provider Dependency
6+
7+
This module is dependent on having a valid azurerm provider block with config set using environment variables `ARM_CLIENT_ID`, `ARM_CLIENT_SECRET`, `ARM_TENANT_ID` and `ARM_SUBSCRIPTION_ID`.
8+
9+
> Having to set a subscription to create a subscription is illogical. It is only required as it is a limitation of the `azurerm` provider to have a valid pre-existing subscription set at plan time.
10+
511
### Required Permissions
612

713
The user or service principal executing this module requires the ability to create subscriptions with an Azure Enrollment Account (with the `Owner` role). See the [Azure Documentation](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/grant-access-to-create-subscription?#grant-access) for how to grant this.
@@ -22,16 +28,8 @@ Install-Module @("Az", "Az.Accounts", "Az.Subscription")
2228
## Usage Example
2329

2430
```hcl
25-
# the azure config can be retrieved from local env variables if provided via that mechanism
26-
data "external" "az_client_config" {
27-
program = ["pwsh", "-command", "@{tenant=$env:ARM_TENANT_ID;client=$env:ARM_CLIENT_ID;secret=$env:ARM_CLIENT_SECRET} | ConvertTo-Json | Write-Output"]
28-
}
29-
3031
module "subscription" {
31-
source = "servian/subscription/azurerm"
32-
name = "My New Subscription"
33-
tenant_id = data.external.az_client_config.result.tenant
34-
client_id = data.external.az_client_config.result.client
35-
client_secret = data.external.az_client_config.result.secret
32+
source = "servian/subscription/azurerm"
33+
name = "My New Subscription"
3634
}
3735
```

0 commit comments

Comments
 (0)