IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
336 stars 645 forks source link

ibm_cos_bucket doesn't have the right value for `s3_endpoint_public` when `endpoint_type` is set to private #5404

Closed akocbek closed 2 days ago

akocbek commented 1 month ago

Community Note

When we create ibm_cos_bucket resource using ibm provider and we set endpoint_type to private then s3_endpoint_public has private endpoint instead of public.

"s3_endpoint_direct" = "s3.direct.us-south.cloud-object-storage.appdomain.cloud"
"s3_endpoint_private" = "s3.private.us-south.cloud-object-storage.appdomain.cloud"
"s3_endpoint_public" = "s3.private.us-south.cloud-object-storage.appdomain.cloud"

Terraform CLI and Terraform IBM Provider Version

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.

resource "ibm_resource_group" "resource_group" {
  name     = "a-test-rg"
}

resource "ibm_resource_instance" "cos_instance" {
  name              = "a-test-cos-instance"
  resource_group_id = resource.ibm_resource_group.resource_group.id
  service           = "cloud-object-storage"
  plan              = "standard"
  location          = "global"
}

resource "ibm_cos_bucket" "cos_bucket_test" {
  resource_instance_id  =  resource.ibm_resource_instance.cos_instance.id
  bucket_name           = "a-test-cos-bucket"
  region_location       = "us-south"
  endpoint_type = "private"
}

output ibm_cos_bucket {
    value = ibm_cos_bucket.cos_bucket_test
}

Debug Output

https://gist.github.com/akocbek/4e181df0042eb670f158461e55c24f4e

Panic Output

Expected Behavior

s3_endpoint_public output variable should have public endpoint, when endpoint_type input variable is set to private

Actual Behavior

s3_endpoint_public output variable has private endpoint, when endpoint_type input variable is set to private

Steps to Reproduce

  1. terraform apply

Important Factoids

References

IBM-diksha commented 4 weeks ago

@akocbek We are looking into this. Thank you.

IBM-Deeksha commented 3 weeks ago

@akocbek We have investigated the issue and have identified the root cause. Our team is currently working on a solution. We'll keep you updated on our progress.

IBM-Deeksha commented 2 weeks ago

Fix delivered in beta release. Thank you for reporting.

IBM-diksha commented 2 days ago

Closing the Issue as the fix has been delivered. Thank you.

akocbek commented 1 day ago

@IBM-Deeksha thank you