Skip to content

Commit

Permalink
Refresh readme and docs homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed Jun 29, 2021
1 parent 2f21593 commit 94adb73
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@
## Usage Example

```
# Configure the Azure AD Provider
# Configure Terraform
terraform {
required_providers {
azuread = {
source = "hashicorp/azuread"
version = "~> 2.0.0"
}
}
}
# Configure the Azure Active Directory Provider
provider "azuread" {
version = "~> 1.0.0"
# NOTE: Environment Variables can also be used for Service Principal authentication
# Terraform also supports authenticating via the Azure CLI too.
# see here for more info: https://terraform.io/docs/providers/azuread/
# See official docs for more info: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs
# client_id = "..."
# client_secret = "..."
Expand All @@ -42,12 +51,12 @@ resource "azuread_service_principal" "example" {
# Create a user
resource "azuread_user" "example" {
user_principal_name = "ExampleUser@${data.azuread_domains.example.domains.0.domain_name}"
display_name = "ExampleUser"
display_name = "Example User"
password = "..."
}
```

Further [usage documentation](https://www.terraform.io/docs/providers/azuread/) is available on the Terraform website.
Further [usage documentation](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs) is available on the Terraform website.


## Developer Requirements
Expand Down
12 changes: 12 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ provider "azuread" {
tenant_id = "00000000-0000-0000-0000-000000000000"
}
# Retrieve domain information
data "azuread_domains" "example" {
only_initial = true
}
# Create an application
resource "azuread_application" "example" {
display_name = "ExampleApp"
Expand All @@ -31,6 +36,13 @@ resource "azuread_application" "example" {
resource "azuread_service_principal" "example" {
application_id = azuread_application.example.application_id
}
# Create a user
resource "azuread_user" "example" {
user_principal_name = "ExampleUser@${data.azuread_domains.example.domains.0.domain_name}"
display_name = "Example User"
password = "..."
}
```

## Authenticating to Azure Active Directory
Expand Down

0 comments on commit 94adb73

Please sign in to comment.