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

azurerm_cosmosdb_account: add new capabilities EnableAggregationPipeline, MongoDBv3.4, mongoEnableDocLevelTTL #2715

Merged
merged 7 commits into from
Jan 22, 2019

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented Jan 18, 2019

fixes #1848 #1927

uses workaround ad described in Azure/azure-sdk-for-go#2864

@katbyte katbyte added this to the 2.0.0 milestone Jan 18, 2019
@katbyte katbyte requested a review from a team January 18, 2019 21:49
@ghost ghost added the size/L label Jan 18, 2019
@katbyte
Copy link
Collaborator Author

katbyte commented Jan 18, 2019

[12:57:22] kt@snowbook:~/hashi/..3../terraform-providers/terraform-provider-azurerm▸f-cosmos-mongo34$ testazure TestAccAzureRMCosmosDBAccount_capability
==> Fixing source code with gofmt...
# This logic should match the search logic in scripts/gofmtcheck.sh
gofmt -s -w `find . -name '*.go' | grep -v vendor`
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -test.run=TestAccAzureRMCosmosDBAccount_capability -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAzureRMCosmosDBAccount_capabilityGremlin
=== PAUSE TestAccAzureRMCosmosDBAccount_capabilityGremlin
=== RUN   TestAccAzureRMCosmosDBAccount_capabilityTable
=== PAUSE TestAccAzureRMCosmosDBAccount_capabilityTable
=== RUN   TestAccAzureRMCosmosDBAccount_capabilityCassandra
=== PAUSE TestAccAzureRMCosmosDBAccount_capabilityCassandra
=== RUN   TestAccAzureRMCosmosDBAccount_capabilityAggregationPipeline
=== PAUSE TestAccAzureRMCosmosDBAccount_capabilityAggregationPipeline
=== RUN   TestAccAzureRMCosmosDBAccount_capabilityMongo35
=== PAUSE TestAccAzureRMCosmosDBAccount_capabilityMongo35
=== RUN   TestAccAzureRMCosmosDBAccount_capabilityDocLevelTTL
=== PAUSE TestAccAzureRMCosmosDBAccount_capabilityDocLevelTTL
=== CONT  TestAccAzureRMCosmosDBAccount_capabilityGremlin
=== CONT  TestAccAzureRMCosmosDBAccount_capabilityMongo35
=== CONT  TestAccAzureRMCosmosDBAccount_capabilityCassandra
=== CONT  TestAccAzureRMCosmosDBAccount_capabilityDocLevelTTL
=== CONT  TestAccAzureRMCosmosDBAccount_capabilityAggregationPipeline
=== CONT  TestAccAzureRMCosmosDBAccount_capabilityTable
--- PASS: TestAccAzureRMCosmosDBAccount_capabilityMongo35 (1321.83s)
--- PASS: TestAccAzureRMCosmosDBAccount_capabilityGremlin (1321.91s)
--- PASS: TestAccAzureRMCosmosDBAccount_capabilityCassandra (1323.35s)
--- PASS: TestAccAzureRMCosmosDBAccount_capabilityDocLevelTTL (1338.59s)
--- PASS: TestAccAzureRMCosmosDBAccount_capabilityAggregationPipeline (1339.40s)
--- PASS: TestAccAzureRMCosmosDBAccount_capabilityTable (1421.25s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	1422.289s
[13:42:28] kt@snowbook:~/hashi/..3../terraform-providers/terraform-provider-azurerm▸f-cosmos-mongo34$ gitacp "patch capabilities"

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from some missing docs (and the comments) this otherwise LGTM

azurerm/resource_arm_cosmos_db_account.go Outdated Show resolved Hide resolved
azurerm/resource_arm_cosmos_db_account.go Show resolved Hide resolved

capabilities = {
name = "EnableCassandra"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’d be good to add a test handling an update here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a test with more than one - we have "MongoDB3.4" and "EnableAggregationPipeline" and a) I have no idea how to add to the .tf file and b) maybe the test should confirm that >1 capabilities can be added.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@tombuildsstuff tombuildsstuff modified the milestones: 2.0.0, 1.22.0 Jan 22, 2019
@ghost ghost added the documentation label Jan 22, 2019
@tombuildsstuff tombuildsstuff merged commit 98ad0dc into master Jan 22, 2019
@tombuildsstuff tombuildsstuff deleted the f-cosmos-mongo34 branch January 22, 2019 16:01
tombuildsstuff added a commit that referenced this pull request Jan 22, 2019
@ghost
Copy link

ghost commented Mar 5, 2019

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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for EnableAggregationPipeline Capability in Cosmos DB (Mongo)
3 participants