KMS
: add google_kms_crypto_key_latest_version
data source
#8032
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.
Continuation of GoogleCloudPlatform/magic-modules#11455
Second step where we focus on grabbing the latest crypto key version (singular data source)
This PR depends on the referenced PR, plural data source must be merged before this can be properly reviewed.
The only major difference is once the list of cryptoKeyVersions is set we grab the latest one which is done in this line here:
https://github.com/GoogleCloudPlatform/magic-modules/pull/11456/files#diff-7c2dc734dd72075cca3912ca10f4c3a3736ea934186f1392fc7e0764a37eac53R99-R103
filter is added in since it gives the user the ability to grab the latest in either the enabled state or disabled state.
PR also includes some clean up of the plural
cryptoKeyVersions
data source such as adding in the missing filter argument in the docs.Test passing:
Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#11456