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

Default api_version should match provider version #389

Open
adamfowleruk opened this issue Jun 2, 2022 · 1 comment
Open

Default api_version should match provider version #389

adamfowleruk opened this issue Jun 2, 2022 · 1 comment
Labels

Comments

@adamfowleruk
Copy link

Describe the bug

The default value for api_version is hardcoded to quite an old version. This means every use of a current release will fail on certain calls (E.g. resource systemconfiguration). The error is here:-

Version: "18.2.8",

The error message is not clear, stating that a value is provided (even if it isn't, it just has a default value of false, like common_criteria_enabled) that is not supported when it is, because it's documented and implemented in the provider.

Also this error is not picked up in the plan step but only in the apply step.

Reproduction steps

1. Run any non-trivial call against a recent version of Avi Controller
2.
3.
...

Expected behavior

The default version of the API should, by default, match the release version of the provider.

Also this version mismatch should be better documented in all examples. (Anywhere avi_provider is configured)

Please also validate the configuration applicability to api_version in the plan step, not the apply step.

Also please introduce a test between versions to ensure that as api_version is increased, and new elements introduced, that the resources are not deleted and recreated.

Additional context

No response

@jakauppila
Copy link

As an alternative to this, if not defined, could the provider hit the following endpoint at instantiation to determine the version of the target AVI Controller and set the value dynamically?

https://AVICONTROLLER/api/cluster/version

{
    "Date": "2024-05-06 16:48:25 UTC",
    "Product": "controller",
    "Version": "30.2.1",
    "Tag": "30.2.1-9105-20240506.164825",
    "ProductName": "Avi Cloud Controller",
    "min_version": "20.1.1",
    "build": 9105
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants