-
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
azurerm_cosmosdb_account
- support new property backup.tier
#24595
Merged
katbyte
merged 11 commits into
hashicorp:main
from
neil-yechenwei:cosmosdbacctcontinuoustier
Feb 20, 2024
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4925e9a
azurerm_cosmosdb_account - support new property tier
neil-yechenwei 8bc1118
update code
neil-yechenwei dc8b0a8
update code
neil-yechenwei 7391332
Merge remote-tracking branch 'upstream/main' into cosmosdbacctcontinu…
neil-yechenwei 8b9641b
Merge remote-tracking branch 'upstream/main' into cosmosdbacctcontinu…
neil-yechenwei 94772f5
Merge remote-tracking branch 'upstream/main' into cosmosdbacctcontinu…
neil-yechenwei 415e02f
update code
neil-yechenwei 8eb6b72
update code
neil-yechenwei 2c5041d
update code
neil-yechenwei 9dd4808
update code
neil-yechenwei e5a6062
update code
neil-yechenwei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
how come this is required?
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.
There are two reasons.
Reason 1: Though
tier
has the default valueContinuous30Days
buttier
is only for the backup typeContinuous
. So the default value isn't added in the property schema.Reason 2: API would return the default value
Continuous30Days
when backup.type isContinuous
andtier
isn't set. At this time, it would cause diff. So here ignore_changes fortier
is added.Note: I updated PR to add the note for it.
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.
I feel like this is a bug, is there no way to correctly handle this so lifecycle ignore changes is not requireD? is this an API bug with the API not returning the correct values?
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.
Service team confirmed that it's by API design. Actually, This new property is called ContinuousTier in azure-rest-api-spec, which means it only supports the backup type "Continuous" and it doesn't support the backup type "Periodic". So I assume that it's not an API bug.
I listed all behaviors for this new property:
Scenario 1: API doesn't return default value for this new property "ContinuousTier" when backup type is "Periodic" and "ContinuousTier" isn't set.
Scenario 2: API doesn't return any value for this new property "ContinuousTier" when backup type is "Periodic" and "ContinuousTier" is set.
Scenario 3: API returns default value "Continuous30Days" for this new property "ContinuousTier" when backup type is "Continuous" and "ContinuousTier" isn't set.
Scenario 4: API returns value "Continuous7Days" for this new property "ContinuousTier" when backup type is "Continuous" and ContinuousTier is set to "Continuous7Days".
Scenario 5: API returns value "Continuous30Days" for this new property "ContinuousTier" when backup type is "Continuous" and ContinuousTier is set to "Continuous30Days".