Skip to content

Commit 9654e12

Browse files
committed
Merge branch 'tf-doc-update' of https://github.com/geekzter/azure-identity-scripts into tf-doc-update
2 parents e46ebd2 + 2264df6 commit 9654e12

File tree

1 file changed

+17
-8
lines changed
  • terraform/azure-devops/create-service-connection

1 file changed

+17
-8
lines changed

terraform/azure-devops/create-service-connection/README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@
33

44
[![Build Status](https://dev.azure.com/geekzter/Pipeline%20Playground/_apis/build/status%2Fcreate-service-connection?branchName=main&label=terraform-ci)](https://dev.azure.com/geekzter/Pipeline%20Playground/_build/latest?definitionId=5&branchName=main)
55

6-
Many large customers have additional requirements around the management of the Entra ID object that a service connection creates and the permissions it is assigned to.
6+
Many Enterprise customers have requirements around the management of Entra [workload identities](https://learn.microsoft.com/entra/workload-id/workload-identities-overview) (applications, service principals, managed identities) and the permissions they are assigned to.
77

88
These are a few common requirements and constraints:
99

1010
- Specific secret expiration and auto-rotation control
1111
- Custom role assignments for Azure [data plane](https://learn.microsoft.com/azure/azure-resource-manager/management/control-plane-and-data-plane#data-plane) access e.g. [Key Vault](https://learn.microsoft.com/azure/key-vault/general/rbac-guide?tabs=azure-cli#azure-built-in-roles-for-key-vault-data-plane-operations), [Kusto](https://learn.microsoft.com/azure/data-explorer/kusto/access-control/role-based-access-control), [Storage](https://learn.microsoft.com/azure/storage/blobs/assign-azure-role-data-access?tabs=portal)
12-
- Creation of app registrations is [disabled in Entra ID](https://learn.microsoft.com/entra/identity/role-based-access-control/delegate-app-roles#restrict-who-can-create-applications) or the use of Managed Identities for Azure access is explicitly mandated
13-
- Required ITSM metadata on Entra ID app registration (IT Service Management Reference, naming convention, notes)
14-
- Co-owners are required to exist for Entra ID app registrations
15-
- The organization has an IT fulfillment process where identities are automatically created based on a service request
12+
- Creation of app registrations is [disabled in Entra ID](https://learn.microsoft.com/entra/identity/role-based-access-control/delegate-app-roles#restrict-who-can-create-applications) and/or
13+
the use of Managed Identities for Azure access is mandated
14+
- ITSM metadata is required on Entra ID objects (service nanagement reference, naming convention, notes)
15+
- Co-owners are required to exist for Entra ID apps
16+
- An IT fulfillment process exists where identities are automatically provisioned based on a service request
1617

1718
## Why Terraform?
1819

19-
Terraform employs a provider model which enable all changes to be made by a single tool and configuration:
20+
Terraform employs a provider model which enables all changes to be made by a single tool and configuration:
2021

2122
| Service | Provider | API |
2223
|--------------|----------|-----|
2324
| Azure | [azurerm](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs) | [Azure Resource Manager REST API](https://learn.microsoft.com/rest/api/resources/) |
2425
| Azure DevOps | [azuredevops](https://registry.terraform.io/providers/microsoft/azuredevops/latest/docs) | [Azure DevOps REST API](https://learn.microsoft.com/rest/api/azure/devops/serviceendpoint/endpoints) |
2526
| Entra ID | [azuread](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs) | [Microsoft Graph API](https://learn.microsoft.com/graph/use-the-api) |
2627

27-
Terraform is a declarative tool that is capable if inferring dependencies to create resources in the correct order. This is the output from `terraform graph`:
28+
HCL, the language used, is declarative and the tool is capable if inferring dependencies to create resources in order. This is the output from `terraform graph`:
2829
![Terraform graph](graph.png)
2930

3031
More information:
@@ -42,6 +43,13 @@ Provisioning is a matter of specifying [variables](https://developer.hashicorp.c
4243

4344
Terraform variable can be provided as a .auto.tfvars file, see [sample](config.auto.tfvars.sample).
4445

46+
#### Default configuration
47+
48+
```hcl
49+
azdo_organization_url = "https://dev.azure.com/my-organization"
50+
azdo_project_name = "my-project"
51+
```
52+
4553
#### Managed Identity with Federated Identity Credential and custom RBAC
4654

4755
```hcl
@@ -67,7 +75,7 @@ create_managed_identity = true
6775
managed_identity_resource_group_id = "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/msi-rg"
6876
```
6977

70-
#### App registration with Federated Identity Credential and ITSM information
78+
#### App registration with Federated Identity Credential and ITSM metadata
7179

7280
```hcl
7381
azdo_creates_identity = false
@@ -99,6 +107,7 @@ entra_secret_expiration_days = 0 # secret lasts 1 hour
99107

100108
## Terraform Configuration
101109

110+
The (required) variables and output is listed below.
102111
Generated with [terraform-docs](https://terraform-docs.io/).
103112

104113
### Providers

0 commit comments

Comments
 (0)