-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add external metastores to azurerm_hdinsight_hadoop_cluster #6145
Add external metastores to azurerm_hdinsight_hadoop_cluster #6145
Conversation
0c84ab5
to
cbd1cde
Compare
cbd1cde
to
b230942
Compare
2437ccd
to
ce341b9
Compare
Ran (single threaded to avoid hitting core quota):
Results:
|
Perfect - just what I am after for my project. Would love to see this |
@katbyte @tombuildsstuff Could you take a look on this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kosinsky
Thanks for this PR, it's off to a good start for a fairly tricky resource / API.
I've left a few comments in-line that need addressing to begin with. I have some concerns around update behaviours because of the nature of the API (and the absence of models for the configuration items covered here in the SDK). If you can address the comments I've left you'll be able to add tests for setting metastores individually (there should be one test that only sets one/two to prove the Optional
behaviour), and at least one update test that modifies them I think that might shake out a few issues.
Thanks
Ste
…m-provider-azurerm into hdi/external_metastore
make testacc TEST='./azurerm/internal/services/hdinsight/tests/' TESTARGS='-run=Metastore -parallel=1' TESTTIMEOUT='180m'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
TF_ACC=1 go test ./azurerm/internal/services/hdinsight/tests/ -v -run=Metastore -parallel=1 -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN TestAccAzureRMHDInsightHadoopCluster_allMetastores
=== PAUSE TestAccAzureRMHDInsightHadoopCluster_allMetastores
=== RUN TestAccAzureRMHDInsightHadoopCluster_hiveMetastore
=== PAUSE TestAccAzureRMHDInsightHadoopCluster_hiveMetastore
=== RUN TestAccAzureRMHDInsightHadoopCluster_updateMetastore
=== PAUSE TestAccAzureRMHDInsightHadoopCluster_updateMetastore
=== CONT TestAccAzureRMHDInsightHadoopCluster_allMetastores
--- PASS: TestAccAzureRMHDInsightHadoopCluster_allMetastores (1245.81s)
=== CONT TestAccAzureRMHDInsightHadoopCluster_updateMetastore
--- PASS: TestAccAzureRMHDInsightHadoopCluster_updateMetastore (2193.06s)
=== CONT TestAccAzureRMHDInsightHadoopCluster_hiveMetastore
--- PASS: TestAccAzureRMHDInsightHadoopCluster_hiveMetastore (990.66s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hdinsight/tests 4430.51s Added test for single metastore (Hive) as well as for updating. AFAIK, HDInsight doesn't allow to update metastore configuration for existing cluster as a result update will cause cluster replacement. UI and doc has no mentions how to change metastore configuration: https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-use-external-metadata-stores Setting metastore implemented via bootstrap settings https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-bootstrap Documentation doesn't mention any possibility to update these settings. I opened an issue to confirm: MicrosoftDocs/azure-docs#53255 Terraform resources for HDInsight usually require replacement due to API limitations except changes in tags, resizing (changing number of work nodes) and adding edge note. |
@jackofallops I think I got confirmation that we need to replace cluster in case of metastore changes (MicrosoftDocs/azure-docs#53255 (comment)). This PR already supports it. Could you take one more look? |
This has been released in version 2.9.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.9.0"
}
# ... other configuration ... |
@kosinsky Does this optional block for "metastore" holds true for "azurerm_hdinsight_spark_cluster" too. I see this is documented for Hadoop cluster but not for spark. |
Not yet. I'm working on PR to support it for other hdinsight cluster types |
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 👉 hashibot-feedback@hashicorp.com. Thanks! |
Added support for external metastores. Implements #5230
New optional block:
These metastores are optional and completely independent from each other
Fixes #5230