You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Observed in 1.59.0, but can be applied to other versions as well
Affected Resource(s)
Observed bug in ibm_cd_toolchain, but can also be applied to other resources
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
ibmcloud_api_key="APIKEY"region="eu-es"
Debug Output
Example output follows. Note the value of the location property in the output, and note the region set in the above config
Since provider version 1.59.0 does not support eu-es in the CD toolchain service, the expected behaviour would be to produce a panic with a descriptive error informing the user that the region is invalid.
Actual Behavior
The provider falls back to the default service region, which in our case is us-south, and proceeds to create the resource.
Steps to Reproduce
Create a terraform project and use terraform provider version 1.59.0.
Create a terraform.tfvars file and define region as eu-es and ibmcloud_api_key as your production IAM API key.
NOTE: running the steps in terraform provider version 1.60.0 and above produces the correct output, because this is when we added eu-es as a valid region. This is why the problem only exists in older provider versions.
Important Factoids
We did our own investigation, this is the problematic code https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/ibm/conns/config.go#L3162-L3174 . The service Go SDK is correctly identifying the region as invalid and is producing an error, but the terraform provider catches this error and purposely sets the service URL to the default one. While this may make sense for platform services, it introduces problems for regional services. The example I provided in the issue is specific to the toolchain service, but I believe that it extends to all other regional IBM Cloud services.
References
N/A
The text was updated successfully, but these errors were encountered:
Community Note
Terraform CLI and Terraform IBM Provider Version
Observed in
1.59.0
, but can be applied to other versions as wellAffected Resource(s)
Observed bug in
ibm_cd_toolchain
, but can also be applied to other resourcesTerraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Example output follows. Note the value of the
location
property in the output, and note theregion
set in the above configPanic Output
N/A
Expected Behavior
Since provider version
1.59.0
does not supporteu-es
in the CD toolchain service, the expected behaviour would be to produce a panic with a descriptive error informing the user that the region is invalid.Actual Behavior
The provider falls back to the default service region, which in our case is
us-south
, and proceeds to create the resource.Steps to Reproduce
1.59.0
.terraform.tfvars
file and defineregion
as eu-es andibmcloud_api_key
as your production IAM API key.terraform apply
NOTE: running the steps in terraform provider version
1.60.0
and above produces the correct output, because this is when we addedeu-es
as a valid region. This is why the problem only exists in older provider versions.Important Factoids
We did our own investigation, this is the problematic code https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/ibm/conns/config.go#L3162-L3174 . The service Go SDK is correctly identifying the region as invalid and is producing an error, but the terraform provider catches this error and purposely sets the service URL to the default one. While this may make sense for platform services, it introduces problems for regional services. The example I provided in the issue is specific to the toolchain service, but I believe that it extends to all other regional IBM Cloud services.
References
N/A
The text was updated successfully, but these errors were encountered: