File tree Expand file tree Collapse file tree 4 files changed +50
-1
lines changed
Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,29 @@ resource "spectrocloud_virtual_cluster" "cluster" {
4646
4747```
4848
49+ ## Import
50+
51+ In Terraform v1.5.0 and later, use an [ ` import ` block] ( https://developer.hashicorp.com/terraform/language/import )
52+ to import the resource spectrocloud_virtual_cluster by using its ` id ` with the Palette ` context ` separated by a colon. For example:
53+
54+ ``` terraform
55+ import {
56+ to = spectrocloud_virtual_cluster.example
57+ id = "example_id:context"
58+ }
59+ ```
60+
61+ Using ` terraform import ` , import the cluster using the ` cluster_name ` or ` id ` colon separated with ` context ` . For example:
62+
63+ ``` console
64+ terraform import spectrocloud_virtual_cluster.example example_id
65+ ```
66+
67+ ``` console
68+ terraform import spectrocloud_virtual_cluster.example cluster_name
69+ ```
70+
71+ Refer to the [ Import section] ( /docs#import ) to learn more.
4972
5073<!-- schema generated by tfplugindocs -->
5174## Schema
Original file line number Diff line number Diff line change @@ -529,9 +529,11 @@ func flattenMachinePoolConfigsAws(machinePools []*models.V1AwsMachinePoolConfig)
529529 oi ["max_price" ] = machinePool .SpotMarketOptions .MaxPrice
530530 }
531531 // Flatten skip_k8s_upgrade (worker pools only); default "disabled" for backward compat when API omits field
532+ skipK8sUpgrade := "disabled"
532533 if machinePool .SkipK8sUpgrade != nil && * machinePool .SkipK8sUpgrade != "" {
533- oi [ "skip_k8s_upgrade" ] = * machinePool .SkipK8sUpgrade
534+ skipK8sUpgrade = * machinePool .SkipK8sUpgrade
534535 }
536+ oi ["skip_k8s_upgrade" ] = skipK8sUpgrade
535537 oi ["disk_size_gb" ] = int (machinePool .RootDeviceSize )
536538 if machinePool .SubnetIds != nil {
537539 oi ["az_subnets" ] = machinePool .SubnetIds
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ func TestFlattenMachinePoolConfigsAws(t *testing.T) {
5858 "max" : 5 ,
5959 "instance_type" : "t2.micro" ,
6060 "disk_size_gb" : 8 ,
61+ "skip_k8s_upgrade" : "disabled" ,
6162 "az_subnets" : map [string ]string {"us-west-2d" : "subnet-87654321" },
6263 "update_strategy" : "RollingUpdateScaleOut" ,
6364 "additional_security_groups" : []string {"sg-1234567890" },
Original file line number Diff line number Diff line change @@ -46,5 +46,28 @@ resource "spectrocloud_virtual_cluster" "cluster" {
4646
4747` ` `
4848
49+ ## Import
50+
51+ In Terraform v1.5.0 and later, use an [` import` block ](https://developer.hashicorp.com /terraform/language/import)
52+ to import the resource {{ .Name }} by using its ` id` with the Palette ` context` separated by a colon. For example:
53+
54+ ` ` ` terraform
55+ import {
56+ to = {{ .Name }}.example
57+ id = "example_id:context"
58+ }
59+ ` ` `
60+
61+ Using ` terraform import` , import the cluster using the ` cluster_name` or ` id` colon separated with ` context` . For example:
62+
63+ ` ` ` console
64+ terraform import {{ .Name }}.example example_id
65+ ` ` `
66+
67+ ` ` ` console
68+ terraform import {{ .Name }}.example cluster_name
69+ ` ` `
70+
71+ Refer to the [Import section](/docs#import) to learn more.
4972
5073{{ .SchemaMarkdown | trimspace }}
You can’t perform that action at this time.
0 commit comments