-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39342 from takakuni-classmethod/f-aws_bedrock_inf…
…erence_profile-datasource d/aws_bedrock_inference_profiles: new data source
- Loading branch information
Showing
19 changed files
with
632 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```release-note:new-data-source | ||
aws_bedrock_inference_profile | ||
``` | ||
```release-note:new-data-source | ||
aws_bedrock_inference_profiles | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package framework | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema" | ||
"github.com/hashicorp/terraform-plugin-framework/types" | ||
fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" | ||
) | ||
|
||
// DataSourceComputedListOfObjectAttribute returns a new schema.ListAttribute for objects of the specified type. | ||
// The list is Computed-only. | ||
func DataSourceComputedListOfObjectAttribute[T any](ctx context.Context) schema.ListAttribute { | ||
return schema.ListAttribute{ | ||
CustomType: fwtypes.NewListNestedObjectTypeOf[T](ctx), | ||
Computed: true, | ||
ElementType: types.ObjectType{ | ||
AttrTypes: fwtypes.AttributeTypesMust[T](ctx), | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package framework | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/terraform-plugin-framework/resource/schema" | ||
"github.com/hashicorp/terraform-plugin-framework/types" | ||
fwtypes "github.com/hashicorp/terraform-provider-aws/internal/framework/types" | ||
) | ||
|
||
// NewResourceComputedListOfObjectSchema returns a new schema.ListAttribute for objects of the specified type. | ||
// The list is Computed-only. | ||
func ResourceComputedListOfObjectAttribute[T any](ctx context.Context) schema.ListAttribute { | ||
return schema.ListAttribute{ | ||
CustomType: fwtypes.NewListNestedObjectTypeOf[T](ctx), | ||
Computed: true, | ||
ElementType: types.ObjectType{ | ||
AttrTypes: fwtypes.AttributeTypesMust[T](ctx), | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.