RavinderReddyF5 / terraform-provider-bigip-version0.12

Terraform resources that can configure F5 BIGIP products
Mozilla Public License 2.0
0 stars 0 forks source link

[CLOSED] Added Support to SSL Certificate/Key Import module #206

Open RavinderReddyF5 opened 4 years ago

RavinderReddyF5 commented 4 years ago

Issue by RavinderReddyF5 Friday Oct 25, 2019 at 12:32 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/pull/175



RavinderReddyF5 included the following code: https://github.com/terraform-providers/terraform-provider-bigip/pull/175/commits

RavinderReddyF5 commented 4 years ago

Comment by dannyk81 Friday Oct 25, 2019 at 13:32 GMT


@RavinderReddyF5 I'm not sure if this is a good approach here, providers shouldn't be accessing artifacts (i.e. files) on the disk directly, instead the content should be either stored in the config in the form of a heredoc in a variable or loaded by terraform itself using the file(path) function and content stored in the state from which the provider will retrieve it.

an example for this is how irule content is currently implemented, you can define the irule code in a variable (heredoc) or load it from a file (file(irule.tcl)) and it's very useful and flexible.

allowing the provider to read file content directly doesn't seem like the optimal approach here since it limits some of the flexibility that terraform provides when working with this kind of content.

Bu getting the certificate from state through terraform config (variable with heredoc content or file(path)) you achieve the same with better flexibility to the end user.

RavinderReddyF5 commented 4 years ago

Comment by RavinderReddyF5 Wednesday Oct 30, 2019 at 10:25 GMT


@dannyk81 Updated to use terraform file function