Spring Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

HashiCorp Certified: Terraform Associate (004) (HCTA0-004) Terraform-Associate-004 Question # 85 Topic 9 Discussion

HashiCorp Certified: Terraform Associate (004) (HCTA0-004) Terraform-Associate-004 Question # 85 Topic 9 Discussion

Terraform-Associate-004 Exam Topic 9 Question 85 Discussion:
Question #: 85
Topic #: 9

Exhibit:

resource "azurerm_linux_web_app" "app" {

name = "example-app"

resource_group_name = azurerm_resource_group.rg.name

location = azurerm_resource_group.rg.location

service_plan_id = azurerm_service_plan.plan.id

identity {

type = "UserAssigned"

identity_ids = [azurerm_user_assigned_identity.app.id]

}

}

resource "azurerm_role_assignment" "kv_access" {

scope = azurerm_key_vault.kv.id

role_definition_name = "Key Vault Secrets User"

principal_id = azurerm_user_assigned_identity.app.principal_id

}

Two resource blocks are shown: azurerm_linux_web_app and azurerm_role_assignment. When provisioned, the web app will use the role assignment during creation, so the role assignment must be created first. How do you ensure the azurerm_role_assignment resource is created first?


A.

Add a depends_on argument to the azurerm_linux_web_app.


B.

Add a create_before_destroy argument to the azurerm_role_assignment.


C.

Change the order of the azurerm_linux_web_app and azurerm_role_assignment blocks.


D.

Add a count argument to both resources.


Get Premium Terraform-Associate-004 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.