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

Vault secondary tier by reference #289

Merged
merged 5 commits into from
May 24, 2022
Merged

Conversation

kkredit
Copy link
Contributor

@kkredit kkredit commented Apr 13, 2022

🛠️ Description

No new features, just a couple minor improvements

  • Recommend setting Vault performance secondary tiers via reference to primary
  • Add 'computed: true' to Vault paths_filter
  • Replace strings.EqualFold with ToLower in diff supression functions, since EqualFold was causing unexpected behavior

🚢 Release Note

Release note for CHANGELOG:

NONE

🏗️ Acceptance tests

  • Are there any feature flags that are required to use this functionality?
  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@kkredit kkredit requested a review from a team as a code owner April 13, 2022 17:41
@kkredit kkredit requested a review from a team April 13, 2022 17:41
@@ -100,6 +100,7 @@ func resourceVaultCluster() *schema.Resource {
ValidateDiagFunc: validateVaultPathsFilter,
},
Optional: true,
Computed: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's drop this change for now!

@kkredit kkredit requested review from a team, himran92 and biazmoreira May 24, 2022 17:44
Copy link

@himran92 himran92 left a comment

Choose a reason for hiding this comment

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

lgtm, just a qs

@@ -581,6 +581,8 @@ func setVaultClusterResourceData(d *schema.ResourceData, cluster *vaultmodels.Ha
} else {
d.Set("paths_filter", nil)
}
} else {
d.Set("paths_filter", nil)

Choose a reason for hiding this comment

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

just for my knowledge: do we need a new test for this or by default as not set for non-replicated cluster ->paths_filter was nil already

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this requires a new test case, this was just to play it safe and set paths_filter in all circumstances

Copy link
Contributor

@bcmdarroch bcmdarroch left a comment

Choose a reason for hiding this comment

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

Acceptance tests passed:

--- PASS: TestAccVaultCluster (1038.35s)
PASS
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider	1038.691s

@bcmdarroch bcmdarroch force-pushed the vault-secondary-tier-by-reference branch from 8ad923e to f4c7a20 Compare May 24, 2022 18:04
@bcmdarroch bcmdarroch merged commit 233af3e into main May 24, 2022
@bcmdarroch bcmdarroch deleted the vault-secondary-tier-by-reference branch May 24, 2022 18:11
aidan-mundy pushed a commit that referenced this pull request Sep 8, 2023
* Vault: change tiers of secondaries to reference primaries

* Replace strings.EqualFold with ToLower in diff supression funcs

* Add 'computed: true' to Vault paths_filter

* Update docs with 'make gencheck'

* Vault: always set paths_filter and remove 'Computed'
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.

3 participants