terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

missing terraform data source for oci_containerengine_cluster

Open europ opened this issue 1 year ago • 0 comments

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 "me too" comments, 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

Description

Missing terraform data source for one specific oci_containerengine_cluster.

New or Affected Resource(s)

  • oci_containerengine_cluster

Potential Terraform Configuration

EXPECTED:

data "oci_containerengine_cluster" "specific_containerengine_cluster" {
  oke_cluster_id = var.oke_cluster_id
}

ACTUAL (workaround):

data "oci_containerengine_clusters" "all_oke_clusters" {
  compartment_id = var.compartment_id
}

locals {
  specific_containerengine_cluster = one([
    for oke_cluster in data.oci_containerengine_clusters.all_oke_clusters.clusters:
    oke_cluster if
    oke_cluster.id == var.oke_cluster_id
  ])
}

References

  • https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/containerengine_clusters

europ avatar Oct 31 '23 08:10 europ