Skip to content
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

feat: Add ability to support spot options for launch template #1630

Closed

Conversation

davidweizheng
Copy link

PR o'clock

Description

Add ability to support spot options for launch template to address this issue: #1626

Checklist

@sergeyshevch
Copy link

Maybe someone can review and accept it? I also interested in such feature

@bryantbiggs
Copy link
Member

@davidweizheng could you update an example so that it can be tested/validated and also for demonstrating its use to users - please 🙏🏽 and thank you!

spot_options = {
block_duration_minutes = "60"
instance_interruption_behavior = "terminate"
max_price = null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code should be able to take a default provider values in cae of missing value for field. As a lot of them are optional we cannot require to put null from users.

Here you can take a look of some constructions which we using to make such optional inputs:

metadata_options {
http_endpoint = lookup(each.value, "metadata_http_endpoint", null)
http_tokens = lookup(each.value, "metadata_http_tokens", null)
http_put_response_hop_limit = lookup(each.value, "metadata_http_put_response_hop_limit", null)
}

timeouts {
create = try(each.value["timeouts"].create, null)
delete = try(each.value["timeouts"].delete, null)
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @daroga0002 . This is very helpful. I'll definitely take a look.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@davidweizheng
Copy link
Author

@davidweizheng could you update an example so that it can be tested/validated and also for demonstrating its use to users - please 🙏🏽 and thank you!

I do have example in docs/spot-instances.md, but I'll try to add that as an actual example. Thanks.

@sergeyshevch
Copy link

Ping this one more time )

@davidweizheng
Copy link
Author

Could someone review this?

@github-actions
Copy link

github-actions bot commented Jan 1, 2022

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@antonbabenko
Copy link
Member

This issue has been resolved in version 18.0.0 🎉

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants