2

So consider the scenario where I have a Data Fusion in version 6.4.1 and I wish to re-deploy it as 6.5.0 version via Terraform (this is just an example, but the problem applies to any update to the Data Fusion instance). In Terraform, this implies simply changing the attribute version attribute. After making this change, when performing a terraform plan the following error is obtained:

| ERROR Get "/v3/namespaces" : unsupported protocol scheme""

This error is obtained for each Terraform CDAP resource created via the Terraform code.

I believe that this error comes from the fact that there is a dependency between a Data Fusion instance and all its CDAP resources that is not considered by the CDAP provider. Is there a way to fix this?

FVCC
  • 262
  • 2
  • 16

1 Answers1

1

I have posted this issue on the official CDAP Terraform repo here. I thought I would share the current solution to the community here.

To solve this, I am forced to remove all CDAP ressources which produce the error using the terraform state rm command. Only after this can Terraform update the instance and re-create all the CDAP resources that have to be re-created due to the fact that the Data Fusion instance needs to be destroyed and recreated. If your tfstate file only contains CDAP resources from one Data Fusion instance, then you can run the following command:

for i in $(terraform state list | grep cdap); do terraform state rm $i; done

Which will remove all CDAP resources. After this, the terraform plan should work.

FVCC
  • 262
  • 2
  • 16