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

CosmosDB MongoDB Capabilities can't be set. #1927

Closed
alex0ptr opened this issue Sep 14, 2018 · 5 comments
Closed

CosmosDB MongoDB Capabilities can't be set. #1927

alex0ptr opened this issue Sep 14, 2018 · 5 comments

Comments

@alex0ptr
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

We use Terraform to provide a CosmosDB in the MongoDB variant. Every time we run Terraform it wants to perform the following change:

Terraform will perform the following actions:
  ~ module.svhb_state_service_cosmos.azurerm_cosmosdb_account.db
      capabilities.#:               "1" => "0"
      capabilities.1110180979.name: "MongoDBv3.4" => ""

This resource modification alone takes about a minute to perform and therefore slows down the whole template.

Also we can't define the capabilities ourself because if we try with a capabilities block:

  capabilities {
    name = "MongoDBv3.4"    
  }

because then we get a validation error expected capabilities.0.name to be one of [EnableTable EnableGremlin EnableCassandra], got MongoDBv3.4.

Potential Terraform Configuration

Add the following option to capabilities:

capabilities {
  name="MongoDB3.4"
}

alternatively please don't validate the values.

@katbyte
Copy link
Collaborator

katbyte commented Sep 28, 2018

Hi @alex0ptr,

I have added it to a branch, however when I attempt to test I get the opposite problem:

testing.go:513: Step 0 error: After applying this step, the plan was not empty:

		DIFF:

		UPDATE: azurerm_cosmosdb_account.test
		  capabilities.#:               "0" => "1"
		  capabilities.1110180979.name: "" => "MongoDBv3.4"

Is this a preview feature/something that needs to be enabled on at subscription level?

@tombuildsstuff
Copy link
Contributor

@katbyte I took a quick look into this earlier in the week (since it's related to #1848) - in the Portal it states this can take up to 30m to apply, so it could be an eventual consistency issue where the feature doesn't get enabled behind the scenes for ~20m (so I guess we'd need to poll for this?)

@alex0ptr
Copy link
Author

I get the feeling, that this will be hard to maintain because of the many options that might also change quite often. Can someone test what happens if there is a capability that is not documented? If the request fails it may be better to leave validation to Cosmos API.

@tombuildsstuff tombuildsstuff added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label Nov 2, 2018
@katbyte katbyte added this to the Blocked milestone Dec 7, 2018
@katbyte
Copy link
Collaborator

katbyte commented Dec 7, 2018

Blocked on Azure/azure-sdk-for-go#2864

@katbyte katbyte modified the milestones: Blocked, 1.22.0 Feb 8, 2019
@katbyte katbyte removed the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label Feb 8, 2019
@katbyte katbyte closed this as completed Feb 8, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants