From 3c3a077bf62e0ecfe0f01faa6585402ac43c2887 Mon Sep 17 00:00:00 2001 From: samitab Date: Mon, 29 Apr 2024 06:58:55 +1000 Subject: [PATCH] [ignore] Add missing booldefault module and fix rest managed data source. --- .../provider/data_source_aci_rest_managed.go | 4 ++ .../resource/schema/booldefault/doc.go | 5 +++ .../schema/booldefault/static_value.go | 42 +++++++++++++++++++ vendor/modules.txt | 1 + 4 files changed, 52 insertions(+) create mode 100644 vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/doc.go create mode 100644 vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/static_value.go diff --git a/internal/provider/data_source_aci_rest_managed.go b/internal/provider/data_source_aci_rest_managed.go index 8ccf1ccea..0c295c10e 100644 --- a/internal/provider/data_source_aci_rest_managed.go +++ b/internal/provider/data_source_aci_rest_managed.go @@ -60,6 +60,10 @@ func (d *AciRestManagedDataSource) Schema(ctx context.Context, req datasource.Sc Computed: true, MarkdownDescription: `The annotation of the ACI object.`, }, + "escape_html": schema.BoolAttribute{ + Computed: true, + MarkdownDescription: "Enable escaping of HTML characters when encoding the JSON payload.", + }, }, Blocks: map[string]schema.Block{ "child": schema.SetNestedBlock{ diff --git a/vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/doc.go b/vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/doc.go new file mode 100644 index 000000000..fe6b0f76d --- /dev/null +++ b/vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/doc.go @@ -0,0 +1,5 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Package booldefault provides default values for types.Bool attributes. +package booldefault diff --git a/vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/static_value.go b/vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/static_value.go new file mode 100644 index 000000000..797f81d09 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault/static_value.go @@ -0,0 +1,42 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package booldefault + +import ( + "context" + "fmt" + + "github.com/hashicorp/terraform-plugin-framework/resource/schema/defaults" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +// StaticBool returns a static boolean value default handler. +// +// Use StaticBool if a static default value for a boolean should be set. +func StaticBool(defaultVal bool) defaults.Bool { + return staticBoolDefault{ + defaultVal: defaultVal, + } +} + +// staticBoolDefault is static value default handler that +// sets a value on a boolean attribute. +type staticBoolDefault struct { + defaultVal bool +} + +// Description returns a human-readable description of the default value handler. +func (d staticBoolDefault) Description(_ context.Context) string { + return fmt.Sprintf("value defaults to %t", d.defaultVal) +} + +// MarkdownDescription returns a markdown description of the default value handler. +func (d staticBoolDefault) MarkdownDescription(_ context.Context) string { + return fmt.Sprintf("value defaults to `%t`", d.defaultVal) +} + +// DefaultBool implements the static default value logic. +func (d staticBoolDefault) DefaultBool(_ context.Context, req defaults.BoolRequest, resp *defaults.BoolResponse) { + resp.PlanValue = types.BoolValue(d.defaultVal) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 84d288adc..616c39caa 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -164,6 +164,7 @@ github.com/hashicorp/terraform-plugin-framework/provider/schema github.com/hashicorp/terraform-plugin-framework/providerserver github.com/hashicorp/terraform-plugin-framework/resource github.com/hashicorp/terraform-plugin-framework/resource/schema +github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault github.com/hashicorp/terraform-plugin-framework/resource/schema/defaults github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier