瀏覽代碼

internal/provider: Updates for terraform-plugin-framework@v0.15.0 deprecations (#97)

Brian Flad 2 年之前
父節點
當前提交
c05b586f5c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      internal/provider/example_data_source.go
  2. 1 1
      internal/provider/example_resource.go

+ 1 - 1
internal/provider/example_data_source.go

@@ -94,7 +94,7 @@ func (d *ExampleDataSource) Read(ctx context.Context, req datasource.ReadRequest
 
 	// For the purposes of this example code, hardcoding a response value to
 	// save into the Terraform state.
-	data.Id = types.String{Value: "example-id"}
+	data.Id = types.StringValue("example-id")
 
 	// Write logs using the tflog package
 	// Documentation: https://terraform.io/plugin/log

+ 1 - 1
internal/provider/example_resource.go

@@ -99,7 +99,7 @@ func (r *ExampleResource) Create(ctx context.Context, req resource.CreateRequest
 
 	// For the purposes of this example code, hardcoding a response value to
 	// save into the Terraform state.
-	data.Id = types.String{Value: "example-id"}
+	data.Id = types.StringValue("example-id")
 
 	// Write logs using the tflog package
 	// Documentation: https://terraform.io/plugin/log