Skip to content

ibm_container_api_key_reset: skip api-key reset if a key exists #6468

@Aashiq-J

Description

@Aashiq-J

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

Description

Currently, the ibm_container_api_key_reset function resets the containers-kubernetes-key even if a valid key already exists for the specified region and resource group. This behavior can lead to an accumulation of API keys, especially in environments with a large number of clusters, potentially hitting the account's API key limit.

To address this, we developed a custom script
that checks for existing keys associated with a specific region and resource group and skips the reset if an appropriate key is already present.

Would it be possible to incorporate this logic into the provider itself to prevent the creation of redundant containers-kubernetes-keys?

New or Affected Resource(s)

  • ibm_container_api_key_reset

Potential Terraform Configuration

resource "ibm_container_api_key_reset" "reset_api_key" {
  region            = "ca-tor"
  resource_group_id ="xx-xx-xx"
}

References

  • #0000

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions