Skip to content

Commit

Permalink
Add Resources
Browse files Browse the repository at this point in the history
  • Loading branch information
apiazza-dd committed Oct 28, 2024
1 parent fd7d876 commit 99bc5c3
Showing 1 changed file with 14 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ package fwprovider
import (
"context"

"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
"github.com/hashicorp/terraform-plugin-framework/diag"
frameworkPath "github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-framework/validator"
"github.com/hashicorp/terraform-plugin-framework/validator/listvalidator"
"github.com/hashicorp/terraform-plugin-framework/validator/stringvalidator"

"github.com/terraform-providers/terraform-provider-datadog/datadog/internal/utils"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
"github.com/hashicorp/terraform-plugin-framework/diag"
frameworkPath "github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"

"github.com/terraform-providers/terraform-provider-datadog/datadog/internal/utils"
)

var (
Expand Down Expand Up @@ -71,15 +68,10 @@ func (r *integrationCloudflareAccountResource) Schema(_ context.Context, _ resou
},
"id": utils.ResourceIDAttribute(),
"resources": schema.ListAttribute{
ElementType: types.StringType,
Optional: true,
Validators: []validator.List{
listvalidator.ValueStringsAre(
stringvalidator.OneOf("web", "dns", "lb", "worker"),
),
},
Description: "An allowlist of resources to restrict pulling metrics for including 'web', 'dns', 'lb' (load balancer), 'worker'",
},
ElementType: types.StringType,
Optional: true,
Description: "An allowlist of resources to restrict pulling metrics for including 'web', 'dns', 'lb' (load balancer), 'worker')",
},
},
}
}
Expand Down

0 comments on commit 99bc5c3

Please sign in to comment.