hashicorp/terraform-provider-aws

data/aws_bedrock_foundation_model: modelLifecycle attribute not exposed

Aberta

#47.779 aberto em 6 de mai. de 2026

 (3 comentários) (1 reação) (0 responsável)Go (10.312 forks)github user discovery
enhancementgood first issueservice/bedrock

Métricas do repositório

Stars
 (11.045 estrelas)
Métricas de merge de PR
 (Mesclagem média 19d 21h) (251 fundiu PRs em 30d)

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

Guia do colaborador