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

Crash while creating COS bucket #4699

Closed
elazarg opened this issue Jul 19, 2023 · 4 comments
Closed

Crash while creating COS bucket #4699

elazarg opened this issue Jul 19, 2023 · 4 comments
Labels
bug crash Panics on provider service/Object Storage Issues related to Cloud Object Storage service/Resource Management Issues related to Resource Manager or Resource controller Issues

Comments

@elazarg
Copy link

elazarg commented Jul 19, 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

Affected Resource(s)

  • ibm_cos_bucket

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_providers {
    ibm = {
      source = "IBM-Cloud/ibm"
    }
  }
}

variable "ibmcloud_api_key" {}
variable "region" {}

provider "ibm" {
  ibmcloud_api_key = var.ibmcloud_api_key
  region = var.region
}

data "ibm_resource_group" "temp_eg" {
  name = "Default"
}

resource "ibm_resource_instance" "cos_instance_eg" {
  name              = "my-cos-instance-${uuid()}"
  resource_group_id = data.ibm_resource_group.temp_eg.id
  service           = "cloud-object-storage"
  plan              = "lite"
  location          = "global"
}

resource "ibm_cos_bucket" "cos_bucket_eg" {
  bucket_name          = "cos-bucket-eg-${uuid()}"
  resource_instance_id = ibm_resource_instance.cos_instance_eg.id
  single_site_location = "ams03"
  storage_class        = "standard"
}

Debug Output

https://gist.github.com/elazarg/1cb03e157e6917ced62de03adb2ff4d4

Panic Output

N/A

Expected Behavior

Resources should be created successfully.

Actual Behavior

Stack trace:

╷
│ Error: Plugin did not respond
│
│   with ibm_cos_bucket.standard-ams03,
│   on cos.tf line 13, in resource "ibm_cos_bucket" "standard-ams03":
│   13: resource "ibm_cos_bucket" "standard-ams03" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.  
╵

Stack trace from the terraform-provider-ibm_v1.55.0.exe plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x29eba0f]

goroutine 136 [running]:
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cos.resourceIBMCOSBucketRead(0xc00056b300, {0x4b40d20?, 0xc0023ac000})
        github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cos/resource_ibm_cos_bucket.go:1172 +0x13af
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cos.resourceIBMCOSBucketUpdate(0xc00056b300, {0x4b40d20?, 0xc0023ac000})
        github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cos/resource_ibm_cos_bucket.go:1022 +0x1bd7
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cos.resourceIBMCOSBucketCreate(0x0?, {0x4b40d20?, 0xc0023ac000})
        github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cos/resource_ibm_cos_bucket.go:1418 +0x1185
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x53fd450?, {0x53fd450?, 0xc0023062d0?}, 0xd?, {0x4b40d20?, 0xc0023ac000?})   
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.0/helper/schema/resource.go:837 +0xa7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc0005cb008, {0x53fd450?, 0xc0023061b0?}, 0xc0000aa780)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.24.0/helper/schema/grpc_provider.go:1021 +0xe3c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc00000d0e0, {0x53fd450?, 0xc001a65aa0?}, 0xc0003edea0)
        github.com/hashicorp/terraform-plugin-go@v0.14.0/tfprotov5/tf5server/server.go:818 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x49b1220?, 0xc00000d0e0}, {0x53fd450, 0xc001a65aa0}, 0xc0003eddc0, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.14.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0006421e0, {0x5405140, 0xc000fce000}, 0xc0021806c0, 0xc0013664b0, 0x7137aa0, 0x0)
        google.golang.org/grpc@v1.53.0/server.go:1336 +0xd13
google.golang.org/grpc.(*Server).handleStream(0xc0006421e0, {0x5405140, 0xc000fce000}, 0xc0021806c0, 0x0)
        google.golang.org/grpc@v1.53.0/server.go:1704 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.53.0/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.53.0/server.go:963 +0x28a

Error: The terraform-provider-ibm_v1.55.0.exe plugin crashed!

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added bug crash Panics on provider service/Object Storage Issues related to Cloud Object Storage service/Resource Management Issues related to Resource Manager or Resource controller Issues labels Jul 19, 2023
@IBM-diksha
Copy link
Collaborator

@elazarg we are looking into this issue and working on a fix for this.
Thank you.

@IBM-diksha
Copy link
Collaborator

@elazarg We have the solution for this issue and it will go along with the next terraform release.
Thank you.

@IBM-diksha
Copy link
Collaborator

@elazarg This issue has been fixed in the latest release for terraform provider version - v1.56.0. Please upgrade to the latest version.
Thank you

@IBM-diksha
Copy link
Collaborator

Closing this issue since the fix has already been released.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash Panics on provider 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