Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test configs: cleaning up deprecated fields #5848

Merged
merged 8 commits into from Feb 24, 2020
Expand Up @@ -349,7 +349,7 @@ data "azurerm_role_definition" "test" {
resource "azurerm_role_assignment" "test" {
scope = "${data.azurerm_subscription.primary.id}"
role_definition_id = "${data.azurerm_subscription.primary.id}${data.azurerm_role_definition.test.id}"
principal_id = "${data.azurerm_client_config.test.service_principal_object_id}"
principal_id = "${data.azurerm_client_config.test.object_id}"
}
`
}
Expand All @@ -364,7 +364,7 @@ resource "azurerm_role_assignment" "test" {
name = "%s"
scope = "${data.azurerm_subscription.primary.id}"
role_definition_name = "Log Analytics Reader"
principal_id = "${data.azurerm_client_config.test.service_principal_object_id}"
principal_id = "${data.azurerm_client_config.test.object_id}"
}
`, id)
}
Expand Down Expand Up @@ -392,7 +392,7 @@ resource "azurerm_role_assignment" "test" {
name = "%s"
scope = "${data.azurerm_subscription.primary.id}"
role_definition_name = "Virtual Machine User Login"
principal_id = "${data.azurerm_client_config.test.service_principal_object_id}"
principal_id = "${data.azurerm_client_config.test.object_id}"
}
`, id)
}
Expand All @@ -411,7 +411,7 @@ resource "azurerm_role_assignment" "test" {
name = "%s"
scope = "${data.azurerm_subscription.primary.id}"
role_definition_id = "${data.azurerm_subscription.primary.id}${data.azurerm_role_definition.test.id}"
principal_id = "${data.azurerm_client_config.test.service_principal_object_id}"
principal_id = "${data.azurerm_client_config.test.object_id}"
}
`, id)
}
Expand Down Expand Up @@ -442,7 +442,7 @@ resource "azurerm_role_assignment" "test" {
name = "%s"
scope = "${data.azurerm_subscription.primary.id}"
role_definition_id = "${azurerm_role_definition.test.id}"
principal_id = "${data.azurerm_client_config.test.service_principal_object_id}"
principal_id = "${data.azurerm_client_config.test.object_id}"
}
`, roleDefinitionId, rInt, roleAssignmentId)
}
Expand Down Expand Up @@ -524,7 +524,7 @@ resource "azurerm_management_group" "test" {
resource "azurerm_role_assignment" "test" {
scope = "${azurerm_management_group.test.id}"
role_definition_id = "${data.azurerm_role_definition.test.id}"
principal_id = "${data.azurerm_client_config.test.service_principal_object_id}"
principal_id = "${data.azurerm_client_config.test.object_id}"
}
`, groupId)
}
Expand Up @@ -1067,7 +1067,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "vhds"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "blob"
}
Expand Down
Expand Up @@ -185,7 +185,7 @@ resource "azurerm_bot_channels_registration" "test" {
location = "global"
resource_group_name = "${azurerm_resource_group.test.name}"
sku = "F0"
microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}"
microsoft_app_id = "${data.azurerm_client_config.current.client_id}"

tags = {
environment = "production"
Expand All @@ -208,7 +208,7 @@ resource "azurerm_bot_channels_registration" "test" {
location = "global"
resource_group_name = "${azurerm_resource_group.test.name}"
sku = "F0"
microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}"
microsoft_app_id = "${data.azurerm_client_config.current.client_id}"

tags = {
environment = "production"
Expand Down Expand Up @@ -243,7 +243,7 @@ resource "azurerm_bot_channels_registration" "test" {
name = "acctestdf%d"
location = "global"
resource_group_name = "${azurerm_resource_group.test.name}"
microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}"
microsoft_app_id = "${data.azurerm_client_config.current.client_id}"
sku = "F0"

endpoint = "https://example.com"
Expand Down
Expand Up @@ -146,7 +146,7 @@ resource "azurerm_bot_web_app" "test" {
location = "global"
resource_group_name = "${azurerm_resource_group.test.name}"
sku = "F0"
microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}"
microsoft_app_id = "${data.azurerm_client_config.current.client_id}"

tags = {
environment = "production"
Expand All @@ -169,7 +169,7 @@ resource "azurerm_bot_web_app" "test" {
location = "global"
resource_group_name = "${azurerm_resource_group.test.name}"
sku = "F0"
microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}"
microsoft_app_id = "${data.azurerm_client_config.current.client_id}"

tags = {
environment = "production"
Expand Down Expand Up @@ -204,7 +204,7 @@ resource "azurerm_bot_web_app" "test" {
name = "acctestdf%d"
location = "global"
resource_group_name = "${azurerm_resource_group.test.name}"
microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}"
microsoft_app_id = "${data.azurerm_client_config.current.client_id}"
sku = "F0"

endpoint = "https://example.com"
Expand Down
Expand Up @@ -106,7 +106,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = "${data.azurerm_client_config.current.tenant_id}"
object_id = "${data.azurerm_client_config.current.service_principal_object_id}"
object_id = "${data.azurerm_client_config.current.object_id}"

key_permissions = [
"create",
Expand Down
Expand Up @@ -480,7 +480,7 @@ resource "azurerm_key_vault" "test" {
resource "azurerm_key_vault_access_policy" "service-principal" {
key_vault_id = azurerm_key_vault.test.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -781,7 +781,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

certificate_permissions = [
"create",
Expand Down
Expand Up @@ -236,7 +236,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -456,7 +456,7 @@ resource "azurerm_key_vault" "test" {
resource "azurerm_key_vault_access_policy" "service-principal" {
key_vault_id = azurerm_key_vault.test.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -326,7 +326,7 @@ resource "azurerm_key_vault" "test" {
resource "azurerm_key_vault_access_policy" "service-principal" {
key_vault_id = azurerm_key_vault.test.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -978,7 +978,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

certificate_permissions = [
"create",
Expand Down
Expand Up @@ -697,7 +697,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = "${data.azurerm_client_config.current.tenant_id}"
object_id = "${data.azurerm_client_config.current.service_principal_object_id}"
object_id = "${data.azurerm_client_config.current.object_id}"

key_permissions = [
"create",
Expand Down Expand Up @@ -867,7 +867,7 @@ resource "azurerm_key_vault" "test" {
resource "azurerm_key_vault_access_policy" "service-principal" {
key_vault_id = azurerm_key_vault.test.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -359,7 +359,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = "${data.azurerm_client_config.current.tenant_id}"
object_id = "${data.azurerm_client_config.current.service_principal_object_id}"
object_id = "${data.azurerm_client_config.current.object_id}"

key_permissions = [
"create",
Expand Down
Expand Up @@ -820,7 +820,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = "${data.azurerm_client_config.current.tenant_id}"
object_id = "${data.azurerm_client_config.current.service_principal_object_id}"
object_id = "${data.azurerm_client_config.current.object_id}"

key_permissions = [
"backup",
Expand Down
Expand Up @@ -503,7 +503,7 @@ resource "azurerm_key_vault" "test" {
resource "azurerm_key_vault_access_policy" "service-principal" {
key_vault_id = azurerm_key_vault.test.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -326,7 +326,7 @@ resource "azurerm_key_vault" "test" {
resource "azurerm_key_vault_access_policy" "service-principal" {
key_vault_id = azurerm_key_vault.test.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -1169,7 +1169,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

certificate_permissions = [
"create",
Expand Down Expand Up @@ -1519,7 +1519,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"backup",
Expand Down
Expand Up @@ -503,7 +503,7 @@ resource "azurerm_key_vault" "test" {
resource "azurerm_key_vault_access_policy" "service-principal" {
key_vault_id = azurerm_key_vault.test.id
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
Expand Down
Expand Up @@ -1122,7 +1122,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

certificate_permissions = [
"create",
Expand Down Expand Up @@ -1509,7 +1509,7 @@ resource "azurerm_key_vault" "test" {

access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"backup",
Expand Down
Expand Up @@ -202,7 +202,6 @@ resource "azurerm_storage_queue" "test" {

resource "azurerm_storage_container" "test" {
name = "vhds"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down Expand Up @@ -263,21 +262,18 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_queue" "test" {
name = "mysamplequeue-%d"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
}

resource "azurerm_storage_container" "test" {
name = "vhds"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}

resource "azurerm_storage_blob" "test" {
name = "herpderp1.vhd"

resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
storage_container_name = "${azurerm_storage_container.test.name}"

Expand Down
Expand Up @@ -606,7 +606,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "acctest"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down
Expand Up @@ -608,7 +608,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "acctest"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down
Expand Up @@ -617,7 +617,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "acctest"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down
Expand Up @@ -564,7 +564,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "acctest"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down
Expand Up @@ -564,7 +564,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "acctest"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down
Expand Up @@ -608,7 +608,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "acctest"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down
Expand Up @@ -528,7 +528,6 @@ resource "azurerm_storage_account" "test" {

resource "azurerm_storage_container" "test" {
name = "acctest"
resource_group_name = "${azurerm_resource_group.test.name}"
storage_account_name = "${azurerm_storage_account.test.name}"
container_access_type = "private"
}
Expand Down
Expand Up @@ -148,7 +148,7 @@ resource "azurerm_healthcare_service" "test" {
resource_group_name = "${azurerm_resource_group.test.name}"

access_policy_object_ids = [
"${data.azurerm_client_config.current.service_principal_object_id}",
"${data.azurerm_client_config.current.object_id}",
]
}
`, data.RandomInteger, location, data.RandomIntOfLength(17)) //name can only be 24 chars long
Expand All @@ -165,7 +165,7 @@ resource "azurerm_healthcare_service" "import" {
resource_group_name = azurerm_healthcare_service.test.resource_group_name

access_policy_object_ids = [
"${data.azurerm_client_config.current.service_principal_object_id}",
"${data.azurerm_client_config.current.object_id}",
]
}
`, template)
Expand Down Expand Up @@ -194,7 +194,7 @@ resource "azurerm_healthcare_service" "test" {
}

access_policy_object_ids = [
"${data.azurerm_client_config.current.service_principal_object_id}",
"${data.azurerm_client_config.current.object_id}",
]

authentication_configuration {
Expand Down