Skip to content

Commit b372593

Browse files
author
felipe-colussi
committed
Merge remote-tracking branch 'upstream/master' into migrate-sdk2-resolve
# Conflicts: # rancher2/resource_rancher2_cluster.go
2 parents fb4a781 + e2e1f9e commit b372593

11 files changed

+1
-49
lines changed

docs/resources/machine_config_v2.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ The following attributes are exported:
131131
* `iam_instance_profile` - (Optional) AWS IAM Instance Profile (string)
132132
* `insecure_transport` - (Optional) Disable SSL when sending requests (bool)
133133
* `instance_type` - (Optional) AWS instance type. Default `t3a.medium` (string)
134-
* `keypair_name` - (Optional) AWS keypair to use; requires --amazonec2-ssh-keypath (string)
135134
* `kms_key` - (Optional) Custom KMS key ID using the AWS Managed CMK (string)
136135
* `monitoring` - (Optional) Set this flag to enable CloudWatch monitoring. Deafult `false` (bool)
137136
* `open_port` - (Optional) Make the specified port number accessible from the Internet. (list)
@@ -266,7 +265,6 @@ The following attributes are exported:
266265
* `image_name` - (Required+) OpenStack image name to use for the instance. Conflicts with `image_id` (string)
267266
* `insecure` - (Optional) Disable TLS credential checking. Default `false` (bool)
268267
* `ip_version` - (Optional) OpenStack version of IP address assigned for the machine Default `4` (string)
269-
* `keypair_name` - (Optional) OpenStack keypair to use to SSH to the instance (string)
270268
* `net_id` - (Required+) OpenStack network id the machine will be connected on. Conflicts with `net_name` (string)
271269
* `net_name` - (Required+) OpenStack network name the machine will be connected on. Conflicts with `net_id` (string)
272270
* `nova_network` - (Optional) Use the nova networking services instead of neutron (string)

docs/resources/node_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ The following attributes are exported:
385385
* `image_name` - (Required*) OpenStack image name to use for the instance. Conflicts with `image_id` (string)
386386
* `insecure` - (Optional) Disable TLS credential checking. Default `false` (bool)
387387
* `ip_version` - (Optional) OpenStack version of IP address assigned for the machine Default `4` (string)
388-
* `keypair_name` - (Optional) OpenStack keypair to use to SSH to the instance (string)
389388
* `net_id` - (Required*) OpenStack network id the machine will be connected on. Conflicts with `net_name` (string)
390389
* `net_name` - (Required*) OpenStack network name the machine will be connected on. Conflicts with `net_id` (string)
391390
* `nova_network` - (Optional) Use the nova networking services instead of neutron (string)

rancher2/resource_rancher2_cluster.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ func resourceRancher2ClusterCreate(ctx context.Context, d *schema.ResourceData,
151151
newCluster := &Cluster{}
152152
if cluster.EKSConfig != nil && !cluster.EKSConfig.Imported {
153153
if !checkClusterEKSConfigV2NodeGroupsDesiredSize(cluster) {
154-
return diag.Errorf("[ERROR] can't create %s EKS cluster with node group desired_size = 0. desired_size must be >=1. After initial provisioning, desired_size may be scaled down to 0 at any time", cluster.Name)
155-
}
154+
return diag.Errorf("[ERROR] can't create %s EKS cluster with node group desired_size = 0. desired_size must be >=1. After initial provisioning, desired_size may be scaled down to 0 at any time", cluster.Name) }
156155
clusterStr, _ := interfaceToJSON(cluster)
157156
clusterMap, _ := jsonToMapInterface(clusterStr)
158157
clusterMap["eksConfig"] = fixClusterEKSConfigV2(d.Get("eks_config_v2").([]interface{}), structToMap(cluster.EKSConfig))

rancher2/schema_machine_config_v2_amazonec2.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ func machineConfigV2Amazonec2Fields() map[string]*schema.Schema {
9696
Default: "t3a.medium",
9797
Description: "AWS instance type",
9898
},
99-
"keypair_name": {
100-
Type: schema.TypeString,
101-
Optional: true,
102-
Description: "AWS keypair to use; requires --amazonec2-ssh-keypath",
103-
},
10499
"kms_key": {
105100
Type: schema.TypeString,
106101
Optional: true,

rancher2/schema_machine_config_v2_openstack.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ func machineConfigV2OpenstackFields() map[string]*schema.Schema {
8080
Optional: true,
8181
Default: "4",
8282
},
83-
"keypair_name": {
84-
Type: schema.TypeString,
85-
Optional: true,
86-
},
8783
"net_id": {
8884
Type: schema.TypeString,
8985
Optional: true,

rancher2/schema_node_template_amazonec2.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ type amazonec2Config struct {
2222
IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iamInstanceProfile,omitempty"`
2323
InsecureTransport bool `json:"insecureTransport,omitempty" yaml:"insecureTransport,omitempty"`
2424
InstanceType string `json:"instanceType,omitempty" yaml:"instanceType,omitempty"`
25-
KeypairName string `json:"keypairName,omitempty" yaml:"keypairName,omitempty"`
2625
KmsKey string `json:"kmsKey,omitempty" yaml:"kmsKey,omitempty"`
2726
Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"`
2827
OpenPort []string `json:"openPort,omitempty" yaml:"openPort,omitempty"`
@@ -141,11 +140,6 @@ func amazonec2ConfigFields() map[string]*schema.Schema {
141140
Default: "t2.micro",
142141
Description: "AWS instance type",
143142
},
144-
"keypair_name": {
145-
Type: schema.TypeString,
146-
Optional: true,
147-
Description: "AWS keypair to use; requires --amazonec2-ssh-keypath",
148-
},
149143
"kms_key": {
150144
Type: schema.TypeString,
151145
Optional: true,

rancher2/schema_node_template_openstack.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ func openstackConfigFields() map[string]*schema.Schema {
127127
Optional: true,
128128
Default: "4",
129129
},
130-
"keypair_name": {
131-
Type: schema.TypeString,
132-
Optional: true,
133-
},
134130
"net_id": {
135131
Type: schema.TypeString,
136132
Optional: true,

rancher2/structure_machine_config_v2_amazonec2.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ type machineConfigV2Amazonec2 struct {
2828
IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iamInstanceProfile,omitempty"`
2929
InsecureTransport bool `json:"insecureTransport,omitempty" yaml:"insecureTransport,omitempty"`
3030
InstanceType string `json:"instanceType,omitempty" yaml:"instanceType,omitempty"`
31-
KeypairName string `json:"keypairName,omitempty" yaml:"keypairName,omitempty"`
3231
KmsKey string `json:"kmsKey,omitempty" yaml:"kmsKey,omitempty"`
3332
Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"`
3433
OpenPort []string `json:"openPort,omitempty" yaml:"openPort,omitempty"`
@@ -102,10 +101,6 @@ func flattenMachineConfigV2Amazonec2(in *MachineConfigV2Amazonec2) []interface{}
102101
obj["instance_type"] = in.InstanceType
103102
}
104103

105-
if len(in.KeypairName) > 0 {
106-
obj["keypair_name"] = in.KeypairName
107-
}
108-
109104
if len(in.KmsKey) > 0 {
110105
obj["kms_key"] = in.KmsKey
111106
}
@@ -241,10 +236,6 @@ func expandMachineConfigV2Amazonec2(p []interface{}, source *MachineConfigV2) *M
241236
obj.InstanceType = v
242237
}
243238

244-
if v, ok := in["keypair_name"].(string); ok && len(v) > 0 {
245-
obj.KeypairName = v
246-
}
247-
248239
if v, ok := in["kms_key"].(string); ok && len(v) > 0 {
249240
obj.KmsKey = v
250241
}

rancher2/structure_machine_config_v2_openstack.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ func flattenMachineConfigV2Openstack(in *MachineConfigV2Openstack) []interface{}
9090
obj["image_name"] = in.ImageName
9191
obj["insecure"] = in.Insecure
9292
obj["ip_version"] = in.IPVersion
93-
obj["keypair_name"] = in.KeypairName
9493
obj["net_id"] = in.NetID
9594
obj["net_name"] = in.NetName
9695
obj["nova_network"] = in.NovaNetwork
@@ -187,9 +186,6 @@ func expandMachineConfigV2Openstack(p []interface{}, source *MachineConfigV2) *M
187186
if v, ok := in["ip_version"].(string); ok && len(v) > 0 {
188187
obj.IPVersion = v
189188
}
190-
if v, ok := in["keypair_name"].(string); ok && len(v) > 0 {
191-
obj.KeypairName = v
192-
}
193189
if v, ok := in["net_id"].(string); ok && len(v) > 0 {
194190
obj.NetID = v
195191
}

rancher2/structure_node_template_amazonec2.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ func flattenAmazonec2Config(in *amazonec2Config) []interface{} {
4848
obj["instance_type"] = in.InstanceType
4949
}
5050

51-
if len(in.KeypairName) > 0 {
52-
obj["keypair_name"] = in.KeypairName
53-
}
54-
5551
if len(in.KmsKey) > 0 {
5652
obj["kms_key"] = in.KmsKey
5753
}
@@ -188,10 +184,6 @@ func expandAmazonec2Config(p []interface{}) *amazonec2Config {
188184
obj.InstanceType = v
189185
}
190186

191-
if v, ok := in["keypair_name"].(string); ok && len(v) > 0 {
192-
obj.KeypairName = v
193-
}
194-
195187
if v, ok := in["kms_key"].(string); ok && len(v) > 0 {
196188
obj.KmsKey = v
197189
}

0 commit comments

Comments
 (0)