diff --git a/docs/resources/bedrock_blueprint.md b/docs/resources/bedrock_blueprint.md index c0440fd11c..3a22793751 100644 --- a/docs/resources/bedrock_blueprint.md +++ b/docs/resources/bedrock_blueprint.md @@ -1,5 +1,4 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "awscc_bedrock_blueprint Resource - terraform-provider-awscc" subcategory: "" description: |- @@ -10,7 +9,39 @@ description: |- Definition of AWS::Bedrock::Blueprint Resource Type - +## Example Usage + +### Custom Blueprints for documents +Create a custom blueprint for intelligent document processing with Bedrock Data Automation +```terraform +resource "awscc_bedrock_blueprint" "example" { + blueprint_name = "example-blueprint" + type = "DOCUMENT" + schema = jsonencode({ + "$schema" : "http://json-schema.org/draft-07/schema#", + "description" : "default", + "class" : "default", + "type" : "object", + "definitions" : {}, + "properties" : { + "gross_pay_this_period" : { + "type" : "number", + "inferenceType" : "explicit", + "instruction" : "The gross pay for this pay period from the Earnings table" + }, + "net_pay" : { + "type" : "number", + "inferenceType" : "explicit", + "instruction" : "The net pay for this pay period from the bottom of the document" + } + } + }) + tags = [{ + key = "ModifiedBy" + value = "AWSCC" + }] +} +``` ## Schema diff --git a/examples/resources/awscc_bedrock_blueprint/bedrock_document_blueprint.tf b/examples/resources/awscc_bedrock_blueprint/bedrock_document_blueprint.tf new file mode 100644 index 0000000000..839dc5bd0c --- /dev/null +++ b/examples/resources/awscc_bedrock_blueprint/bedrock_document_blueprint.tf @@ -0,0 +1,23 @@ +resource "awscc_bedrock_blueprint" "example" { + blueprint_name = "example-blueprint" + type = "DOCUMENT" + schema = jsonencode({ + "$schema" : "http://json-schema.org/draft-07/schema#", + "description" : "default", + "class" : "default", + "type" : "object", + "definitions" : {}, + "properties" : { + "gross_pay_this_period" : { + "type" : "number", + "inferenceType" : "explicit", + "instruction" : "The gross pay for this pay period from the Earnings table" + }, + "net_pay" : { + "type" : "number", + "inferenceType" : "explicit", + "instruction" : "The net pay for this pay period from the bottom of the document" + } + } + }) +} \ No newline at end of file diff --git a/templates/resources/bedrock_blueprint.md.tmpl b/templates/resources/bedrock_blueprint.md.tmpl new file mode 100644 index 0000000000..dc5b8cffc2 --- /dev/null +++ b/templates/resources/bedrock_blueprint.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage + +### Custom Blueprints for documents +Create a custom blueprint for intelligent document processing with Bedrock Data Automation +{{ tffile (printf "examples/resources/%s/bedrock_document_blueprint.tf" .Name)}} + +{{ .SchemaMarkdown | trimspace }} +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" .ImportFile }} + +{{- end }} \ No newline at end of file