Skip to content

Commit 1ce64ff

Browse files
committed
fix: Update SSL profile validation conditions and cipher suites in testing.tftest.hcl
1 parent 8034e60 commit 1ce64ff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/testing.tftest.hcl

+5-5
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,12 @@ run "plan" {
357357
}
358358

359359
assert {
360-
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy.policy_type == var.ssl_profiles[0].policy_type
360+
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy[0].policy_type == var.ssl_profiles[0].policy_type
361361
error_message = "The policy_type of the first SSL Profile is not as expected."
362362
}
363363

364364
assert {
365-
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy.policy_name == var.ssl_profiles[0].policy_name
365+
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-1"].ssl_policy[0].policy_name == var.ssl_profiles[0].policy_name
366366
error_message = "The policy_name of the first SSL Profile is not as expected."
367367
}
368368

@@ -372,17 +372,17 @@ run "plan" {
372372
}
373373

374374
assert {
375-
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy.policy_type == var.ssl_profiles[1].policy_type
375+
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy[0].policy_type == var.ssl_profiles[1].policy_type
376376
error_message = "The policy_type of the second SSL Profile is not as expected."
377377
}
378378

379379
assert {
380-
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy.min_protocol_version == var.ssl_profiles[1].min_protocol_version
380+
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy[0].min_protocol_version == var.ssl_profiles[1].min_protocol_version
381381
error_message = "The min_protocol_version of the second SSL Profile is not as expected."
382382
}
383383

384384
assert {
385-
condition = { for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy.cipher_suites == toset(var.ssl_profiles[1].cipher_suites)
385+
condition = tolist({ for profile in azurerm_application_gateway.main.ssl_profile : profile.name => profile }["ssl-profile-2"].ssl_policy[0].cipher_suites) == var.ssl_profiles[1].cipher_suites
386386
error_message = "The cipher_suites of the second SSL Profile is not as expected."
387387
}
388388

0 commit comments

Comments
 (0)