terraform-provider-rancher icon indicating copy to clipboard operation
terraform-provider-rancher copied to clipboard

Add insecure to Rancher provider

Open bartwalczak1 opened this issue 7 years ago • 7 comments

Hi there,

This is a feature request to skip cert validation. It would be nice to have something similar to what's in OCP provider: https://www.terraform.io/docs/providers/opc/index.html#insecure

Terraform Version

Terraform v0.11.8

  • provider.aws v1.28.0
  • provider.null v1.0.0
  • provider.rancher v1.2.1
  • provider.template v1.0.0

Affected Resource(s)

Please list the resources as a list, for example:

  • opc_instance
  • opc_storage_volume

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

provider "rancher" {
  api_url    = "${var.rancher_url}"
  access_key = "${var.rancher_access_key}"
  secret_key = "${var.rancher_secret_key}"
}

Expected Behavior

What should have happened?

Actual Behavior


Error: Error refreshing state: 1 error(s) occurred:

* module.customerA.module.rancher.provider.rancher: Get https://rancher.eng.cloud.xyz.com/v3: x509: certificate signed by unknown authority

bartwalczak1 avatar Aug 21 '18 10:08 bartwalczak1

The go-rancher library doesn't support this at the moment as far as I can tell, so it'd need to be implemented there first.

raphink avatar Oct 18 '18 14:10 raphink

Does anybody has a workaround for that? Would a self signed certificate work?

marceloonit avatar Oct 26 '18 12:10 marceloonit

Let's encrypt?

raphink avatar Oct 26 '18 15:10 raphink

To use Let's encrypt I must have a valid domain (correct if I am wrong please) ... my deploy is just for testing purposes, I don't want to use a valid domain.

marceloonit avatar Oct 26 '18 18:10 marceloonit

Yes, a valid domain is required for let's encrypt.

raphink avatar Oct 29 '18 06:10 raphink

same here, using rancher 2.1 and Terraform v0.11.11

  • provider.rancher v1.2.1

mihai-satmarean avatar Mar 07 '19 11:03 mihai-satmarean

You can add the insecure cert or the CA to your trusted certs and that should work.

Edit: Just use insecure=true in the provider.

jawadqur avatar Oct 21 '19 21:10 jawadqur