Skip to content

Commit

Permalink
Spotaut 17246 tf https spotinst.atlassian.net browse prod 7165 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra1-n authored Jan 2, 2024
1 parent c08fd2a commit 70b73d3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ No modules.
| <a name="input_blacklist"></a> [blacklist](#input\_blacklist) | List of instance types not allowed in the Ocean cluster (`whitelist` and `blacklist` are mutually exclusive) | `list(string)` | `null` | no |
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Cluster name | `string` | n/a | yes |
| <a name="input_conditioned_roll"></a> [conditioned\_roll](#input\_conditioned\_roll) | Default: false. Spot will perform a cluster Roll in accordance with a relevant modification of the cluster’s settings. When set to true , only specific changes in the cluster’s configuration will trigger a cluster roll (such as AMI, Key Pair, user data, instance types, load balancers, etc). | `bool` | `null` | no |
| <a name="input_conditioned_roll_params"></a> [conditioned\_roll\_params](#input\_conditioned\_roll\_params) | (Optional) A custom list of attributes will trigger the cluster roll operation (overrides the predefined list of parameters). Valid only when the `conditioned_roll` parameter is set to true. | `list(string)` | `null` | no |
| <a name="input_controller_id"></a> [controller\_id](#input\_controller\_id) | Unique identifier for the Ocean controller. If not specified the cluster name will be used. | `string` | `null` | no |
| <a name="input_cpu_per_unit"></a> [cpu\_per\_unit](#input\_cpu\_per\_unit) | Optionally configure the number of CPUs to allocate the headroom. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU. | `number` | `null` | no |
| <a name="input_data_integration_id"></a> [data\_integration\_id](#input\_data\_integration\_id) | The identifier of The S3 data integration to export the logs to. | `string` | `null` | no |
Expand Down Expand Up @@ -207,7 +208,7 @@ No modules.
| <a name="input_worker_instance_profile_arn"></a> [worker\_instance\_profile\_arn](#input\_worker\_instance\_profile\_arn) | The instance profile iam role. | `string` | n/a | yes |
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | block\_device\_mapping object | <pre>list(object({<br> device_name = string<br> delete_on_termination = bool<br> encrypted = bool<br> kms_key_id = string<br> snapshot_id = string<br> volume_type = string<br> iops = number<br> volume_size = number<br> throughput = number<br> }))</pre> | `[]` | no |
| <a name="input_dynamic_volume_size"></a> [dynamic\_volume\_size](#input\_dynamic\_volume\_size) | dynamic\_volume\_size object | <pre>object({<br> base_size = number<br> size_per_resource_unit = number<br> resource = string<br> })</pre> | `null` | no |
| <a name="input_dynamic_iops"></a> [dynamic\_iops](#input\_dynamic\_volume\_size) | dynamic\_iops object | <pre>object({<br> base_size = number<br> size_per_resource_unit = number<br> resource = string<br> })</pre> | `null` | no |
| <a name="input_dynamic_iops"></a> [dynamic\_iops](#input\_dynamic\_volume\_size) | dynamic\_iops object | <pre>object({<br> base_size = number<br> size_per_resource_unit = number<br> resource = string<br> })</pre> | `null` | no |

## Outputs

Expand Down
7 changes: 4 additions & 3 deletions ocean.tf
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ resource "spotinst_ocean_aws" "ocean" {

# Policy when config is updated
update_policy {
should_roll = var.should_roll
conditioned_roll = var.conditioned_roll
auto_apply_tags = var.auto_apply_tags
should_roll = var.should_roll
conditioned_roll = var.conditioned_roll
auto_apply_tags = var.auto_apply_tags
conditioned_roll_params = var.conditioned_roll_params
roll_config {
batch_size_percentage = var.batch_size_percentage
launch_spec_ids = var.launch_spec_ids
Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ variable "conditioned_roll" {
default = null
description = "Default: false. Spot will perform a cluster Roll in accordance with a relevant modification of the cluster’s settings. When set to true , only specific changes in the cluster’s configuration will trigger a cluster roll (such as AMI, Key Pair, user data, instance types, load balancers, etc)."
}
variable "conditioned_roll_params" {
type = list(string)
default = null
description = "Customized List of conditioned roll params, it is valid only when conditioned_roll set to true"}
##########################

variable "data_integration_id" {
Expand Down

0 comments on commit 70b73d3

Please sign in to comment.