Guest User

Untitled

a guest
Oct 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function resource (literals, func) {
  2. console.log(`resource ${literals[0]} ${func()} ${literals[1]}`);
  3. }
  4.  
  5. function ip_set_descriptors (literals, func) {
  6. return `ip_set_descriptors ${literals[0]} ${func()} ${literals[1]}`;
  7. }
  8.  
  9. const ips = ['209.171.43.251', '54.55.73.82'];
  10.  
  11. resource `"aws_waf_ipset" "crc_office" {
  12. name = "dev-crc-office-waf-ipset"
  13.  
  14. ${() => ips.map(ip => (
  15. ip_set_descriptors `{
  16. type = "IPV4"
  17. value = ${() => ip}/32
  18. }`
  19. ))}
  20. }`
Add Comment
Please, Sign In to add comment