0

I'm trying to replicate existing AWS WAF and ACL configuration into Terraform so that going forward, the config of the WAF rules etc can be controlled and monitored via Terraform.

The idea being that further configuration can be added via a Terraform Repo's deployment.

I've looked at the import options but I haven't been able to locate any specific resources to allow the WAF config to be exported. I've mainly come across EC2 examples.

Is there a tool within Terraform or another tool which will allow me to pull the current WAF data as TF code so that I can begin editing from there or do I have to replicate this configuration manually first and then run "terraform plan" command to check that nothing is due to be changed? (This would confirm that the code matches the current config)

Thanks in advance

User61622
  • 1
  • 1
  • 1
    I would start by importing the WAF rules with very little configuration in your Terraform, then run `terraform plan` to see what the difference is, which basically shows you the exact configuration you need to add into your .tf file. – Mark B Jun 30 '22 at 12:57
  • That's a clever way to start. I'll give that a go and see what comes of it. Much appreciated! – User61622 Jun 30 '22 at 13:58

0 Answers0