-
Notifications
You must be signed in to change notification settings - Fork 235
fix: add support for imported cluster config #1528
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
base: master
Are you sure you want to change the base?
Conversation
ef65932
to
94f84d7
Compare
Please sign your commits with a verified key. |
What version of the provider is this targeting? |
Config is not a valid word for the commit messages, please use "configuration". |
or just "fix: add support for imported cluster" should be fine |
@matttrach Thanks for the review, pushed an updated commit message with verified key. The field was first introduced with Rancher v2.11, so it's not scoped to v2.12+ only and I'd like to backport it to v7 release line if possible. |
@kinarashah your commit wasn't signed with a verified key yet: |
This needs one more approval before merge, maybe @HarrisonWAffel ? |
main issue: #1523 |
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.
Core changes look good, but I think we need to update the docs with this new field
aff2c73
to
7edc821
Compare
Issue:
#1523
Problem
Terraform currently does not support setting the
ImportedConfig
field explicitly. The assumption has been that Rancher creates an imported cluster automatically when no configuration is provided.However, this assumption no longer holds as a new required field for supporting private registries was introduced for imported clusters. As a result, explicit support for
ImportedConfig
is now necessary.Solution
Introduced support for
imported_config
inrancher2_cluster
. As far as I know, imported clusters are not supported withrancher2_cluster2
since these are handled via thev3/clusters
endpoint.The resulting state differs slightly when
imported_config
is used so added the new state to the expected state list. However, this is consistent with the behavior observed when creating imported clusters directly through the Rancher API. The difference is not significant as the registration URL is correctly generated in both cases and the cluster becomes active after a successful import.Engineering Testing
Manual testing, created cluster using both old and new format: