Skip to content

Commit

Permalink
[ignore] Add missing booldefault module and fix rest managed data sou…
Browse files Browse the repository at this point in the history
…rce.
  • Loading branch information
samiib authored and lhercot committed Apr 30, 2024
1 parent 6d652d0 commit 40e545f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
14 changes: 12 additions & 2 deletions internal/provider/data_source_aci_rest_managed.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ type AciRestManagedDataSource struct {
client *client.Client
}

// AciRestManagedDataSourceModel describes the data source model.
type AciRestManagedDataSourceModel struct {
Id types.String `tfsdk:"id"`
Dn types.String `tfsdk:"dn"`
ClassName types.String `tfsdk:"class_name"`
Content types.Map `tfsdk:"content"`
Child types.Set `tfsdk:"child"`
Annotation types.String `tfsdk:"annotation"`
}

func (d *AciRestManagedDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
tflog.Debug(ctx, "Start schema of datasource: aci_rest_managed")
resp.TypeName = req.ProviderTypeName + "_rest_managed"
Expand Down Expand Up @@ -110,7 +120,7 @@ func (d *AciRestManagedDataSource) Configure(ctx context.Context, req datasource

func (d *AciRestManagedDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
tflog.Debug(ctx, "Start read of datasource: aci_rest_managed")
var data *AciRestManagedResourceModel
var data *AciRestManagedDataSourceModel

// Read Terraform configuration data into the model
resp.Diagnostics.Append(req.Config.Get(ctx, &data)...)
Expand Down Expand Up @@ -202,7 +212,7 @@ func (d *AciRestManagedDataSource) Read(ctx context.Context, req datasource.Read

}

func dataSourceRestManagedNotFoundError(diags *diag.Diagnostics, data *AciRestManagedResourceModel) {
func dataSourceRestManagedNotFoundError(diags *diag.Diagnostics, data *AciRestManagedDataSourceModel) {
diags.AddError(
"Failed to read aci_rest_managed data source",
fmt.Sprintf("The aci_rest_managed data source with dn '%s' has not been found", data.Dn),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40e545f

Please sign in to comment.