terraform-provider-ibm
terraform-provider-ibm copied to clipboard
ibm_cr_namespace doesn't have region input, always creates in global region
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
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
- ibm_cr_namespace
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
resource "ibm_cr_namespace" "cr_namespace" {
name = var.cr_namespace
resource_group_id = data.ibm_resource_group.rg.id
}
Expected Behavior
There should be a way to set what region the container registry namespace gets created in. It defaults to global. You can put the CR in a resource group, but resource groups have are not region specific.
Actual Behavior
Since there are no options for region, it creates the namespace in the global region.
References
Just a guess, but perhaps is uses the region passed into the provider block?
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
}
the terraform config i'm using is located here: https://github.com/IBM/document-extraction-toolkit/blob/main/terraform/cr.tf
in main.tf, the provider was actually set to us-east (in my schematics workspace variable).