From a0e7ba35c5c0895009b8507fb0d296a3888b6618 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Fri, 12 Jun 2020 23:04:27 +0100 Subject: [PATCH] Update documentation examples to use Terraform 0.12 expressions --- website/docs/d/domains.html.markdown | 2 +- website/docs/r/application_certificate.html.markdown | 4 ++-- website/docs/r/application_password.html.markdown | 9 ++------- website/docs/r/group.markdown | 7 +++++-- website/docs/r/group_member.markdown | 4 ++-- website/docs/r/service_principal.html.markdown | 2 +- .../r/service_principal_certificate.html.markdown | 6 +++--- .../docs/r/service_principal_password.html.markdown | 11 +++-------- website/docs/r/user.html.markdown | 2 +- 9 files changed, 20 insertions(+), 27 deletions(-) diff --git a/website/docs/d/domains.html.markdown b/website/docs/d/domains.html.markdown index 3fb52801c5..ff946e1bec 100644 --- a/website/docs/d/domains.html.markdown +++ b/website/docs/d/domains.html.markdown @@ -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 } ``` diff --git a/website/docs/r/application_certificate.html.markdown b/website/docs/r/application_certificate.html.markdown index 7c68a3c303..7f38533c9a 100644 --- a/website/docs/r/application_certificate.html.markdown +++ b/website/docs/r/application_certificate.html.markdown @@ -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" } ``` diff --git a/website/docs/r/application_password.html.markdown b/website/docs/r/application_password.html.markdown index a648e45a84..d26d4ae264 100644 --- a/website/docs/r/application_password.html.markdown +++ b/website/docs/r/application_password.html.markdown @@ -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" diff --git a/website/docs/r/group.markdown b/website/docs/r/group.markdown index df80da31fa..5dee3c0a9d 100644 --- a/website/docs/r/group.markdown +++ b/website/docs/r/group.markdown @@ -29,12 +29,15 @@ resource "azuread_group" "example" { resource "azuread_user" "example" { display_name = "J Doe" password = "notSecure123" - user_principal_name = "j.doe@terraform.onmicrosoft.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 */ + ] } ``` diff --git a/website/docs/r/group_member.markdown b/website/docs/r/group_member.markdown index 3a6aab83a1..bd24c0e59a 100644 --- a/website/docs/r/group_member.markdown +++ b/website/docs/r/group_member.markdown @@ -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 } ``` diff --git a/website/docs/r/service_principal.html.markdown b/website/docs/r/service_principal.html.markdown index 438df8dbd9..b2e28b4f6d 100644 --- a/website/docs/r/service_principal.html.markdown +++ b/website/docs/r/service_principal.html.markdown @@ -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"] diff --git a/website/docs/r/service_principal_certificate.html.markdown b/website/docs/r/service_principal_certificate.html.markdown index c2a0cce9ae..abb77e6844 100644 --- a/website/docs/r/service_principal_certificate.html.markdown +++ b/website/docs/r/service_principal_certificate.html.markdown @@ -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" } ``` diff --git a/website/docs/r/service_principal_password.html.markdown b/website/docs/r/service_principal_password.html.markdown index ad31b94376..52459f0a1e 100644 --- a/website/docs/r/service_principal_password.html.markdown +++ b/website/docs/r/service_principal_password.html.markdown @@ -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" diff --git a/website/docs/r/user.html.markdown b/website/docs/r/user.html.markdown index 8ad228f8e8..43fb6c3532 100644 --- a/website/docs/r/user.html.markdown +++ b/website/docs/r/user.html.markdown @@ -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!"