Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/data-sources/alb_waf_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ page_title: "stackit_alb_waf_configuration Data Source - stackit"
subcategory: ""
description: |-
ALB WAF Custom Rule Group resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_alb_waf_configuration (Data Source)

ALB WAF Custom Rule Group resource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on resource level.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
Expand Down
3 changes: 0 additions & 3 deletions docs/data-sources/alb_waf_custom_rule_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ page_title: "stackit_alb_waf_custom_rule_group Data Source - stackit"
subcategory: ""
description: |-
ALB WAF Custom Rule Group resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_alb_waf_custom_rule_group (Data Source)

ALB WAF Custom Rule Group resource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on resource level.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
Expand Down
3 changes: 0 additions & 3 deletions docs/data-sources/alb_waf_managed_rule_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ page_title: "stackit_alb_waf_managed_rule_set Data Source - stackit"
subcategory: ""
description: |-
ALB WAF Managed Rule Set DataSource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on datasource level.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_alb_waf_managed_rule_set (Data Source)

ALB WAF Managed Rule Set DataSource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on datasource level.

~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
Expand Down
3 changes: 0 additions & 3 deletions docs/resources/alb_waf_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ page_title: "stackit_alb_waf_configuration Resource - stackit"
subcategory: ""
description: |-
ALB WAF Custom Rule Group resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_alb_waf_configuration (Resource)

ALB WAF Custom Rule Group resource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on resource level.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
Expand Down
3 changes: 0 additions & 3 deletions docs/resources/alb_waf_custom_rule_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ page_title: "stackit_alb_waf_custom_rule_group Resource - stackit"
subcategory: ""
description: |-
ALB WAF Custom Rule Group resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_alb_waf_custom_rule_group (Resource)

ALB WAF Custom Rule Group resource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on resource level.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
Expand Down
3 changes: 0 additions & 3 deletions docs/resources/alb_waf_managed_rule_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ page_title: "stackit_alb_waf_managed_rule_set Resource - stackit"
subcategory: ""
description: |-
ALB WAF Managed Rule Set resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_alb_waf_managed_rule_set (Resource)

ALB WAF Managed Rule Set resource schema. Uses the `default_region` specified in the provider configuration as a fallback in case no `region` is defined on resource level.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
Expand Down
30 changes: 15 additions & 15 deletions stackit/internal/services/albwaf/albwaf_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestAccCustomRuleGroupMin(t *testing.T) {
// Creation
{
ConfigVariables: testCustomRuleGroupMin,
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), customRuleGroupMinConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), customRuleGroupMinConfig),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("stackit_alb_waf_custom_rule_group.custom_rule_group", "project_id", testutil.ProjectId),
resource.TestCheckResourceAttr("stackit_alb_waf_custom_rule_group.custom_rule_group", "region", testutil.Region),
Expand Down Expand Up @@ -169,7 +169,7 @@ func TestAccCustomRuleGroupMin(t *testing.T) {
name = stackit_alb_waf_custom_rule_group.custom_rule_group.name
}
`,
testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), customRuleGroupMinConfig,
testutil.NewConfigBuilder().BuildProviderConfig(), customRuleGroupMinConfig,
),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("data.stackit_alb_waf_custom_rule_group.custom_rule_group", "project_id", testutil.ProjectId),
Expand Down Expand Up @@ -220,7 +220,7 @@ func TestAccCustomRuleGroupMin(t *testing.T) {
// Update
{
ConfigVariables: testCustomRuleGroupMinUpdated(),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), customRuleGroupMinConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), customRuleGroupMinConfig),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("stackit_alb_waf_custom_rule_group.custom_rule_group", plancheck.ResourceActionReplace),
Expand Down Expand Up @@ -258,7 +258,7 @@ func TestAccCustomRuleGroupMax(t *testing.T) {
// Creation
{
ConfigVariables: testCustomRuleGroupMax,
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), customRuleGroupMaxConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), customRuleGroupMaxConfig),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("stackit_alb_waf_custom_rule_group.custom_rule_group", "project_id", testutil.ProjectId),
resource.TestCheckResourceAttr("stackit_alb_waf_custom_rule_group.custom_rule_group", "region", testutil.Region),
Expand Down Expand Up @@ -295,7 +295,7 @@ func TestAccCustomRuleGroupMax(t *testing.T) {
name = stackit_alb_waf_custom_rule_group.custom_rule_group.name
}
`,
testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), customRuleGroupMaxConfig,
testutil.NewConfigBuilder().BuildProviderConfig(), customRuleGroupMaxConfig,
),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("data.stackit_alb_waf_custom_rule_group.custom_rule_group", "project_id", testutil.ProjectId),
Expand Down Expand Up @@ -351,7 +351,7 @@ func TestAccCustomRuleGroupMax(t *testing.T) {
// Update
{
ConfigVariables: testCustomRuleGroupMaxUpdated(),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), customRuleGroupMaxConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), customRuleGroupMaxConfig),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("stackit_alb_waf_custom_rule_group.custom_rule_group", plancheck.ResourceActionUpdate),
Expand Down Expand Up @@ -393,7 +393,7 @@ func TestAccManagedRuleSet(t *testing.T) {
// Creation
{
ConfigVariables: testManagedRuleSet,
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), managedRuleSetConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), managedRuleSetConfig),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("stackit_alb_waf_managed_rule_set.managed_rule_set", "project_id", testutil.ProjectId),
resource.TestCheckResourceAttr("stackit_alb_waf_managed_rule_set.managed_rule_set", "region", testutil.Region),
Expand All @@ -414,7 +414,7 @@ func TestAccManagedRuleSet(t *testing.T) {
name = stackit_alb_waf_managed_rule_set.managed_rule_set.name
}
`,
testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), managedRuleSetConfig,
testutil.NewConfigBuilder().BuildProviderConfig(), managedRuleSetConfig,
),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("data.stackit_alb_waf_managed_rule_set.managed_rule_set", "project_id", testutil.ProjectId),
Expand Down Expand Up @@ -448,7 +448,7 @@ func TestAccManagedRuleSet(t *testing.T) {
// Update
{
ConfigVariables: testManagedRuleSetUpdated(),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), managedRuleSetConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), managedRuleSetConfig),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("stackit_alb_waf_managed_rule_set.managed_rule_set", plancheck.ResourceActionReplace),
Expand All @@ -475,7 +475,7 @@ func TestAccWafConfigurationMin(t *testing.T) {
// Creation
{
ConfigVariables: testConfigVarsMin,
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), wafMinConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), wafMinConfig),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("stackit_alb_waf_configuration.waf_instance", "project_id", testutil.ProjectId),
resource.TestCheckResourceAttr("stackit_alb_waf_configuration.waf_instance", "region", testutil.Region),
Expand All @@ -494,7 +494,7 @@ func TestAccWafConfigurationMin(t *testing.T) {
name = stackit_alb_waf_configuration.waf_instance.name
}
`,
testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), wafMinConfig,
testutil.NewConfigBuilder().BuildProviderConfig(), wafMinConfig,
),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("data.stackit_alb_waf_configuration.waf", "project_id", testutil.ProjectId),
Expand Down Expand Up @@ -527,7 +527,7 @@ func TestAccWafConfigurationMin(t *testing.T) {
// Update
{
ConfigVariables: testConfigVarsMinUpdated(),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), wafMinConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), wafMinConfig),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("stackit_alb_waf_configuration.waf_instance", plancheck.ResourceActionReplace),
Expand All @@ -553,7 +553,7 @@ func TestAccWafConfigurationMax(t *testing.T) {
// Creation
{
ConfigVariables: testConfigVarsMax,
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), wafMaxConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), wafMaxConfig),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("stackit_alb_waf_managed_rule_set.managed_rule_set", "name", testutil.ConvertConfigVariable(testConfigVarsMax["rule_set_name"])),
resource.TestCheckResourceAttr("stackit_alb_waf_custom_rule_group.custom_rule_group", "name", testutil.ConvertConfigVariable(testConfigVarsMax["custom_rule_group_name"])),
Expand Down Expand Up @@ -588,7 +588,7 @@ func TestAccWafConfigurationMax(t *testing.T) {
name = stackit_alb_waf_configuration.waf_instance.name
}
`,
testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), wafMaxConfig,
testutil.NewConfigBuilder().BuildProviderConfig(), wafMaxConfig,
),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttrPair(
Expand Down Expand Up @@ -629,7 +629,7 @@ func TestAccWafConfigurationMax(t *testing.T) {
// Update
{
ConfigVariables: testConfigVarsMaxUpdated(),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().EnableBetaResources(true).BuildProviderConfig(), wafMaxConfig),
Config: fmt.Sprintf("%s\n%s", testutil.NewConfigBuilder().BuildProviderConfig(), wafMaxConfig),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("stackit_alb_waf_configuration.waf_instance", plancheck.ResourceActionReplace),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (

"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/features"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/utils"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
)
Expand All @@ -44,11 +43,6 @@ func (r *customRuleGroupDataSource) Configure(ctx context.Context, req datasourc
return
}

features.CheckBetaResourcesEnabled(ctx, &r.providerData, &resp.Diagnostics, "stackit_alb_waf_custom_rule_group", core.Resource)
if resp.Diagnostics.HasError() {
return
}

apiClient := utils.ConfigureClient(ctx, &r.providerData, &resp.Diagnostics)
if resp.Diagnostics.HasError() {
return
Expand All @@ -63,7 +57,7 @@ func (r *customRuleGroupDataSource) Metadata(_ context.Context, req datasource.M

func (r *customRuleGroupDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
Description: features.AddBetaDescription(fmt.Sprintf("ALB WAF Custom Rule Group resource schema. %s", core.ResourceRegionFallbackDocstring), core.Resource),
Description: fmt.Sprintf("ALB WAF Custom Rule Group resource schema. %s", core.ResourceRegionFallbackDocstring),
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Description: descriptions["id"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (

"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/features"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/utils"
tfutils "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
Expand Down Expand Up @@ -133,11 +132,6 @@ func (r *customRuleGroupResource) Configure(ctx context.Context, req resource.Co
return
}

features.CheckBetaResourcesEnabled(ctx, &r.providerData, &resp.Diagnostics, "stackit_alb_waf_custom_rule_group", core.Resource)
if resp.Diagnostics.HasError() {
return
}

apiClient := utils.ConfigureClient(ctx, &r.providerData, &resp.Diagnostics)
if resp.Diagnostics.HasError() {
return
Expand Down Expand Up @@ -176,7 +170,7 @@ var descriptions = map[string]string{

func (r *customRuleGroupResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
Description: features.AddBetaDescription(fmt.Sprintf("ALB WAF Custom Rule Group resource schema. %s", core.ResourceRegionFallbackDocstring), core.Resource),
Description: fmt.Sprintf("ALB WAF Custom Rule Group resource schema. %s", core.ResourceRegionFallbackDocstring),
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Description: descriptions["id"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/features"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/utils"
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
)
Expand All @@ -43,11 +42,6 @@ func (d *managedRuleSetDataSource) Configure(ctx context.Context, req datasource
return
}

features.CheckBetaResourcesEnabled(ctx, &d.providerData, &resp.Diagnostics, "stackit_alb_waf_managed_rule_set", core.Datasource)
if resp.Diagnostics.HasError() {
return
}

apiClient := utils.ConfigureClient(ctx, &d.providerData, &resp.Diagnostics)
if resp.Diagnostics.HasError() {
return
Expand All @@ -62,7 +56,7 @@ func (d *managedRuleSetDataSource) Metadata(_ context.Context, req datasource.Me

func (d *managedRuleSetDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
Description: features.AddBetaDescription(fmt.Sprintf("ALB WAF Managed Rule Set DataSource schema. %s", core.DatasourceRegionFallbackDocstring), core.Datasource),
Description: fmt.Sprintf("ALB WAF Managed Rule Set DataSource schema. %s", core.DatasourceRegionFallbackDocstring),
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
Description: descriptions["id"],
Expand Down
Loading
Loading