@@ -16,7 +16,6 @@ cp "$1" "$converted_file"
16
16
# PR #738 chore!: remove deprecated variables
17
17
#
18
18
sed -i ' /arn_format/d' " $converted_file "
19
- sed -i ' /subnet_id_runners/d' " $converted_file "
20
19
sed -i ' /subnet_ids_gitlab_runner/d' " $converted_file "
21
20
sed -i ' /asg_terminate_lifecycle_hook_create/d' " $converted_file "
22
21
sed -i ' /asg_terminate_lifecycle_hook_heartbeat_timeout/d' " $converted_file "
@@ -133,7 +132,7 @@ sed 's/role_tags/runner_extra_role_tags/g' | \
133
132
sed ' s/runner_tags/runner_worker_docker_machine_extra_role_tags/g' | \
134
133
sed ' s/agent_tags/runner_extra_instance_tags/g' | \
135
134
sed ' s/enable_ping/runner_ping_enable/g' | \
136
- sed ' s/gitlab_runner_version/runner_gitlab_runner_version/g' | \
135
+ sed ' s/[^\.] gitlab_runner_version/runner_gitlab_runner_version/g' | \
137
136
sed ' s/gitlab_runner_egress_rules/runner_extra_egress_rules/g' | \
138
137
sed ' s/gitlab_runner_security_group_ids/runner_ping_allow_from_security_groups/g' | \
139
138
sed ' s/gitlab_runner_security_group_description/runner_security_group_description/g' | \
@@ -650,12 +649,23 @@ if [ -n "$extracted_variables" ]; then
650
649
" > x && mv x " $converted_file "
651
650
fi
652
651
652
+ # rename the subnet_id_runners variable
653
+ sed -i ' s/subnet_id_runners/subnet_id/g' " $converted_file "
654
+
655
+ # remove the \" from the autoscaling periods. No longer needed as jsonencode(value) is used
656
+ sed -i ' /periods/s/\\"//g' " $converted_file "
657
+
653
658
# change the module source to cattle-ops
654
659
sed -i ' s/npalm/cattle-ops/g' " $converted_file "
655
660
656
661
cat << EOT
657
662
Not all cases are handled by this script. Please check the output file and make sure that all variables are converted correctly.
658
- Especially it you have comments or multiline templates in your file.
663
+ Take some time and sort the variables again for better readability.
664
+
665
+ Known issues:
666
+ - commented lines are not supported. Remove them.
667
+ - variable definitions with multiple lines are not supported. Rework manually.
668
+ - ` subnet_id` was taken from ` subnet_id_runners` . Make sure that this is correct.
659
669
EOT
660
670
661
671
echo
0 commit comments