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_is_vpc data source not working anymore #1834

Closed
pauljegouic opened this issue Aug 26, 2020 · 3 comments
Closed

ibm_is_vpc data source not working anymore #1834

pauljegouic opened this issue Aug 26, 2020 · 3 comments

Comments

@pauljegouic
Copy link

Since v1.11

My template

provider ibm {
	region = "eu-de"
	generation = 1
}

data "ibm_is_vpc" "vpc" {
  name = "vpc1"
}

Proof that VPC exists:

➜  tmp2 ic is vpcs    
Listing vpcs for generation 1 compute in all resource groups and region eu-de under account skt-integration as user paul.jegouic@ifsalpha.com...
ID                                     Name   Status      Classic access   Default network ACL                                          Default security group                   Resource group   
156515d7-4086-4534-b01a-93e0345626c2   vpc1   available   false            allow-all-network-acl-156515d7-4086-4534-b01a-93e0345626c2   uncanny-violate-dandruff-stellar-grime   Default   
➜  tmp2 terraform init

Initializing the backend...

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.ibm: version = "~> 1.11"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
➜  tmp2 terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.ibm_is_vpc.vpc: Refreshing state...

Error: rpc error: code = Unavailable desc = transport is closing


panic: interface conversion: vpcclassicv1.SecurityGroupRuleRemoteIntf is nil, not *vpcclassicv1.SecurityGroupRuleRemote
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: goroutine 32 [running]:
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: github.com/IBM-Cloud/terraform-provider-ibm/ibm.classicVpcGetByName(0xc0002ea5b0, 0x2e7d0e0, 0xc00040d200, 0xc0009af0d4, 0x4, 0x1, 0x0)
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/src/github.com/IBM-Cloud/terraform-provider-ibm/ibm/data_source_ibm_is_vpc.go:413 +0x3805
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: github.com/IBM-Cloud/terraform-provider-ibm/ibm.dataSourceIBMISVPCRead(0xc0002ea5b0, 0x2e7d0e0, 0xc00040d200, 0xc0002ea5b0, 0x0)
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/src/github.com/IBM-Cloud/terraform-provider-ibm/ibm/data_source_ibm_is_vpc.go:246 +0xf2
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc0001a0600, 0xc000a2e2e0, 0x2e7d0e0, 0xc00040d200, 0xc0004178d8, 0x1, 0x0)
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/helper/schema/resource.go:398 +0x88
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).ReadDataApply(0xc000845300, 0xc000951a88, 0xc000a2e2e0, 0xc000a2e2e0, 0x0, 0x0)
2020-08-26T13:08:21.269+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/helper/schema/provider.go:451 +0x8f
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadDataSource(0xc00000f530, 0x3462400, 0xc000a2cab0, 0xc000ae6180, 0xc00000f530, 0xc000a2cab0, 0xc000cafb30)
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/internal/helper/plugin/grpc_provider.go:1036 +0x44e
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadDataSource_Handler(0x2ded080, 0xc00000f530, 0x3462400, 0xc000a2cab0, 0xc0000c1c20, 0x0, 0x3462400, 0xc000a2cab0, 0xc000156fc0, 0x10e)
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.6.0/internal/tfplugin5/tfplugin5.pb.go:3225 +0x217
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: google.golang.org/grpc.(*Server).processUnaryRPC(0xc00033b380, 0x347c040, 0xc00033be00, 0xc0003d1100, 0xc0008299b0, 0x43edf90, 0x0, 0x0, 0x0)
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.27.1/server.go:1024 +0x4f4
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: google.golang.org/grpc.(*Server).handleStream(0xc00033b380, 0x347c040, 0xc00033be00, 0xc0003d1100, 0x0)
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.27.1/server.go:1313 +0xd97
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0002204b0, 0xc00033b380, 0x347c040, 0xc00033be00, 0xc0003d1100)
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.27.1/server.go:722 +0xbb
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-08-26T13:08:21.270+0200 [DEBUG] plugin.terraform-provider-ibm_v1.11.0: 	/Users/hkantare/go/pkg/mod/google.golang.org/grpc@v1.27.1/server.go:720 +0xa1
2020-08-26T13:08:21.274+0200 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2020/08/26 13:08:21 [ERROR] <root>: eval: *terraform.EvalReadData, err: rpc error: code = Unavailable desc = transport is closing
2020/08/26 13:08:21 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/08/26 13:08:21 [TRACE] [walkRefresh] Exiting eval tree: data.ibm_is_vpc.vpc
2020/08/26 13:08:21 [TRACE] vertex "data.ibm_is_vpc.vpc": visit complete
2020/08/26 13:08:21 [TRACE] vertex "data.ibm_is_vpc.vpc": dynamic subgraph encountered errors
2020/08/26 13:08:21 [TRACE] vertex "data.ibm_is_vpc.vpc": visit complete
2020/08/26 13:08:21 [TRACE] dag/walk: upstream of "provider.ibm (close)" errored, so skipping
2020-08-26T13:08:21.274+0200 [DEBUG] plugin: plugin process exited: path=/Users/pjegouic/.terraform.d/plugins/darwin_amd64/terraform-provider-ibm_v1.11.0 pid=98460 error="exit status 2"
2020/08/26 13:08:21 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2020/08/26 13:08:21 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
2020-08-26T13:08:21.276+0200 [DEBUG] plugin: plugin exited



!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

SECURITY WARNING: the "crash.log" file that was created may contain 
sensitive information that must be redacted before it is safe to share 
on the issue tracker.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Thanks in advance

@hkantare
Copy link
Collaborator

There are some changes from GO-SDK which break the functionality ...It break in Gen1 but working fine in Gen2
We are working on this and release a minor release

VaishnaviGopal added a commit to VaishnaviGopal/terraform-provider-ibm that referenced this issue Aug 26, 2020
hkantare pushed a commit that referenced this issue Aug 26, 2020
@VaishnaviGopal
Copy link
Collaborator

@pauljegouic
Copy link
Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants