scastria / terraform-provider-apigee

Mozilla Public License 2.0
21 stars 19 forks source link

Adding CERTFile for Truststore is not supported. #26

Closed NAbiKeerthana closed 2 years ago

NAbiKeerthana commented 3 years ago

Hello @scastria ,

"I tried to push a certfile to my apigee truststore, but it seems the apigee terraform provider does not allow it, can you confirm ? do you have any idea how I can achieve my goal ? Otherwise, can I add this capability and raise a pull request". Could you please help me with it ?

Thanks in advance !

scastria commented 3 years ago

I need to see the TerraForm resource config you tried to apply and the log output from TF_LOG=Debug.

NAbiKeerthana commented 3 years ago

Hi @scastria ,

Thanks for the prompt response. Please find below the resources:

resource "apigee_keystore" "apigeeKeystore" { environment_name = var.environment_name name = join("",["keystore" , var.randomSuffix ]) }

resource "apigee_alias" "alliancePKIAlias" { environment_name = var.environment_name alias = "alliancePKI-Truststore-alias-poc" keystore_name = apigee_keystore.alliancePKI.name format="keycertfile" cert_file="certs/Vectury_CA_G2.crt" ignore_expiry_validation=true }

resource "apigee_reference" "alliancePKI-ref" { environment_name = var.environment_name name = "alliancePKI-ref" refers = apigee_keystore.alliancePKI.name resource_type = "KeyStore" }

But this has created an alias instead of truststore: image

Kindly help me to achieve the required implementation in Apigee. Thanks in advance !

scastria commented 3 years ago

The apigee provider does not currently support adding certs to an existing keystore. Feel free to submit a PR.

NAbiKeerthana commented 3 years ago

Hello @scastria I have added the implementation and I generated the "terraform-provider-apigee" file using commands $ go mod tidy $ go build -o terraform-provider-apigee

and included it as a plugin to my Terraform project and while running my CICD pipeline, am getting the below issue. Could you please help me to resolve this issue ?

image

scastria commented 3 years ago

This screenshot refers to the “younes apigee” provider at version 99. That is not mine. I control the “scastria apigee” provider. Therefore, I don’t know what you are doing and can’t help you.