spotinst / terraform-provider-spotinst

Terraform Spotinst provider.
https://registry.terraform.io/providers/spotinst/spotinst/latest/docs
Mozilla Public License 2.0
63 stars 56 forks source link

Unsupported block type `instanceTypes` in resource "spotinst_ocean_aws" (copied from Example Usage) #399

Closed hajdukda closed 1 year ago

hajdukda commented 1 year ago

Terraform Version

1.3.6

Affected Resource(s)

Terraform Configuration Files


resource "spotinst_ocean_aws" "ocean_background" {
...
  instanceTypes {
    whitelist = ["m5a.xlarge", "m6a.xlarge", "m5.xlarge", "m6i.xlarge", "r5a.xlarge", "m5n.xlarge"]
  }
....
}

Debug Output

│ Error: Unsupported block type
│ 
│   on ocean.tf line 15, in resource "spotinst_ocean_aws" "ocean_background":
│   15:   instanceTypes {
│ 
│ Blocks of type "instanceTypes" are not expected here.

Expected Behavior

Ocean resource is created ?

Actual Behavior

Provider cries about copied from documentation example :D ? https://registry.terraform.io/providers/spotinst/spotinst/latest/docs/resources/ocean_aws#example-usage

Steps to Reproduce

Community Note

hajdukda commented 1 year ago

ps. seems like cluster_orientation is also not supported anymore

chandra1-n commented 1 year ago

Hi @hajdukda Thanks for raising this issue, could you try

whitelist = ["m5a.xlarge", "m6a.xlarge", "m5.xlarge", "m6i.xlarge", "r5a.xlarge", "m5n.xlarge"]

without using "instanceTypes", this is for hierarchy purpose we have included in documentation.

chandra1-n commented 1 year ago

This is fixed in documentation in latest release.