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

alicloud_fc_custom_domain cert_config not support ssl in alicloud #6935

Open
jackykwan-eventx opened this issue Feb 2, 2024 · 0 comments
Open

Comments

@jackykwan-eventx
Copy link

Hi there,

Affected Resource(s)

Please list the resources as a list, for example:

  • alicloud_fc_custom_domain

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

panic: runtime error: index out of range [0] with length 0

goroutine 42 [running]:
github.com/aliyun/terraform-provider-alicloud/alicloud.resourceAlicloudFCCustomDomainRead(0xc0030aa4d0, {0x7877500?, 0xc000640800?})
        github.com/aliyun/terraform-provider-alicloud/alicloud/resource_alicloud_fc_custom_domain.go:195 +0x6fe
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc001659540, 0xc00309c370, {0x7877500, 0xc000640800})
        github.com/hashicorp/terraform-plugin-sdk@v1.17.2/helper/schema/resource.go:470 +0x1aa
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc00000ec98, {0xc0000607e0?, 0x53f006?}, 0xc0000607e0)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/helper/plugin/grpc_provider.go:535 +0x34b
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler({0x707eea0?, 0xc00000ec98}, {0x8367038, 0xc003098180}, 0xc0030aa000, 0x0)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/tfplugin5/tfplugin5.pb.go:3269 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000001e0, {0x83ba2a8, 0xc001690b60}, 0xc0001a6000, 0xc0020a0b70, 0xefe62b0, 0x0)
        google.golang.org/grpc@v1.56.3/server.go:1335 +0xde3
google.golang.org/grpc.(*Server).handleStream(0xc0000001e0, {0x83ba2a8, 0xc001690b60}, 0xc0001a6000, 0x0)
        google.golang.org/grpc@v1.56.3/server.go:1712 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.1()
        google.golang.org/grpc@v1.56.3/server.go:947 +0xca
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.56.3/server.go:958 +0x15c

Error: The terraform-provider-alicloud_v1.216.0 plugin crashed!

Expected Behavior

What should have happened?
alicloud_fc_custom_domain should natively support use aliyun cert without manual download and hardcode cert & private key

Actual Behavior

What actually happened?
cert_config only support hardcode cert, also if manual add in console, terraform will panic, result in we must delete the resource and manage by console only

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. create resource alicloud_fc_custom_domain with http
resource "alicloud_fc_custom_domain" "eventx_filmart_webapp" {
  domain_name = "a.domain.com"
  protocol    = "HTTP"
  route_config {
    path          = "/*"
    service_name  = alicloud_fcv2_function.resource_name.service_name
    function_name = alicloud_fcv2_function.resource_name.function_name
  }
}
  1. Add HTTPS with SSL cert in alicloud
  2. terraform plan will panic as https://github.com/aliyun/terraform-provider-alicloud/blob/master/alicloud/resource_alicloud_fc_custom_domain.go#L186-L203 cannot find oldConfig
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

1 participant