Skip to content

Commit

Permalink
Update documentation examples to use Terraform 0.12 expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed Jun 13, 2020
1 parent b137b3a commit a0e7ba3
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 27 deletions.
2 changes: 1 addition & 1 deletion website/docs/d/domains.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Use this data source to access information about an existing Domains within Azur
data "azuread_domains" "aad_domains" {}
output "domains" {
value = "${data.azuread_domains.aad_domains.domains}"
value = data.azuread_domains.aad_domains.domains
}
```

Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/application_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ resource "azuread_application" "example" {
}
resource "azuread_application_certificate" "example" {
application_object_id = "${azuread_application.example.id}"
application_object_id = azuread_application.example.id
type = "AsymmetricX509Cert"
value = "${file("cert.pem")}"
value = file("cert.pem")
end_date = "2021-05-01T01:02:03Z"
}
```
Expand Down
9 changes: 2 additions & 7 deletions website/docs/r/application_password.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,11 @@ Manages a Password associated with an Application within Azure Active Directory.

```hcl
resource "azuread_application" "example" {
name = "example"
homepage = "http://homepage"
identifier_uris = ["http://uri"]
reply_urls = ["http://replyurl"]
available_to_other_tenants = false
oauth2_allow_implicit_flow = true
name = "example"
}
resource "azuread_application_password" "example" {
application_object_id = "${azuread_application.example.id}"
application_object_id = azuread_application.example.id
description = "My managed password"
value = "VT=uSgbTanZhyz@%nL9Hpd+Tfay_MRV#"
end_date = "2099-01-01T01:02:03Z"
Expand Down
7 changes: 5 additions & 2 deletions website/docs/r/group.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ resource "azuread_group" "example" {
resource "azuread_user" "example" {
display_name = "J Doe"
password = "notSecure123"
user_principal_name = "[email protected].com"
user_principal_name = "jdoe@hashicorp.com"
}
resource "azuread_group" "example" {
name = "MyGroup"
members = [ "${azuread_user.example.object_id}" /*, more users */ ]
members = [
azuread_user.example.object_id,
/* more users */
]
}
```

Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/group_member.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ resource "azuread_group" "example" {
}
resource "azuread_group_member" "example" {
group_object_id = "${azuread_group.example.id}"
member_object_id = "${data.azuread_user.example.id}"
group_object_id = azuread_group.example.id
member_object_id = data.azuread_user.example.id
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/service_principal.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "azuread_application" "example" {
}
resource "azuread_service_principal" "example" {
application_id = "${azuread_application.example.application_id}"
application_id = azuread_application.example.application_id
app_role_assignment_required = false
tags = ["example", "tags", "here"]
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/service_principal_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ resource "azuread_application" "example" {
}
resource "azuread_service_principal" "example" {
application_id = "${azuread_application.example.application_id}"
application_id = azuread_application.example.application_id
}
resource "azuread_service_principal_certificate" "example" {
service_principal_id = "${azuread_service_principal.example.id}"
service_principal_id = azuread_service_principal.example.id
type = "AsymmetricX509Cert"
value = "${file("cert.pem")}"
value = file("cert.pem")
end_date = "2021-05-01T01:02:03Z"
}
```
Expand Down
11 changes: 3 additions & 8 deletions website/docs/r/service_principal_password.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@ Manages a Password associated with a Service Principal within Azure Active Direc

```hcl
resource "azuread_application" "example" {
name = "example"
homepage = "http://homepage"
identifier_uris = ["http://uri"]
reply_urls = ["http://replyurl"]
available_to_other_tenants = false
oauth2_allow_implicit_flow = true
name = "example"
}
resource "azuread_service_principal" "example" {
application_id = "${azuread_application.example.application_id}"
application_id = azuread_application.example.application_id
}
resource "azuread_service_principal_password" "example" {
service_principal_id = "${azuread_service_principal.example.id}"
service_principal_id = azuread_service_principal.example.id
description = "My managed password"
value = "VT=uSgbTanZhyz@%nL9Hpd+Tfay_MRV#"
end_date = "2099-01-01T01:02:03Z"
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/user.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Manages a User within Azure Active Directory.

```hcl
resource "azuread_user" "example" {
user_principal_name = "jdo@hashicorp.com"
user_principal_name = "jdoe@hashicorp.com"
display_name = "J. Doe"
mail_nickname = "jdoe"
password = "SecretP@sswd99!"
Expand Down

0 comments on commit a0e7ba3

Please sign in to comment.