redteaminfra / redteam-infra

100 stars 25 forks source link

elk doesn't get VPC name #40

Closed tophertimzen closed 5 years ago

tophertimzen commented 5 years ago

Right now we have a redundant line in the hosts file for elk as we cannot get the VPC name for elk during deployment with puppet.

This is done in the elk site.pp in external/aws/op/elkServer/puppet/manifests/site.pp

   elasticsearch::instance { 'es-01':
    config => {
      'network.host' => 'elk.infra.us',
    }   
  }   

  class { 'logstash':
    logstash_group  => 'adm',
    settings => {
      'http.host' => 'elk.infra.us',
    }   
  }

We need a way to make the network and http host variables in that file not tied to elk.infra.us and get the name of the VPC. If we can't, we should make better note of why we do this in hosts as it lead to confusion and resulted in https://github.com/redteaminfra/redteam-infra/commit/d93f117a1922163778190dead32b4692a48f029b

tophertimzen commented 5 years ago

I am not sure if this is possible and we modified this heavily in https://github.com/redteaminfra/redteam-infra/commit/4cc454d72fb1f206a6cfd4c81ef9f05af5960ccf. Closing for now.