in alicloud/resource_alicloud_cs_kubernetes.go [44:833]
func resourceAlicloudCSKubernetes() *schema.Resource {
return &schema.Resource{
Create: resourceAlicloudCSKubernetesCreate,
Read: resourceAlicloudCSKubernetesRead,
Update: resourceAlicloudCSKubernetesUpdate,
Delete: resourceAlicloudCSKubernetesDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(90 * time.Minute),
Update: schema.DefaultTimeout(60 * time.Minute),
Delete: schema.DefaultTimeout(60 * time.Minute),
},
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: StringLenBetween(1, 63),
ConflictsWith: []string{"name_prefix"},
},
"name_prefix": {
Type: schema.TypeString,
Optional: true,
Default: "Terraform-Creation",
ValidateFunc: StringLenBetween(0, 37),
ConflictsWith: []string{"name"},
Deprecated: "Field 'name_prefix' has been deprecated from provider version 1.75.0.",
},
// master configurations
"master_vswitch_ids": {
Type: schema.TypeList,
Required: true,
ForceNew: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: StringMatch(regexp.MustCompile(`^vsw-[a-z0-9]*$`), "should start with 'vsw-'."),
},
MinItems: 3,
MaxItems: 5,
},
"master_instance_types": {
Type: schema.TypeList,
Required: true,
ForceNew: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
MinItems: 3,
MaxItems: 5,
},
"master_disk_size": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Default: 40,
ValidateFunc: IntBetween(40, 500),
},
"master_disk_category": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: DiskCloudEfficiency,
},
"master_disk_performance_level": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: StringInSlice([]string{"PL0", "PL1", "PL2", "PL3"}, false),
DiffSuppressFunc: masterDiskPerformanceLevelDiffSuppressFunc,
},
"master_disk_snapshot_policy_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"master_instance_charge_type": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: StringInSlice([]string{string(common.PrePaid), string(common.PostPaid)}, false),
Default: PostPaid,
},
"master_period_unit": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: Month,
ValidateFunc: StringInSlice([]string{"Week", "Month"}, false),
DiffSuppressFunc: csKubernetesMasterPostPaidDiffSuppressFunc,
},
"master_period": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Default: 1,
// must be a valid period, expected [1-9], 12, 24, 36, 48 or 60,
ValidateFunc: validation.Any(
IntBetween(1, 9),
IntInSlice([]int{12, 24, 36, 48, 60})),
DiffSuppressFunc: csKubernetesMasterPostPaidDiffSuppressFunc,
},
"master_auto_renew": {
Type: schema.TypeBool,
Default: false,
ForceNew: true,
Optional: true,
DiffSuppressFunc: csKubernetesMasterPostPaidDiffSuppressFunc,
},
"master_auto_renew_period": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Default: 1,
ValidateFunc: IntInSlice([]int{1, 2, 3, 6, 12}),
DiffSuppressFunc: csKubernetesMasterPostPaidDiffSuppressFunc,
},
// worker configurations
"worker_vswitch_ids": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: StringMatch(regexp.MustCompile(`^vsw-[a-z0-9]*$`), "should start with 'vsw-'."),
},
Removed: "Field 'worker_vswitch_ids' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'vswitch_ids' to replace it",
MinItems: 1,
},
"worker_instance_types": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
MinItems: 1,
MaxItems: 10,
Removed: "Field 'worker_instance_types' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'instance_types' to replace it",
},
"worker_number": {
Type: schema.TypeInt,
Optional: true,
Removed: "Field 'worker_number' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'desired_size' to replace it",
},
"worker_disk_size": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ValidateFunc: IntBetween(20, 32768),
Removed: "Field 'worker_disk_size' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'system_disk_size' to replace it",
},
"worker_disk_category": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'worker_disk_category' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'system_disk_category' to replace it",
},
"worker_disk_performance_level": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"PL0", "PL1", "PL2", "PL3"}, false),
DiffSuppressFunc: workerDiskPerformanceLevelDiffSuppressFunc,
Removed: "Field 'worker_disk_performance_level' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'system_disk_performance_level' to replace it",
},
"worker_disk_snapshot_policy_id": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'worker_disk_snapshot_policy_id' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'system_disk_snapshot_policy_id' to replace it",
},
"worker_data_disk_size": {
Type: schema.TypeInt,
Optional: true,
ValidateFunc: IntBetween(20, 32768),
DiffSuppressFunc: workerDataDiskSizeSuppressFunc,
Removed: "Field 'worker_data_disk_size' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'data_disks.size' to replace it",
},
"worker_data_disk_category": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'worker_data_disk_category' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'data_disks.category' to replace it",
},
"worker_data_disks": {
Optional: true,
Type: schema.TypeList,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"size": {
Type: schema.TypeString,
Optional: true,
},
"category": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"all", "cloud", "ephemeral_ssd", "cloud_essd", "cloud_efficiency", "cloud_ssd", "local_disk"}, false),
},
"snapshot_id": {
Type: schema.TypeString,
Optional: true,
},
"name": {
Type: schema.TypeString,
Optional: true,
},
"device": {
Type: schema.TypeString,
Optional: true,
},
"kms_key_id": {
Type: schema.TypeString,
Optional: true,
},
"encrypted": {
Type: schema.TypeString,
Optional: true,
},
"auto_snapshot_policy_id": {
Type: schema.TypeString,
Optional: true,
},
"performance_level": {
Type: schema.TypeString,
Optional: true,
},
},
},
Removed: "Field 'worker_data_disks' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'data_disks' to replace it",
},
"worker_instance_charge_type": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Removed: "Field 'worker_instance_charge_type' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'instance_charge_type' to replace it",
},
"worker_period_unit": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: StringInSlice([]string{"Week", "Month"}, false),
DiffSuppressFunc: csKubernetesWorkerPostPaidDiffSuppressFunc,
Removed: "Field 'worker_period_unit' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'period_unit' to replace it",
},
"worker_period": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ValidateFunc: validation.Any(
IntBetween(1, 9),
IntInSlice([]int{12, 24, 36, 48, 60})),
DiffSuppressFunc: csKubernetesWorkerPostPaidDiffSuppressFunc,
Removed: "Field 'worker_period' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'period' to replace it",
},
"worker_auto_renew": {
Type: schema.TypeBool,
Optional: true,
DiffSuppressFunc: csKubernetesWorkerPostPaidDiffSuppressFunc,
Removed: "Field 'worker_auto_renew' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'auto_renew' to replace it",
},
"worker_auto_renew_period": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ValidateFunc: IntInSlice([]int{1, 2, 3, 6, 12}),
DiffSuppressFunc: csKubernetesWorkerPostPaidDiffSuppressFunc,
Removed: "Field 'worker_auto_renew_period' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'auto_renew_period' to replace it",
},
"exclude_autoscaler_nodes": {
Type: schema.TypeBool,
Optional: true,
Removed: "Field 'exclude_autoscaler_nodes' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes.",
},
// global configurations
// Terway network
"pod_vswitch_ids": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: StringMatch(regexp.MustCompile(`^vsw-[a-z0-9]*$`), "should start with 'vsw-'."),
},
},
// Flannel network
"pod_cidr": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"service_cidr": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"node_cidr_mask": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Default: KubernetesClusterNodeCIDRMasksByDefault,
ValidateFunc: IntBetween(24, 28),
},
"new_nat_gateway": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"password": {
Type: schema.TypeString,
Optional: true,
Sensitive: true,
ConflictsWith: []string{"key_name", "kms_encrypted_password"},
},
"key_name": {
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{"password", "kms_encrypted_password"},
ForceNew: true,
},
"kms_encrypted_password": {
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{"password", "key_name"},
},
"kms_encryption_context": {
Type: schema.TypeMap,
Optional: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
return d.Get("kms_encrypted_password").(string) == ""
},
Elem: schema.TypeString,
},
"user_ca": {
Type: schema.TypeString,
Optional: true,
},
"enable_ssh": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"load_balancer_spec": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"slb.s1.small", "slb.s2.small", "slb.s2.medium", "slb.s3.small", "slb.s3.medium", "slb.s3.large"}, false),
Computed: true,
Deprecated: "Field 'load_balancer_spec' has been deprecated from provider version 1.232.0. The spec will not take effect because the charge of the load balancer has been changed to PayByCLCU",
},
"image_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"install_cloud_monitor": {
Type: schema.TypeBool,
Optional: true,
Default: true,
ForceNew: true,
},
"version": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
// cpu policy options of kubelet
"cpu_policy": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"none", "static"}, false),
Removed: "Field 'cpu_policy' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'cpu_policy' to replace it",
},
"proxy_mode": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: StringInSlice([]string{"iptables", "ipvs"}, false),
},
"addons": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Optional: true,
},
"config": {
Type: schema.TypeString,
Optional: true,
},
"version": {
Type: schema.TypeString,
Optional: true,
},
"disabled": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
},
},
},
"tags": {
Type: schema.TypeMap,
Optional: true,
},
"slb_internet_enabled": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"deletion_protection": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"timezone": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"os_type": {
Type: schema.TypeString,
Optional: true,
Default: "Linux",
ForceNew: true,
ValidateFunc: StringInSlice([]string{"Windows", "Linux"}, false),
},
"platform": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"node_port_range": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Removed: "Field 'node_port_range' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes.",
},
"runtime": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Optional: true,
Default: "docker",
},
"version": {
Type: schema.TypeString,
Optional: true,
Default: "19.03.5",
},
},
},
},
"cluster_domain": {
Type: schema.TypeString,
Optional: true,
Default: "cluster.local",
ForceNew: true,
Description: "cluster local domain",
},
"taints": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"key": {
Type: schema.TypeString,
Optional: true,
},
"value": {
Type: schema.TypeString,
Optional: true,
},
"effect": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"NoSchedule", "NoExecute", "PreferNoSchedule"}, false),
},
},
},
Removed: "Field 'taints' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'taints' to replace it",
},
"rds_instances": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"custom_san": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
// computed parameters
"kube_config": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'kube_config' has been removed from provider version 1.212.0. Please use the attribute 'output_file' of new DataSource 'alicloud_cs_cluster_credential' to replace it",
},
"client_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_cert' has been deprecated from provider version 1.248.0. From version 1.248.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-cert.pem) for replace it.",
},
"client_key": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_key' has been deprecated from provider version 1.248.0. From version 1.248.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_key' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-key.pem) for replace it.",
},
"cluster_ca_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'cluster_ca_cert' has been deprecated from provider version 1.248.0. From version 1.248.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.cluster_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it.",
},
"certificate_authority": {
Type: schema.TypeMap,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"cluster_cert": {
Type: schema.TypeString,
Computed: true,
},
"client_cert": {
Type: schema.TypeString,
Computed: true,
},
"client_key": {
Type: schema.TypeString,
Computed: true,
},
},
},
Deprecated: "Field 'certificate_authority' has been deprecated from provider version 1.248.0. Please use the attribute 'certificate_authority' of new DataSource 'alicloud_cs_cluster_credential' to replace it.",
},
"skip_set_certificate_authority": {
Type: schema.TypeBool,
Optional: true,
},
"connections": {
Type: schema.TypeMap,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"api_server_internet": {
Type: schema.TypeString,
Computed: true,
},
"api_server_intranet": {
Type: schema.TypeString,
Computed: true,
},
"master_public_ip": {
Type: schema.TypeString,
Computed: true,
},
"service_domain": {
Type: schema.TypeString,
Computed: true,
},
},
},
},
"slb_id": {
Type: schema.TypeString,
Computed: true,
},
"slb_internet": {
Type: schema.TypeString,
Computed: true,
},
"slb_intranet": {
Type: schema.TypeString,
Computed: true,
},
"security_group_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"is_enterprise_security_group": {
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Computed: true,
ConflictsWith: []string{"security_group_id"},
},
"nat_gateway_id": {
Type: schema.TypeString,
Computed: true,
},
"vpc_id": {
Type: schema.TypeString,
Computed: true,
},
"master_nodes": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Computed: true,
},
"name": {
Type: schema.TypeString,
Computed: true,
},
"private_ip": {
Type: schema.TypeString,
Computed: true,
},
},
},
},
"worker_nodes": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Computed: true,
},
"name": {
Type: schema.TypeString,
Computed: true,
},
"private_ip": {
Type: schema.TypeString,
Computed: true,
},
},
},
Removed: "Field 'worker_nodes' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes.",
},
// remove parameters below
// mix vswitch_ids between master and worker is not a good guidance to create cluster
"worker_instance_type": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'worker_instance_type' has been removed from provider version 1.75.0. New field 'worker_instance_types' replaces it.",
},
"vswitch_ids": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: StringMatch(regexp.MustCompile(`^vsw-[a-z0-9]*$`), "should start with 'vsw-'."),
},
MinItems: 3,
MaxItems: 5,
Removed: "Field 'vswitch_ids' has been removed from provider version 1.75.0. New field 'master_vswitch_ids' and 'worker_vswitch_ids' replace it.",
},
// single instance type would cause extra troubles
"master_instance_type": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'master_instance_type' has been removed from provider version 1.75.0. New field 'master_instance_types' replaces it.",
},
// force update is a high risk operation
"force_update": {
Type: schema.TypeBool,
Optional: true,
Removed: "Field 'force_update' has been removed from provider version 1.75.0.",
},
"availability_zone": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Removed: "Field 'availability_zone' has been removed from provider version 1.212.0.",
},
// single az would be never supported.
"vswitch_id": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'vswitch_id' has been removed from provider version 1.75.0. New field 'master_vswitch_ids' and 'worker_vswitch_ids' replaces it.",
},
// worker_numbers in array is a hell of management
"worker_numbers": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeInt,
Default: 3,
},
MinItems: 1,
MaxItems: 3,
Removed: "Field 'worker_numbers' has been removed from provider version 1.75.0. New field 'worker_number' replaces it.",
},
"nodes": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Removed: "Field 'nodes' has been removed from provider version 1.9.4. New field 'master_nodes' replaces it.",
},
// too hard to use this config
"log_config": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"type": {
Type: schema.TypeString,
ValidateFunc: StringInSlice([]string{KubernetesClusterLoggingTypeSLS}, false),
Required: true,
},
"project": {
Type: schema.TypeString,
Optional: true,
},
},
},
Removed: "Field 'log_config' has been removed from provider version 1.75.0. New field 'addons' replaces it.",
},
"cluster_network_type": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{KubernetesClusterNetworkTypeFlannel, KubernetesClusterNetworkTypeTerway}, false),
Removed: "Field 'cluster_network_type' has been removed from provider version 1.75.0. New field 'addons' replaces it.",
},
"user_data": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'user_data' has been removed from provider version 1.212.0. Please use resource 'alicloud_cs_kubernetes_node_pool' to manage cluster worker nodes, by using field 'user_data' to replace it",
},
"node_name_mode": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: StringMatch(regexp.MustCompile(`^customized,[a-z0-9]([-a-z0-9\.])*,([5-9]|[1][0-2]),([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`), "Each node name consists of a prefix, an IP substring, and a suffix. For example, if the node IP address is 192.168.0.55, the prefix is aliyun.com, IP substring length is 5, and the suffix is test, the node name will be aliyun.com00055test."),
ForceNew: true,
},
"worker_ram_role_name": {
Type: schema.TypeString,
Computed: true,
},
"service_account_issuer": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"api_audiences": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
ForceNew: true,
},
"resource_group_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"retain_resources": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"delete_options": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"resource_type": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"SLB", "ALB", "SLS_Data", "SLS_ControlPlane", "PrivateZone"}, false),
},
"delete_mode": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"delete", "retain"}, false),
},
},
},
},
},
}
}