Skip to content

Use the "implicit dependency" approach as a best practice. In this case...

Anastasiia Dolot requested to merge ad/fix-dependency-issue-ms-suggestion into master

All Submissions:


  • [YES] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [NO] I have updated the documentation accordingly.
  • [YES] My code follows the code style of this project.

Current Behavior or Linked Issues


Connected MR !910 (diffs)

Issue: Terraform data sources need to be read during terraform apply. The data source azurerm_cosmosdb_sql_role_definition can only be read after the cosmos DB resource is created. If missing the dependency, terraform will fail due to timeout reading azurerm_cosmosdb_sql_role_definition data source. Error: Sql Role Definition: (Name "00000000-0000-0000-0000-000000000002" / Database Account Name "db account name" / Resource Group "rg name") was not found

Use the "implicit dependency" approach as a best practice. Implicit dependency is faster and relies on the property account_name in this case. if we refer value to the module output - this will be "Implicit dependency" and we don't need to specify "depends_on": account_name = module.graph_account.account_name

Does this introduce a breaking change?


  • [NO]

Other information


This issue only happens on the first time the cosmos DB account is provisioned.

Merge request reports

Loading