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

No example for order or search criteria for rhcs_versions data source #852

Open
matihost opened this issue Nov 20, 2024 · 0 comments
Open

Comments

@matihost
Copy link

As of terraform-redhat/rhcs v1.6.6 there is no example for rhcs_versions data source.

Per digging in the source code:
https://github.com/openshift-online/ocm-sdk-go/blob/main/clustersmgmt/v1/versions_client.go#L103-L145

I was able to create:

data "rhcs_versions" "all" {
    order = "id desc"
}

but the result was that is does not sort numerically:

data "rhcs_versions" "all" {
    items = [
        {
            id   = "openshift-v4.9.59"
            name = "4.9.59"
        },
        {
            id   = "openshift-v4.9.19"
            name = "4.9.19"
        },
        {
            id   = "openshift-v4.8.57"
            name = "4.8.57"
        },
        {
            id   = "openshift-v4.17.4"
            name = "4.17.4"
        },
        {
            id   = "openshift-v4.17.3"
            name = "4.17.3"
        },
        ....
        {
            id   = "openshift-v4.10.12"
            name = "4.10.12"
        },
        {
            id   = "openshift-v4.10.11"
            name = "4.10.11"
        },
        {
            id   = "openshift-v4.10.10"
            name = "4.10.10"
        },
    ]
    order = "id desc"
}

So this object is pointless to get for example a latest version possible version.
It would also nice if the object contains some attributes like: latest, latest_minor (to put into rhcs_cluster_rosa_hcp.upgrade_acknowledgements_for field)

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

No branches or pull requests

1 participant