puppetlabs / puppetlabs-azure_arm

The Puppet Azure ARM Module
Apache License 2.0
4 stars 16 forks source link

Azure load balancer backend pools having issues as nic are not attaching #19

Closed akkirao closed 5 years ago

akkirao commented 5 years ago

What you expected to happen?

need to attach nic or vms to backend pool

What happened?

Its creating just name of the backendpool but not adding nic or vms

How to reproduce it?

Anything else we need to know?

Versions:

$ puppet apply <manifest in question> --debug --trace

$ puppet --version
6.04
$ facter os
{
  architecture => "amd64",
  distro => {
    codename => "bionic",
    description => "Ubuntu 18.04.1 LTS",
    id => "Ubuntu",
    release => {
      full => "18.04",
      major => "18.04"
    }
  },
  family => "Debian",
  hardware => "x86_64",
  name => "Ubuntu",
  release => {
    full => "18.04",
    major => "18.04"
  },
  selinux => {
    enabled => false
  }
}
$ puppet module list

Logs:

Paste any relevant logs from a puppet run and syslog/messages
akkirao commented 5 years ago

manifest class azuremanager::eastus::loadbalancer::puppetloadbalancer inherits azuremanager {

        azure_load_balancer {'puppetlb':
            ensure => present,
            location => 'eastus',
            resource_group_name => 'PUPPET-RG',
            properties => {
            backendAddressPools =>  [{
            name => 'test',
            properties  => {
            backendIPConfigurations  =>[ {
            id => "/subscriptions/xxx/resourceGroups/PUPPET-RG/providers/Microsoft.Network/networkInterfaces/puppet-nic/ipconfigurations/puppet-nic-ipconfig",
                properties   => {
                    subnet => {
                        properties => {
                            interfaceEndpoints => [{
                                properties => {
                                    networkInterfaces => [{
                                        id         => "/subscriptions/xxx/resourceGroups/PUPPET-RG/providers/Microsoft.Network/networkInterfaces/puppet-nic",
                                        properties => {
                                            virtualMachine => {
                                                id => "/subscriptions/xxx/resourceGroups/PUPPET-RG/providers/Microsoft.Compute/virtualMachines/testvm",
                                            },
                                        }
                                    }],
                                }
                            }],
                        }
                    },
                },
               }],
              },
              }],
            frontendIPConfigurations => [ {
            name  => 'LoadBalancerFrontEnd',
            properties => {
            publicIPAddress => {
            name         => 'testip',
            id  => "/subscriptions/xxxxx/resourceGroups/PUPPET-RG/providers/Microsoft.Network/publicIPAddresses/testip",
            properties  => {
            publicIPAllocationMethod => 'Dynamic',
               }
                }
                    }
                }],
            probes   => [{
            name   => 'testlbprobe',
            properties => {
            intervalInSeconds  => '5',
            port               => '80',
            protocol           => 'TCP',
                  }
            }],

            loadBalancingRules => [ {
            name => 'test-lb-rule',
            properties    => {
            backendAddressPool  => {
            id => "/subscriptions/xxxx/resourceGroups/PUPPET-RG/providers/Microsoft.Network/loadBalancers/puppetlb/backendAddressPools/test",
            },
            backendPort         => '999',
            frontendIPConfiguration => {
            id => "/subscriptions/xxx/resourceGroups/PUPPET-RG/providers/Microsoft.Network/loadBalancers/puppetlb/frontendIPConfigurations/LoadBalancerFrontEnd",
            },
            frontendPort        => '999',
            protocol            => 'TCP',
            probe               => {
            id => "/subscriptions/xxx/resourceGroups/PUPPET-RG/providers/Microsoft.Network/loadBalancers/puppetlb/probes/testlbprobe",
            },
            }
                }],
            }
    }

}