Skip to content

Commit c0cf0bc

Browse files
committed
Support setting solution for 8.16+ on Cloud
1 parent 0f16228 commit c0cf0bc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

internal/kibana/space.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
1313
)
1414

15-
var SpaceSolutionMinVersion = version.Must(version.NewVersion("8.18.0"))
15+
var SpaceSolutionMinVersion = version.Must(version.NewVersion("8.16.0"))
1616

1717
func ResourceSpace() *schema.Resource {
1818
apikeySchema := map[string]*schema.Schema{

internal/kibana/space_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ import (
66

77
"github.com/elastic/terraform-provider-elasticstack/internal/acctest"
88
"github.com/elastic/terraform-provider-elasticstack/internal/clients"
9-
"github.com/elastic/terraform-provider-elasticstack/internal/kibana"
109
"github.com/elastic/terraform-provider-elasticstack/internal/versionutils"
10+
"github.com/hashicorp/go-version"
1111
sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
1212
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
1313
"github.com/hashicorp/terraform-plugin-testing/terraform"
1414
)
1515

16+
var minSelfManagedVersionForSpaceSolution = version.Must(version.NewVersion("8.16.0"))
17+
1618
func TestAccResourceSpace(t *testing.T) {
1719
spaceId := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum)
1820

@@ -43,7 +45,7 @@ func TestAccResourceSpace(t *testing.T) {
4345
},
4446
{
4547
Config: testAccResourceSpaceWithSolution(spaceId),
46-
SkipFunc: versionutils.CheckIfVersionIsUnsupported(kibana.SpaceSolutionMinVersion),
48+
SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSelfManagedVersionForSpaceSolution),
4749
Check: resource.ComposeTestCheckFunc(
4850
resource.TestCheckResourceAttr("elasticstack_kibana_space.test_space", "space_id", spaceId),
4951
resource.TestCheckResourceAttr("elasticstack_kibana_space.test_space", "name", fmt.Sprintf("Solution %s", spaceId)),

0 commit comments

Comments
 (0)