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

Ignore autoaz changes #937

Merged
merged 4 commits into from
Nov 30, 2021
Merged

Ignore autoaz changes #937

merged 4 commits into from
Nov 30, 2021

Conversation

kuritsu
Copy link
Contributor

@kuritsu kuritsu commented Nov 30, 2021

This change will prevent Terraform to restart a cluster which AwsAttributes.zone_id = "auto", as this is an unneeded/unwanted behavior.

@codecov
Copy link

codecov bot commented Nov 30, 2021

Codecov Report

Merging #937 (0d47cbb) into master (3c3bf70) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 0d47cbb differs from pull request most recent head 7fd02ad. Consider uploading reports for the commit 7fd02ad to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #937   +/-   ##
=======================================
  Coverage   85.32%   85.32%           
=======================================
  Files          95       95           
  Lines        8663     8670    +7     
=======================================
+ Hits         7392     7398    +6     
- Misses        778      779    +1     
  Partials      493      493           
Impacted Files Coverage Δ
clusters/resource_cluster.go 77.59% <100.00%> (+0.75%) ⬆️
pipelines/resource_pipeline.go 88.54% <100.00%> (+0.12%) ⬆️
sqlanalytics/resource_widget.go 85.40% <0.00%> (-0.73%) ⬇️

Copy link
Contributor

@nfx nfx left a comment

Choose a reason for hiding this comment

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

Please see comments

@@ -47,9 +48,19 @@ func SparkConfDiffSuppressFunc(k, old, new string, d *schema.ResourceData) bool
return false
}

func AwsAttribsDiffSuppressFunc(k, old, new string, d *schema.ResourceData) bool {
if strings.HasPrefix(k, "aws_attributes.") &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Just check for key as a string - I've made GoLang custom struct fields to translate as always-single-element-lists, so you can be sure of first element being zero

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

clusters/resource_cluster.go Show resolved Hide resolved
clusters/resource_cluster_test.go Show resolved Hide resolved
@nfx nfx added this to the v0.4.0 milestone Nov 30, 2021
@nfx nfx merged commit fdfe505 into databricks:master Nov 30, 2021
@kuritsu kuritsu deleted the ignore-autoaz-changes branch November 30, 2021 23:20
michael-berk pushed a commit to michael-berk/terraform-provider-databricks that referenced this pull request Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants