-
Notifications
You must be signed in to change notification settings - Fork 223
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
Add fleet_workspace parameter #702
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -712,6 +712,13 @@ func clusterFields() map[string]*schema.Schema { | |
Description: "Windows preferred cluster", | ||
ForceNew: true, | ||
}, | ||
"fleet_workspace": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Default: "fleet-default", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Due to |
||
Description: "Fleet Workspace for Cluster", | ||
ForceNew: false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default |
||
}, | ||
} | ||
|
||
for k, v := range commonAnnotationLabelFields() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -247,6 +247,10 @@ func flattenCluster(d *schema.ResourceData, in *Cluster, clusterRegToken *manage | |
} | ||
|
||
d.Set("windows_prefered_cluster", in.WindowsPreferedCluster) | ||
err = d.Set("fleet_workspace", in.FleetWorkspaceName) | ||
if err != nil { | ||
return err | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For setting string arguments, not required to check for error.
|
||
|
||
return nil | ||
} | ||
|
@@ -544,5 +548,9 @@ func expandCluster(in *schema.ResourceData) (*Cluster, error) { | |
obj.WindowsPreferedCluster = v | ||
} | ||
|
||
if v, ok := in.Get("fleet_workspace").(string); ok { | ||
obj.FleetWorkspaceName = v | ||
} | ||
|
||
return obj, nil | ||
} |
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.
This field is just available on rancher v2.5.x or above. It should be commented at docs.