data/aws_bedrock_foundation_model: modelLifecycle attribute not exposed
#47,779 opened on May 6, 2026
Repository metrics
- Stars
- (11,045 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description
The aws_bedrock_foundation_model data source does not expose the modelLifecycle attribute (including modelLifecycle.status) returned by the AWS API.
This makes it impossible to filter foundation models by their lifecycle state (e.g. ACTIVE) in Terraform/OpenTofu, which is possible via AWS CLI:
aws bedrock list-foundation-models | jq '[.modelSummaries[] | select(.modelLifecycle.status == "ACTIVE") | .modelId]'
While the aws_bedrock_inference_profiles data source does expose the modelLifecycle attribute, this is not up to date aws-side and contains deprecated models. Therefore it would be nice to make the attribute available for the aws_bedrock_foundation_model data source as well.
Affected Resource(s) or Data Source(s)
-
aws_bedrock_foundation_model
-
aws_bedrock_foundation_models
Potential Terraform Configuration
Potential Terraform Configuration
data "aws_bedrock_foundation_models" "all" {}
locals {
active_models = [
for model in data.aws_bedrock_foundation_models.all.model_summaries :
model.model_id
if model.model_lifecycle_status == "ACTIVE" # <-- attribute does not exist yet
]
}
### References
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListFoundationModels.html
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_FoundationModelSummary.html
### Would you like to implement the enhancement?
No