Reputation: 15144
Trying to create two Collections at the same time throws me this error:
The specified type system value 'TypedJsonBson' is invalid.
Judging by the response log, and the fact that the error is occurring at the apply
phase, I suspect it is something with the API.
Samples:
It is possible to avoid this problem by creating one Collection at a time.
depends_on = [
azurerm_cosmosdb_mongo_collection.example
]
Upvotes: 0
Views: 362
Reputation: 28264
I tried your terraform main.tf
files on my local PowerShell, it works fine. So the terraform configuration file should be correct.
I would suggest running terraform apply
on the Azure cloud shell. You could remove the old terraform.tfstate
file and .terraform
folder and re-run terraform init
locally or verify other reasons on your working environment.
Upvotes: 1
Reputation: 8763
Yes, if Terraform has a means to specify that parent resources need to exist before child resources can be created then you should use this because ARM requires this for any resource to be created.
Upvotes: 0