From 1dab55c081fc1da4c10c9970a71486432142a225 Mon Sep 17 00:00:00 2001 From: dkeightley <20566450+dkeightley@users.noreply.github.com> Date: Wed, 20 Sep 2023 04:44:52 +1200 Subject: [PATCH] [Docs] Remove keypair_name for amazonec2_config (#942) --- docs/resources/machine_config_v2.md | 2 -- docs/resources/node_template.md | 1 - rancher2/schema_machine_config_v2_amazonec2.go | 5 ----- rancher2/schema_machine_config_v2_openstack.go | 4 ---- rancher2/schema_node_template_amazonec2.go | 6 ------ rancher2/schema_node_template_openstack.go | 4 ---- rancher2/structure_machine_config_v2_amazonec2.go | 9 --------- rancher2/structure_machine_config_v2_openstack.go | 4 ---- rancher2/structure_node_template_amazonec2.go | 8 -------- rancher2/structure_node_template_openstack.go | 4 ---- 10 files changed, 47 deletions(-) diff --git a/docs/resources/machine_config_v2.md b/docs/resources/machine_config_v2.md index e6d81e30..d9a874e1 100644 --- a/docs/resources/machine_config_v2.md +++ b/docs/resources/machine_config_v2.md @@ -131,7 +131,6 @@ The following attributes are exported: * `iam_instance_profile` - (Optional) AWS IAM Instance Profile (string) * `insecure_transport` - (Optional) Disable SSL when sending requests (bool) * `instance_type` - (Optional) AWS instance type. Default `t3a.medium` (string) -* `keypair_name` - (Optional) AWS keypair to use; requires --amazonec2-ssh-keypath (string) * `kms_key` - (Optional) Custom KMS key ID using the AWS Managed CMK (string) * `monitoring` - (Optional) Set this flag to enable CloudWatch monitoring. Deafult `false` (bool) * `open_port` - (Optional) Make the specified port number accessible from the Internet. (list) @@ -266,7 +265,6 @@ The following attributes are exported: * `image_name` - (Required+) OpenStack image name to use for the instance. Conflicts with `image_id` (string) * `insecure` - (Optional) Disable TLS credential checking. Default `false` (bool) * `ip_version` - (Optional) OpenStack version of IP address assigned for the machine Default `4` (string) -* `keypair_name` - (Optional) OpenStack keypair to use to SSH to the instance (string) * `net_id` - (Required+) OpenStack network id the machine will be connected on. Conflicts with `net_name` (string) * `net_name` - (Required+) OpenStack network name the machine will be connected on. Conflicts with `net_id` (string) * `nova_network` - (Optional) Use the nova networking services instead of neutron (string) diff --git a/docs/resources/node_template.md b/docs/resources/node_template.md index 36b47b3b..c2f8696e 100644 --- a/docs/resources/node_template.md +++ b/docs/resources/node_template.md @@ -385,7 +385,6 @@ The following attributes are exported: * `image_name` - (Required*) OpenStack image name to use for the instance. Conflicts with `image_id` (string) * `insecure` - (Optional) Disable TLS credential checking. Default `false` (bool) * `ip_version` - (Optional) OpenStack version of IP address assigned for the machine Default `4` (string) -* `keypair_name` - (Optional) OpenStack keypair to use to SSH to the instance (string) * `net_id` - (Required*) OpenStack network id the machine will be connected on. Conflicts with `net_name` (string) * `net_name` - (Required*) OpenStack network name the machine will be connected on. Conflicts with `net_id` (string) * `nova_network` - (Optional) Use the nova networking services instead of neutron (string) diff --git a/rancher2/schema_machine_config_v2_amazonec2.go b/rancher2/schema_machine_config_v2_amazonec2.go index 51d186a2..49b1f585 100644 --- a/rancher2/schema_machine_config_v2_amazonec2.go +++ b/rancher2/schema_machine_config_v2_amazonec2.go @@ -96,11 +96,6 @@ func machineConfigV2Amazonec2Fields() map[string]*schema.Schema { Default: "t3a.medium", Description: "AWS instance type", }, - "keypair_name": { - Type: schema.TypeString, - Optional: true, - Description: "AWS keypair to use; requires --amazonec2-ssh-keypath", - }, "kms_key": { Type: schema.TypeString, Optional: true, diff --git a/rancher2/schema_machine_config_v2_openstack.go b/rancher2/schema_machine_config_v2_openstack.go index f01be1ad..ad883133 100644 --- a/rancher2/schema_machine_config_v2_openstack.go +++ b/rancher2/schema_machine_config_v2_openstack.go @@ -80,10 +80,6 @@ func machineConfigV2OpenstackFields() map[string]*schema.Schema { Optional: true, Default: "4", }, - "keypair_name": { - Type: schema.TypeString, - Optional: true, - }, "net_id": { Type: schema.TypeString, Optional: true, diff --git a/rancher2/schema_node_template_amazonec2.go b/rancher2/schema_node_template_amazonec2.go index 253c7a66..521492db 100644 --- a/rancher2/schema_node_template_amazonec2.go +++ b/rancher2/schema_node_template_amazonec2.go @@ -22,7 +22,6 @@ type amazonec2Config struct { IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iamInstanceProfile,omitempty"` InsecureTransport bool `json:"insecureTransport,omitempty" yaml:"insecureTransport,omitempty"` InstanceType string `json:"instanceType,omitempty" yaml:"instanceType,omitempty"` - KeypairName string `json:"keypairName,omitempty" yaml:"keypairName,omitempty"` KmsKey string `json:"kmsKey,omitempty" yaml:"kmsKey,omitempty"` Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"` OpenPort []string `json:"openPort,omitempty" yaml:"openPort,omitempty"` @@ -141,11 +140,6 @@ func amazonec2ConfigFields() map[string]*schema.Schema { Default: "t2.micro", Description: "AWS instance type", }, - "keypair_name": { - Type: schema.TypeString, - Optional: true, - Description: "AWS keypair to use; requires --amazonec2-ssh-keypath", - }, "kms_key": { Type: schema.TypeString, Optional: true, diff --git a/rancher2/schema_node_template_openstack.go b/rancher2/schema_node_template_openstack.go index cf1b6a4d..f0af4788 100644 --- a/rancher2/schema_node_template_openstack.go +++ b/rancher2/schema_node_template_openstack.go @@ -127,10 +127,6 @@ func openstackConfigFields() map[string]*schema.Schema { Optional: true, Default: "4", }, - "keypair_name": { - Type: schema.TypeString, - Optional: true, - }, "net_id": { Type: schema.TypeString, Optional: true, diff --git a/rancher2/structure_machine_config_v2_amazonec2.go b/rancher2/structure_machine_config_v2_amazonec2.go index 8a3a8195..cc980d61 100644 --- a/rancher2/structure_machine_config_v2_amazonec2.go +++ b/rancher2/structure_machine_config_v2_amazonec2.go @@ -28,7 +28,6 @@ type machineConfigV2Amazonec2 struct { IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iamInstanceProfile,omitempty"` InsecureTransport bool `json:"insecureTransport,omitempty" yaml:"insecureTransport,omitempty"` InstanceType string `json:"instanceType,omitempty" yaml:"instanceType,omitempty"` - KeypairName string `json:"keypairName,omitempty" yaml:"keypairName,omitempty"` KmsKey string `json:"kmsKey,omitempty" yaml:"kmsKey,omitempty"` Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"` OpenPort []string `json:"openPort,omitempty" yaml:"openPort,omitempty"` @@ -102,10 +101,6 @@ func flattenMachineConfigV2Amazonec2(in *MachineConfigV2Amazonec2) []interface{} obj["instance_type"] = in.InstanceType } - if len(in.KeypairName) > 0 { - obj["keypair_name"] = in.KeypairName - } - if len(in.KmsKey) > 0 { obj["kms_key"] = in.KmsKey } @@ -241,10 +236,6 @@ func expandMachineConfigV2Amazonec2(p []interface{}, source *MachineConfigV2) *M obj.InstanceType = v } - if v, ok := in["keypair_name"].(string); ok && len(v) > 0 { - obj.KeypairName = v - } - if v, ok := in["kms_key"].(string); ok && len(v) > 0 { obj.KmsKey = v } diff --git a/rancher2/structure_machine_config_v2_openstack.go b/rancher2/structure_machine_config_v2_openstack.go index e528d7a4..602fd22a 100644 --- a/rancher2/structure_machine_config_v2_openstack.go +++ b/rancher2/structure_machine_config_v2_openstack.go @@ -90,7 +90,6 @@ func flattenMachineConfigV2Openstack(in *MachineConfigV2Openstack) []interface{} obj["image_name"] = in.ImageName obj["insecure"] = in.Insecure obj["ip_version"] = in.IPVersion - obj["keypair_name"] = in.KeypairName obj["net_id"] = in.NetID obj["net_name"] = in.NetName obj["nova_network"] = in.NovaNetwork @@ -187,9 +186,6 @@ func expandMachineConfigV2Openstack(p []interface{}, source *MachineConfigV2) *M if v, ok := in["ip_version"].(string); ok && len(v) > 0 { obj.IPVersion = v } - if v, ok := in["keypair_name"].(string); ok && len(v) > 0 { - obj.KeypairName = v - } if v, ok := in["net_id"].(string); ok && len(v) > 0 { obj.NetID = v } diff --git a/rancher2/structure_node_template_amazonec2.go b/rancher2/structure_node_template_amazonec2.go index 47b5cc85..e9a2f549 100644 --- a/rancher2/structure_node_template_amazonec2.go +++ b/rancher2/structure_node_template_amazonec2.go @@ -48,10 +48,6 @@ func flattenAmazonec2Config(in *amazonec2Config) []interface{} { obj["instance_type"] = in.InstanceType } - if len(in.KeypairName) > 0 { - obj["keypair_name"] = in.KeypairName - } - if len(in.KmsKey) > 0 { obj["kms_key"] = in.KmsKey } @@ -188,10 +184,6 @@ func expandAmazonec2Config(p []interface{}) *amazonec2Config { obj.InstanceType = v } - if v, ok := in["keypair_name"].(string); ok && len(v) > 0 { - obj.KeypairName = v - } - if v, ok := in["kms_key"].(string); ok && len(v) > 0 { obj.KmsKey = v } diff --git a/rancher2/structure_node_template_openstack.go b/rancher2/structure_node_template_openstack.go index 8313bc8e..14858ddc 100644 --- a/rancher2/structure_node_template_openstack.go +++ b/rancher2/structure_node_template_openstack.go @@ -23,7 +23,6 @@ func flattenOpenstackConfig(in *openstackConfig) []interface{} { obj["image_name"] = in.ImageName obj["insecure"] = in.Insecure obj["ip_version"] = in.IPVersion - obj["keypair_name"] = in.KeypairName obj["net_id"] = in.NetID obj["net_name"] = in.NetName obj["nova_network"] = in.NovaNetwork @@ -107,9 +106,6 @@ func expandOpenstackConfig(p []interface{}) *openstackConfig { if v, ok := in["ip_version"].(string); ok && len(v) > 0 { obj.IPVersion = v } - if v, ok := in["keypair_name"].(string); ok && len(v) > 0 { - obj.KeypairName = v - } if v, ok := in["net_id"].(string); ok && len(v) > 0 { obj.NetID = v }