Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibm_cos_bucket data lookup is throwing NoSuchWebsiteConfiguration in new version 1.58.0 #4838

Closed
akocbek opened this issue Oct 3, 2023 · 2 comments
Assignees
Labels
service/Object Storage Issues related to Cloud Object Storage service/Resource Management Issues related to Resource Manager or Resource controller Issues

Comments

@akocbek
Copy link

akocbek commented Oct 3, 2023

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

terraform -v
Terraform v1.5.7
on darwin_amd64
+ provider registry.terraform.io/ibm-cloud/ibm v1.58.0

Affected Resource(s)

  • ibm_cos_bucket (data source)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

terraform {
  required_version = ">= 1.3, < 1.6"
  required_providers {
    ibm = {
      source  = "IBM-Cloud/ibm"
      version = "1.58.0"
    }
  }
}

provider "ibm" {
  ibmcloud_api_key = var.ibmcloud_api_key
}

variable "ibmcloud_api_key" {
  type            = string
  description = "The IBM Cloud API Token"
  sensitive     = true
}

resource "ibm_resource_group" "resourceGroup" {
  name     = "test-cos-rg"
}
resource "ibm_resource_instance" "cos_instance" {
  name                       = "test_cos_ins"
  resource_group_id = ibm_resource_group.resourceGroup.id
  service                    = "cloud-object-storage"
  plan                         = "standard"
  location                   = "global"
  tags                         = ["test"]
}

resource "ibm_cos_bucket" "cos_bucket" {
  bucket_name              = "test-c-b"
  resource_instance_id = ibm_resource_instance.cos_instance.id
  region_location           = "us-south"
  storage_class              = "standard"
}

data "ibm_cos_bucket" "cos_bucket" {
  bucket_name              = "test-c-b"
  resource_instance_id = ibm_resource_instance.cos_instance.id
  bucket_type                = "region_location"
  bucket_region             = "us-south"
}

output test {
    value = data.ibm_cos_bucket.cos_bucket
}

Debug Output

https://gist.github.com/akocbek/b2c425c672e045463ee4a329e1677b1c

Panic Output

Expected Behavior

Data lookup should return the bucket details. It is working with previous ibm provider version

Actual Behavior

Error is thrown

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: NoSuchWebsiteConfiguration: The specified bucket does not have a website configuration
│ 	status code: 404, request id: f149a4e5-9feb-434e-90d5-2d574943508a, host id: 
│ 
│   with data.ibm_cos_bucket.cos_bucket,
│   on main.tf line 42, in data "ibm_cos_bucket" "cos_bucket":
│   42: data "ibm_cos_bucket" "cos_bucket" {
│ 
╵

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added service/Object Storage Issues related to Cloud Object Storage service/Resource Management Issues related to Resource Manager or Resource controller Issues labels Oct 3, 2023
@IBM-diksha
Copy link
Collaborator

This issue has been fixed in the latest fix release(v1.58.1).Please upgrade to the latest version.
thank you.
https://github.com/IBM-Cloud/terraform-provider-ibm/releases/tag/v1.58.1

@akocbek
Copy link
Author

akocbek commented Oct 4, 2023

Can confirm that using v1.58.1 is working fine. Thank you @IBM-diksha

@akocbek akocbek closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Object Storage Issues related to Cloud Object Storage service/Resource Management Issues related to Resource Manager or Resource controller Issues
Projects
None yet
Development

No branches or pull requests

2 participants