terraform-provider-awscc
terraform-provider-awscc copied to clipboard
bedrock_guardrail: policy config not required in schema, but required to apply
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
- The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.
Terraform CLI and Terraform AWS Cloud Control Provider Version
- terraform cli :
Terraform v1.7.4 on darwin_amd64
- Provider version :
registry.terraform.io/hashicorp/awscc v0.75.0
Affected Resource(s)
- awscc_bedrock_guardrail
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
resource "awscc_bedrock_guardrail" "example" {
name = "example-guardrail"
blocked_input_messaging = "Blocked input"
blocked_outputs_messaging = "blocked output"
}
Debug Output
2024-05-01T10:25:25.568-0400 [DEBUG] skipping FixUpBlockAttrs
2024-05-01T10:25:25.698-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: Marking Computed attributes with null configuration values as unknown (known after apply) in the plan to prevent potential Terraform errors: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:196 tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_resource_type=awscc_bedrock_guardrail tf_rpc=PlanResourceChange @module=sdk.framework timestamp=2024-05-01T10:25:25.698-0400
2024-05-01T10:25:25.698-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @module=sdk.framework tf_attribute_path="AttributeName(\"guardrail_id\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_rpc=PlanResourceChange tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 timestamp=2024-05-01T10:25:25.698-0400
2024-05-01T10:25:25.698-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_resource_type=awscc_bedrock_guardrail tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 @module=sdk.framework tf_attribute_path="AttributeName(\"tags\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc timestamp=2024-05-01T10:25:25.698-0400
2024-05-01T10:25:25.698-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_resource_type=awscc_bedrock_guardrail tf_rpc=PlanResourceChange @module=sdk.framework tf_attribute_path="AttributeName(\"created_at\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc timestamp=2024-05-01T10:25:25.698-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_attribute_path="AttributeName(\"topic_policy_config\")" tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_resource_type=awscc_bedrock_guardrail @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_rpc=PlanResourceChange timestamp=2024-05-01T10:25:25.698-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_attribute_path="AttributeName(\"version\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_resource_type=awscc_bedrock_guardrail @module=sdk.framework tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_rpc=PlanResourceChange timestamp=2024-05-01T10:25:25.698-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @module=sdk.framework tf_attribute_path="AttributeName(\"guardrail_arn\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_resource_type=awscc_bedrock_guardrail timestamp=2024-05-01T10:25:25.698-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 @module=sdk.framework tf_attribute_path="AttributeName(\"sensitive_information_policy_config\")" tf_resource_type=awscc_bedrock_guardrail tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_rpc=PlanResourceChange timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: tf_attribute_path="AttributeName(\"kms_key_arn\")" tf_resource_type=awscc_bedrock_guardrail tf_rpc=PlanResourceChange @module=sdk.framework tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_provider_addr=registry.terraform.io/hashicorp/awscc timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_attribute_path="AttributeName(\"word_policy_config\")" tf_rpc=PlanResourceChange timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @module=sdk.framework tf_attribute_path="AttributeName(\"content_policy_config\")" tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_rpc=PlanResourceChange timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_rpc=PlanResourceChange tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 @module=sdk.framework tf_attribute_path="AttributeName(\"description\")" timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_resource_type=awscc_bedrock_guardrail tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_attribute_path="AttributeName(\"status\")" @module=sdk.framework timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: tf_resource_type=awscc_bedrock_guardrail tf_attribute_path="AttributeName(\"failure_recommendations\")" @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_rpc=PlanResourceChange @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_attribute_path="AttributeName(\"status_reasons\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 @module=sdk.framework tf_rpc=PlanResourceChange timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @module=sdk.framework tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_attribute_path="AttributeName(\"id\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_resource_type=awscc_bedrock_guardrail tf_rpc=PlanResourceChange timestamp=2024-05-01T10:25:25.699-0400
2024-05-01T10:25:25.699-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: marking computed attribute that is null in the config as unknown: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_planresourcechange.go:420 tf_attribute_path="AttributeName(\"updated_at\")" tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=385f7063-ab18-26b5-0f1b-f88c82f49a80 tf_rpc=PlanResourceChange @module=sdk.framework tf_resource_type=awscc_bedrock_guardrail timestamp=2024-05-01T10:25:25.699-0400
awscc_bedrock_guardrail.example: Creating...
2024-05-01T10:25:25.703-0400 [INFO] Starting apply for awscc_bedrock_guardrail.example
2024-05-01T10:25:25.703-0400 [DEBUG] skipping FixUpBlockAttrs
2024-05-01T10:25:25.703-0400 [DEBUG] awscc_bedrock_guardrail.example: applying the planned Create change
2024-05-01T10:25:25.704-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: Request.Plan.Raw: cfn_type=AWS::Bedrock::Guardrail tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f tf_rpc=ApplyResourceChange value="tftypes.Object[\"blocked_input_messaging\":tftypes.String, \"blocked_outputs_messaging\":tftypes.String, \"content_policy_config\":tftypes.Object[\"filters_config\":tftypes.List[tftypes.Object[\"input_strength\":tftypes.String, \"output_strength\":tftypes.String, \"type\":tftypes.String]]], \"created_at\":tftypes.String, \"description\":tftypes.String, \"failure_recommendations\":tftypes.List[tftypes.String], \"guardrail_arn\":tftypes.String, \"guardrail_id\":tftypes.String, \"id\":tftypes.String, \"kms_key_arn\":tftypes.String, \"name\":tftypes.String, \"sensitive_information_policy_config\":tftypes.Object[\"pii_entities_config\":tftypes.List[tftypes.Object[\"action\":tftypes.String, \"type\":tftypes.String]], \"regexes_config\":tftypes.List[tftypes.Object[\"action\":tftypes.String, \"description\":tftypes.String, \"name\":tftypes.String, \"pattern\":tftypes.String]]], \"status\":tftypes.String, \"status_reasons\":tftypes.List[tftypes.String], \"tags\":tftypes.List[tftypes.Object[\"key\":tftypes.String, \"value\":tftypes.String]], \"topic_policy_config\":tftypes.Object[\"topics_config\":tftypes.List[tftypes.Object[\"definition\":tftypes.String, \"examples\":tftypes.List[tftypes.String], \"name\":tftypes.String, \"type\":tftypes.String]]], \"updated_at\":tftypes.String, \"version\":tftypes.String, \"word_policy_config\":tftypes.Object[\"managed_word_lists_config\":tftypes.List[tftypes.Object[\"type\":tftypes.String]], \"words_config\":tftypes.List[tftypes.Object[\"text\":tftypes.String]]]]<\"blocked_input_messaging\":tftypes.String<\"Blocked input\">, \"blocked_outputs_messaging\":tftypes.String<\"blocked output\">, \"content_policy_config\":tftypes.Object[\"filters_config\":tftypes.List[tftypes.Object[\"input_strength\":tftypes.String, \"output_strength\":tftypes.String, \"type\":tftypes.String]]]<unknown>, \"created_at\":tftypes.String<unknown>, \"description\":tftypes.String<unknown>, \"failure_recommendations\":tftypes.List[tftypes.String]<unknown>, \"guardrail_arn\":tftypes.String<unknown>, \"guardrail_id\":tftypes.String<unknown>, \"id\":tftypes.String<unknown>, \"kms_key_arn\":tftypes.String<unknown>, \"name\":tftypes.String<\"example-guardrail\">, \"sensitive_information_policy_config\":tftypes.Object[\"pii_entities_config\":tftypes.List[tftypes.Object[\"action\":tftypes.String, \"type\":tftypes.String]], \"regexes_config\":tftypes.List[tftypes.Object[\"action\":tftypes.String, \"description\":tftypes.String, \"name\":tftypes.String, \"pattern\":tftypes.String]]]<unknown>, \"status\":tftypes.String<unknown>, \"status_reasons\":tftypes.List[tftypes.String]<unknown>, \"tags\":tftypes.List[tftypes.Object[\"key\":tftypes.String, \"value\":tftypes.String]]<unknown>, \"topic_policy_config\":tftypes.Object[\"topics_config\":tftypes.List[tftypes.Object[\"definition\":tftypes.String, \"examples\":tftypes.List[tftypes.String], \"name\":tftypes.String, \"type\":tftypes.String]]]<unknown>, \"updated_at\":tftypes.String<unknown>, \"version\":tftypes.String<unknown>, \"word_policy_config\":tftypes.Object[\"managed_word_lists_config\":tftypes.List[tftypes.Object[\"type\":tftypes.String]], \"words_config\":tftypes.List[tftypes.Object[\"text\":tftypes.String]]]<unknown>>" tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/terraform-provider-awscc/internal/generic/resource.go:348 @module=awscc tf_provider_addr=registry.terraform.io/hashicorp/awscc timestamp=2024-05-01T10:25:25.704-0400
2024-05-01T10:25:25.704-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: CloudControl DesiredState: @module=awscc cfn_type=AWS::Bedrock::Guardrail tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f tf_rpc=ApplyResourceChange value="{\"BlockedInputMessaging\":\"Blocked input\",\"BlockedOutputsMessaging\":\"blocked output\",\"Name\":\"example-guardrail\"}" @caller=github.com/hashicorp/terraform-provider-awscc/internal/generic/resource.go:361 tf_resource_type=awscc_bedrock_guardrail timestamp=2024-05-01T10:25:25.704-0400
2024-05-01T10:25:25.705-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: HTTP Request Sent: @caller=github.com/hashicorp/aws-sdk-go-base/[email protected]/logging/tf_logger.go:45 cfn_type=AWS::Bedrock::Guardrail http.request.header.amz_sdk_request="attempt=1; max=25" net.peer.name=cloudcontrolapi.us-east-1.amazonaws.com tf_provider_addr=registry.terraform.io/hashicorp/awscc http.request.header.amz_sdk_invocation_id=36ad3201-e0c2-4489-9e3c-6e52881350ab tf_resource_type=awscc_bedrock_guardrail http.request_content_length=232 rpc.method=CreateResource rpc.service=CloudControl tf_aws.signing_region="" @module=awscc http.request.header.x_amz_security_token="*****" http.request.header.x_amz_target=CloudApiService.CreateResource http.url=https://cloudcontrolapi.us-east-1.amazonaws.com/ http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.7.4 (+https://www.terraform.io) terraform-provider-awscc/dev (+https://registry.terraform.io/providers/hashicorp/awscc) aws-sdk-go-v2/1.26.1 os/macos lang/go#1.22.0 md/GOOS#darwin md/GOARCH#amd64 api/cloudcontrol#1.18.4" rpc.system=aws-api aws.region=us-east-1 tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************RXCX/20240501/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" http.request.header.content_type=application/x-amz-json-1.0 http.method=POST
http.request.body=
| {"ClientToken":"terraform-20240501142525704700000001","DesiredState":"{\"BlockedInputMessaging\":\"Blocked input\",\"BlockedOutputsMessaging\":\"blocked output\",\"Name\":\"example-guardrail\"}","TypeName":"AWS::Bedrock::Guardrail"}
http.request.header.x_amz_date=20240501T142525Z tf_aws.sdk=aws-sdk-go-v2 tf_rpc=ApplyResourceChange timestamp=2024-05-01T10:25:25.705-0400
2024-05-01T10:25:26.058-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: HTTP Response Received: tf_rpc=ApplyResourceChange cfn_type=AWS::Bedrock::Guardrail http.response_content_length=191 rpc.service=CloudControl rpc.system=aws-api tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_resource_type=awscc_bedrock_guardrail rpc.method=CreateResource tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f http.duration=352
http.response.body=
| {"ProgressEvent":{"EventTime":1.71457352605E9,"Operation":"CREATE","OperationStatus":"IN_PROGRESS","RequestToken":"6b4933ef-6494-4136-ac3a-b9d662a16c8b","TypeName":"AWS::Bedrock::Guardrail"}}
http.response.header.content_type=application/x-amz-json-1.0 http.response.header.date="Wed, 01 May 2024 14:25:26 GMT" @module=awscc aws.region=us-east-1 http.status_code=200 tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" @caller=github.com/hashicorp/aws-sdk-go-base/[email protected]/logging/tf_logger.go:45 http.response.header.connection=keep-alive http.response.header.x_amzn_requestid=d973523b-098d-4773-a836-2cba301b4d39 timestamp=2024-05-01T10:25:26.058-0400
2024-05-01T10:25:26.059-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: HTTP Request Sent: tf_aws.signing_region="" rpc.service=CloudControl tf_aws.sdk=aws-sdk-go-v2
http.request.body=
| {"RequestToken":"6b4933ef-6494-4136-ac3a-b9d662a16c8b"}
http.request.header.content_type=application/x-amz-json-1.0 http.request.header.x_amz_security_token="*****" http.request.header.x_amz_target=CloudApiService.GetResourceRequestStatus http.url=https://cloudcontrolapi.us-east-1.amazonaws.com/ tf_provider_addr=registry.terraform.io/hashicorp/awscc @module=awscc rpc.method=GetResourceRequestStatus rpc.system=aws-api tf_rpc=ApplyResourceChange http.request.header.amz_sdk_request="attempt=1; max=25" http.request_content_length=55 tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f http.method=POST http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.7.4 (+https://www.terraform.io) terraform-provider-awscc/dev (+https://registry.terraform.io/providers/hashicorp/awscc) aws-sdk-go-v2/1.26.1 os/macos lang/go#1.22.0 md/GOOS#darwin md/GOARCH#amd64 api/cloudcontrol#1.18.4" tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/aws-sdk-go-base/[email protected]/logging/tf_logger.go:45 aws.region=us-east-1 http.request.header.amz_sdk_invocation_id=ecfe3b53-da3b-4a06-872a-921dc7783c00 cfn_type=AWS::Bedrock::Guardrail http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************RXCX/20240501/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" http.request.header.x_amz_date=20240501T142526Z net.peer.name=cloudcontrolapi.us-east-1.amazonaws.com timestamp=2024-05-01T10:25:26.059-0400
2024-05-01T10:25:26.116-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: HTTP Response Received: http.response_content_length=191 tf_aws.sdk=aws-sdk-go-v2 tf_rpc=ApplyResourceChange http.response.header.date="Wed, 01 May 2024 14:25:26 GMT" cfn_type=AWS::Bedrock::Guardrail http.duration=56 http.response.header.connection=keep-alive http.status_code=200 http.response.header.x_amzn_requestid=e9e5a957-1c48-4e5c-9b85-16d66f27ed05 rpc.method=GetResourceRequestStatus rpc.system=aws-api tf_aws.signing_region="" tf_resource_type=awscc_bedrock_guardrail @module=awscc aws.region=us-east-1
http.response.body=
| {"ProgressEvent":{"EventTime":1.71457352605E9,"Operation":"CREATE","OperationStatus":"IN_PROGRESS","RequestToken":"6b4933ef-6494-4136-ac3a-b9d662a16c8b","TypeName":"AWS::Bedrock::Guardrail"}}
http.response.header.content_type=application/x-amz-json-1.0 rpc.service=CloudControl tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f @caller=github.com/hashicorp/aws-sdk-go-base/[email protected]/logging/tf_logger.go:45 timestamp=2024-05-01T10:25:26.115-0400
2024-05-01T10:25:31.117-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: HTTP Request Sent: http.request.header.x_amz_target=CloudApiService.GetResourceRequestStatus http.request_content_length=55 http.url=https://cloudcontrolapi.us-east-1.amazonaws.com/ rpc.system=aws-api http.request.header.amz_sdk_request="attempt=1; max=25" http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************RXCX/20240501/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.7.4 (+https://www.terraform.io) terraform-provider-awscc/dev (+https://registry.terraform.io/providers/hashicorp/awscc) aws-sdk-go-v2/1.26.1 os/macos lang/go#1.22.0 md/GOOS#darwin md/GOARCH#amd64 api/cloudcontrol#1.18.4" tf_aws.signing_region="" tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f http.request.header.x_amz_date=20240501T142531Z net.peer.name=cloudcontrolapi.us-east-1.amazonaws.com tf_resource_type=awscc_bedrock_guardrail
http.request.body=
| {"RequestToken":"6b4933ef-6494-4136-ac3a-b9d662a16c8b"}
http.request.header.x_amz_security_token="*****" tf_rpc=ApplyResourceChange tf_provider_addr=registry.terraform.io/hashicorp/awscc @caller=github.com/hashicorp/aws-sdk-go-base/[email protected]/logging/tf_logger.go:45 aws.region=us-east-1 rpc.service=CloudControl rpc.method=GetResourceRequestStatus tf_aws.sdk=aws-sdk-go-v2 @module=awscc cfn_type=AWS::Bedrock::Guardrail http.method=POST http.request.header.amz_sdk_invocation_id=721605e2-8707-4a92-b9d0-ec0b207f6b64 http.request.header.content_type=application/x-amz-json-1.0 timestamp=2024-05-01T10:25:31.117-0400
2024-05-01T10:25:31.178-0400 [DEBUG] provider.terraform-provider-awscc_v0.75.0_x5: HTTP Response Received: http.response.header.content_type=application/x-amz-json-1.0 rpc.system=aws-api cfn_type=AWS::Bedrock::Guardrail http.response.header.connection=keep-alive http.duration=60 rpc.service=CloudControl tf_aws.signing_region="" tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f tf_resource_type=awscc_bedrock_guardrail @caller=github.com/hashicorp/aws-sdk-go-base/[email protected]/logging/tf_logger.go:45 @module=awscc tf_rpc=ApplyResourceChange tf_provider_addr=registry.terraform.io/hashicorp/awscc
http.response.body=
| {"ProgressEvent":{"ErrorCode":"InvalidRequest","EventTime":1.714573526538E9,"Operation":"CREATE","OperationStatus":"FAILED","RequestToken":"6b4933ef-6494-4136-ac3a-b9d662a16c8b","StatusMessage":"Guardrail must have at least one policy. (Service: Bedrock, Status Code: 400, Request ID: 374c0794-2240-463e-90b9-167adacb137c)","TypeName":"AWS::Bedrock::Guardrail"}}
http.response_content_length=362 http.status_code=200 http.response.header.x_amzn_requestid=305adff3-f820-42b9-be5a-0764b826896d rpc.method=GetResourceRequestStatus tf_aws.sdk=aws-sdk-go-v2 aws.region=us-east-1 http.response.header.date="Wed, 01 May 2024 14:25:31 GMT" timestamp=2024-05-01T10:25:31.178-0400
2024-05-01T10:25:31.178-0400 [ERROR] provider.terraform-provider-awscc_v0.75.0_x5: Response contains error diagnostic: diagnostic_detail="Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED. StatusMessage: Guardrail must have at least one policy. (Service: Bedrock, Status Code: 400, Request ID: 374c0794-2240-463e-90b9-167adacb137c). ErrorCode: InvalidRequest" diagnostic_severity=ERROR tf_proto_version=6.4 tf_req_id=534c6c79-b79c-2276-4d6a-5281ae24541f @caller=github.com/hashicorp/[email protected]/tfprotov6/internal/diag/diagnostics.go:58 @module=sdk.proto diagnostic_summary="AWS SDK Go Service Operation Incomplete" tf_provider_addr=registry.terraform.io/hashicorp/awscc tf_resource_type=awscc_bedrock_guardrail tf_rpc=ApplyResourceChange timestamp=2024-05-01T10:25:31.178-0400
2024-05-01T10:25:31.201-0400 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2024-05-01T10:25:31.201-0400 [ERROR] vertex "awscc_bedrock_guardrail.example" error: AWS SDK Go Service Operation Incomplete
╷
│ Error: AWS SDK Go Service Operation Incomplete
│
│ with awscc_bedrock_guardrail.example,
│ on main.tf line 1, in resource "awscc_bedrock_guardrail" "example":
│ 1: resource "awscc_bedrock_guardrail" "example" {
│
│ Waiting for Cloud Control API service CreateResource operation completion
│ returned: waiter state transitioned to FAILED. StatusMessage: Guardrail must
│ have at least one policy. (Service: Bedrock, Status Code: 400, Request ID:
│ 374c0794-2240-463e-90b9-167adacb137c). ErrorCode: InvalidRequest
╵
2024-05-01T10:25:31.230-0400 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-01T10:25:31.235-0400 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/awscc/0.75.0/darwin_amd64/terraform-provider-awscc_v0.75.0_x5 pid=28656
2024-05-01T10:25:31.235-0400 [DEBUG] provider: plugin exited
Panic Output
Expected Behavior
Expected the Terraform plan to fail on this as there was no policy configuration specified. I haven't checked the Cloudformation resource behavior.
Actual Behavior
Terraform apply fails when only the required inputs are provided. The error makes and I would assume that a policy configuraiton is required for a guardrail which is the same behavior from the AWS console.
│ Error: AWS SDK Go Service Operation Incomplete
│
│ with awscc_bedrock_guardrail.example,
│ on main.tf line 1, in resource "awscc_bedrock_guardrail" "example":
│ 1: resource "awscc_bedrock_guardrail" "example" {
│
│ Waiting for Cloud Control API service CreateResource operation completion
│ returned: waiter state transitioned to FAILED. StatusMessage: Guardrail must
│ have at least one policy. (Service: Bedrock, Status Code: 400, Request ID:
│ 374c0794-2240-463e-90b9-167adacb137c). ErrorCode: InvalidRequest
Steps to Reproduce
-
terraform apply
Important Factoids
None.