f5devcentral / terraform-aws-bigip-module

This Repo has been Archived, and moved to: https://github.com/F5Networks/terraform-aws-bigip-module for Supported Module
3 stars 8 forks source link

Customize run-time-init script #45

Closed yossi-r closed 3 years ago

yossi-r commented 3 years ago

Trying to use the module in an environment where i need to pass some custom tmsh commands. you can see the customized file here - https://github.com/grf5/f5_bigip_aws_gwlb/blob/main/multi-nic/vpcs/bigip_runtime_init_user_data.tpl

please add a way to customize the runtime init config file. ideal way for me would be if i could pass the config file from the parent module (that calls the bigip-module)

yossi-r commented 3 years ago

see example code here - https://github.com/yossi-r/terraform-aws-bigip-module/blob/master/main.tf#L391

JeffGiroux commented 3 years ago

It looks like Azure exposes the template as variable in the azure bigip tf module. see below

https://github.com/f5devcentral/terraform-azure-bigip-module/blob/295dc0e5dedb6a4d84088b45ee597b21e1d43203/main.tf#L239

Need something similar in all clouds...

data "template_file" "init_file1" {
  count    = var.az_key_vault_authentication ? 1 : 0
  template = file("${path.module}/${var.script_name}.tpl")