-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spotinst_ocean_aws does not detect diff for instance_metadata_options #489
Comments
@trc-ikeskin - The team is on a year-end weeklong vacation. We will handle this issue in the first week of Jan 2024. |
@anuragsharma-123 no worries, thank you for the heads up! I wish you and your team a relaxing vacation. |
@trc-ikeskin Could you give more details on this, I have tried reproducing this as per the steps mentioned but couldn't reproduce it. I could see the diff showing for both cluster and launchSpec and also I suggest you to use the latest version of terraform provider. (1.157.0) Scenario2- Created a ocean aws cluster with instance_metadata_options block configured ![]() |
@chandra1-n Thanks for testing. I reproduced this on 3 different clusters. For each of them no diff was shown. Is it possible that this error is caused when clusters are imported to the Terraform state after they were created manually? This is the only obvious difference I can observe compared to the provided scenarios. |
@chandra1-n @anuragsharma-123 any news on this? Could it be an issue that is caused by importing existing clusters into the state (see my last comment)? |
@trc-ikeskin that could be possible, but once you create a ocean cluster using spot TF provider it would create a new state file which will display diff for |
@chandra1-n Not sure what you mean by "use case"? The Spot Cloud Cluster was created manually and it was later decided, that it should be managed by Terraform - hence the resource was imported to a Terraform state. Development was then continued via Terraform, where it became obvious that changes were not detected properly. Providing all the files, will take sometime because I have to obfuscate a lot of customer related data from the code. I will get back to you as soon as it is ready. |
Hello @trc-ikeskin We tried the scenario, creating spot-ocean-aws manually (without configuring instance_metadata_options) and then imported terraform state and then added " instance_metadata_options" to cluster config which is showing the difference as expected. |
Terraform Version
Affected Resource(s)
spotinst_ocean_aws
spotinst_ocean_aws_launch_spec
(possibly)Terraform Configuration Files
Debug Output
https://gist.github.com/trc-ikeskin/a5338bb1a02484e605245bb09af40f2b
Expected Behavior
The provider should detect that there is drift between the cloud cluster resource in Spot Ocean and the Terraform state:
The state contains a list
instance_metadata_options
while the response object returned fromhttps://api.spotinst.io/ocean/aws/k8s/cluster/o-55xxxx?accountId=act-3cxxxx
does not contain a corresponding objectresponse.items[0].compute.launchSpecification.instanceMetadataOptions
. This should trigger the provider to update the cloud cluster resource in Spot Ocean.Actual Behavior
The provider does not detect a drift and therefore does not trigger an update on the cloud cluster resource, which causes the instance_metadata_options to be missing from Spot Ocean.
Steps to Reproduce
instance_metadata_options
block for thespotinst_ocean_aws
resource.terraform apply
Community Note
The text was updated successfully, but these errors were encountered: