hashicorp/terraform-provider-aws

data/aws_bedrock_foundation_model: modelLifecycle attribute not exposed

Aperta

#47.779 aperta il 6 mag 2026

 (3 commenti) (1 reazione) (0 assegnatari)Go (10.312 fork)github user discovery
enhancementgood first issueservice/bedrock

Metriche repository

Star
 (11.045 stelle)
Metriche merge PR
 (Merge medio 19g 21h) (251 PR mergiate in 30 g)

Descrizione

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

Guida contributor