Closed cjschaef closed 9 months ago
Here's what I had to do, in order to get the direct
endpoint for COS Config to be used when I was trying to create a new COS Bucket
https://github.com/cjschaef/terraform-provider-ibm/blob/f72b2cb6965c9f87726a2b93c8d7faf5a5ef1a65/ibm/service/cos/resource_ibm_cos_bucket.go#L1149-L1158
sess, err := meta.(conns.ClientSession).CosConfigV1API()
if err != nil {
return err
}
if endpointType == "private" {
sess.SetServiceURL("https://config.private.cloud-object-storage.cloud.ibm.com/v1")
}
if endpointType == "direct" {
sess.SetServiceURL("https://config.direct.cloud-object-storage.cloud.ibm.com/v1")
}
@IBM-diksha Can you look into this
@cjschaef Thank you for reaching out I am looking into this one.
This issues has been fixed in the latest version - v1.60.0. Here is the PR : https://github.com/IBM-Cloud/terraform-provider-ibm/pull/4919
Closing the issue.
Community Note
Terraform CLI and Terraform IBM Provider Version
TF: 1.3.7 (I believe) IBM TF: 1.56.0
Affected Resource(s)
Terraform 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
COS Config endpoint generated only allows for private override, no direct endpoint. https://github.com/IBM-Cloud/terraform-provider-ibm/blob/0b2c15e4362b70dc1c4adf3996cd20447edae6c8/ibm/service/cos/resource_ibm_cos_bucket.go#L1149-L1162
However, VPC VPE's only allow the use of COS direct endpoints in an isolated environment, making the use of Private invalid.
Panic Output
Expected Behavior
Creation of COS resources (buckets/objects)
Actual Behavior
Failure, wrong COS endpoint used (for example, COS Config is only either public or private, no direct gets automatically generated).
Steps to Reproduce
Important Factoids
References