This is a rebase of #1212 since it got closed months ago without merging. Here's also the original PR comment by @khrisrichardson:
Issue:
1209
Problem
Two new fields were added to RKE, ExtraArgsArray and WindowsExtraArgsArray. These fields allow users to specify an extraArg multiple times with different values. The provider now needs to be updated to support these two new fields.
Solution
An extra_args_array set field was added adjacent to the existing extra_args field.
Testing
Engineering Testing
Manual Testing
Here's a snippet demonstrating which fields were added, with everything else in ellipsis.
resource "rancher2_cluster" "cluster" {
rke_config {
services {
kube_api {
extra_args_array {
name = "api-audiences"
value = [
"sts.amazonaws.com",
]
}
extra_args_array {
name = "service-account-key-file"
value = [
"/etc/kubernetes/ssl/sa-signer-pkcs8.pub",
]
}
extra_args_array {
name = "service-account-issuer"
value = [
"rke",
]
}
}
}
}
And these were the results, trimmed for clarity
~ rke_config {
~ services {
~ kube_api {
+ extra_args_array {
+ name = "api-audiences"
+ value = [
+ "sts.amazonaws.com",
]
}
+ extra_args_array {
+ name = "service-account-issuer"
+ value = [
+ "rke",
]
}
+ extra_args_array {
+ name = "service-account-key-file"
+ value = [
+ "/etc/kubernetes/ssl/sa-signer-pkcs8.pub",
]
}
}
}
}
}
Automated Testing
Tests have been added only to rancher2/structure_cluster_rke_config_services_etcd_test.go, since the tests for the other services would otherwise use identical schemas, flatteners, and expanders.
This is a rebase of #1212 since it got closed months ago without merging. Here's also the original PR comment by @khrisrichardson: