rancher / terraform-provider-rancher2

Terraform Rancher2 provider
https://www.terraform.io/docs/providers/rancher2/
Mozilla Public License 2.0
253 stars 216 forks source link

feat(cluster): add use_instance_metadata_hostname flag to cloud_provider block #1271

Open asafalima opened 7 months ago

asafalima commented 7 months ago

Issue:

Fixes: https://github.com/rancher/rancher/issues/41059

Problem

Since Rancher v2.6.11 it is now mandatory in some cases for RKE clusters in AWS to set a newly introduced config named useInstanceMetadataHostname. Upgrading from Rancher v2.6.10 to v2.6.11 will break the clusters if you don't specify this flag.

Solution

Adding the ability to configure the useInstanceMetadataHostname from the rancher2_cluster.rke_config.cloud_provider block.

Testing

Setting the flag to true should result in cluster nodes named using the EC2 instance metadata hostname.

Engineering Testing

Manual Testing

Manually checked rancher's api call with the useInstanceMetadataHostname flag present.

Automated Testing

Added a check to the unit test that the flag is persisted and passed as expected.

QA Testing Considerations

Regressions Considerations

asafalima commented 6 months ago

@kkaempf I would appreciate you review on this change

kkaempf commented 6 months ago

passing on ... 😉

asafalima commented 5 months ago

Hi @snasovich, it would be great if you can take a look at this change?

asafalima commented 4 months ago

This branch was checked out of the v3.1.1 tag, can we merge this fix to v4 and cherry-pick it to v3?

DanielJuravski commented 1 month ago

Any progress here?