mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-24 02:11:04 +01:00
fix: Ensure the correct service CIDR and IP family is used in the rendered user data (#2963)
* fix: Ensuring the correct service CIDR and IP family is used in the rendered user data * chore: Updates from testing and validating * chore: Fix example destroy instructions * fix: Only require `cluster_service_cidr` when `create = true` * chore: Clean up commented out code and add note on check length
This commit is contained in:
@@ -3,5 +3,6 @@
|
||||
"cluster-name" = "${cluster_name}"
|
||||
"api-server" = "${cluster_endpoint}"
|
||||
"cluster-certificate" = "${cluster_auth_base64}"
|
||||
"cluster-dns-ip" = "${cluster_dns_ip}"
|
||||
%{ endif ~}
|
||||
${bootstrap_extra_args ~}
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
set -e
|
||||
%{ endif ~}
|
||||
${pre_bootstrap_user_data ~}
|
||||
%{ if length(cluster_service_ipv4_cidr) > 0 ~}
|
||||
export SERVICE_IPV4_CIDR=${cluster_service_ipv4_cidr}
|
||||
%{ endif ~}
|
||||
%{ if enable_bootstrap_user_data ~}
|
||||
B64_CLUSTER_CA=${cluster_auth_base64}
|
||||
API_SERVER_URL=${cluster_endpoint}
|
||||
/etc/eks/bootstrap.sh ${cluster_name} ${bootstrap_extra_args} --b64-cluster-ca $B64_CLUSTER_CA --apiserver-endpoint $API_SERVER_URL
|
||||
/etc/eks/bootstrap.sh ${cluster_name} ${bootstrap_extra_args} --b64-cluster-ca $B64_CLUSTER_CA --apiserver-endpoint $API_SERVER_URL \
|
||||
--ip-family ${cluster_ip_family} --service-${cluster_ip_family}-cidr ${cluster_service_cidr}
|
||||
${post_bootstrap_user_data ~}
|
||||
%{ endif ~}
|
||||
|
||||
Reference in New Issue
Block a user