puppetlabs / puppetlabs-azure_arm

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

azure_application resource not working #9

Open sfhardman opened 6 years ago

sfhardman commented 6 years ago

What you expected to happen?

Expected an Azure application registration to be created

What happened?

An error was thrown: Alert: Exception during exists_one. ex is Invalid parameter objectid(:objectid)

How to reproduce it?

Puppet manifest:

  $api_version = '1.6'
  $subscription_id = ####
  $tenant_id = ####

  azure_application { 'Puppet Testing':
    object_id                   => 'd7c58caa-0c7d-4628-8826-4cdf9bb9698a',
    api_version                => $api_version,
    available_to_other_tenants => false,
    display_name               => 'Puppet Testing',
    homepage                   => 'http://localhost:7038',
    oauth2_allow_implicit_flow => true,
    parameters                 => "parameters",
    reply_urls                 => [
      'http://localhost:8038',
      'http://localhost:8039',
    ],
    tenant_id                  => $tenant_id,
  }

Anything else we need to know?

I can successfully provision VM and network resources as per the example in this repo. I started on fixing the issue but there looks to be quite a bit still to be done: https://github.com/sfhardman/puppetlabs-azure_arm/commit/196029f5af1011e6698dc7bef64c876745fdab0d

It would be great if you could flag which of the resources in this module are known good, and which are untested autogenerated code

Versions:

$ puppet --version
4.10.12
$ facter os
{
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "CentOS",
  release => {
    full => "7.5.1804",
    major => "7",
    minor => "5"
  },
  selinux => {
    config_mode => "permissive",
    config_policy => "targeted",
    current_mode => "permissive",
    enabled => true,
    enforced => false,
    policy_version => "31"
  }
}

$ puppet module list
mod 'puppetlabs-azure_arm', '0.1.3'

Logs:

Debug: Runtime environment: puppet_version=4.10.12, ruby_version=2.1.9, run_mode=user, default_encoding=UTF-8
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Could not find locales configuration file for puppetlabs-azure_arm at /tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/locales/config.yaml. Skipping i18n initialization.
Debug: Loading external facts from /home/vagrant/.puppetlabs/opt/puppet/cache/facts.d
Debug: Facter: loading external fact directories from config file
Debug: Facter: fact "facterversion" has resolved to "3.6.10".
Debug: Facter: fact "aio_agent_version" has resolved to "1.10.14".
Debug: Facter: skipping external facts for "/home/vagrant/.puppetlabs/opt/facter/facts.d": No such file or directory
Debug: Facter: skipping external facts for "/home/vagrant/.facter/facts.d": No such file or directory
Debug: Facter: searching "/home/vagrant/.puppetlabs/opt/puppet/cache/facts.d" for external facts.
Debug: Facter: no external facts were found.
Debug: Facter: loading all custom facts.
Debug: Facter: loading custom fact directories from config file
Debug: Facter: fact "agent_specified_environment" resolved to null and will not be added.
Debug: Facter: fact "puppetversion" has resolved to "4.10.12".
Debug: Facter: resolving ruby facts.
Debug: Facter: fact "rubyplatform" has resolved to "x86_64-linux".
Debug: Facter: fact "rubysitedir" has resolved to "/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.1.0".
Debug: Facter: fact "rubyversion" has resolved to "2.1.9".
Debug: Facter: fact "ruby" has resolved to {
  platform => "x86_64-linux",
  sitedir => "/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.1.0",
  version => "2.1.9"
}.
Debug: Facter: resolving path facts.
Debug: Facter: fact "path" has resolved to "/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/puppetlabs/bin:/home/vagrant/.local/bin:/home/vagrant/bin:/sbin".
Debug: Facter: resolving EC2 facts.
Debug: Facter: resolving virtualization facts.
Debug: Facter: resolving desktop management interface facts.
Debug: Facter: /sys/class/dmi/id/board_serial: file could not be read.
Debug: Facter: /sys/class/dmi/id/product_serial: file could not be read.
Debug: Facter: /sys/class/dmi/id/product_uuid: file could not be read.
Debug: Facter: fact "bios_vendor" has resolved to "innotek GmbH".
Debug: Facter: fact "bios_version" has resolved to "VirtualBox".
Debug: Facter: fact "bios_release_date" has resolved to "12/01/2006".
Debug: Facter: fact "boardmanufacturer" has resolved to "Oracle Corporation".
Debug: Facter: fact "boardproductname" has resolved to "VirtualBox".
Debug: Facter: fact "productname" has resolved to "VirtualBox".
Debug: Facter: fact "chassistype" has resolved to "Other".
Debug: Facter: fact "manufacturer" has resolved to "innotek GmbH".
Debug: Facter: fact "dmi" has resolved to {
  bios => {
    release_date => "12/01/2006",
    vendor => "innotek GmbH",
    version => "VirtualBox"
  },
  board => {
    manufacturer => "Oracle Corporation",
    product => "VirtualBox"
  },
  chassis => {
    type => "Other"
  },
  manufacturer => "innotek GmbH",
  product => {
    name => "VirtualBox"
  }
}.
Debug: Facter: executing command: /opt/puppetlabs/puppet/bin/virt-what
Debug: Facter: virt-what: this script must be run as root
Debug: Facter: process exited with status code 1.
Debug: Facter: executing command: vmware -v
Debug: Facter: vmware was not found on the PATH.
Debug: Facter: fact "is_virtual" has resolved to true.
Debug: Facter: fact "virtual" has resolved to "virtualbox".
Debug: Facter: EC2 facts are unavailable: not running under an EC2 instance.
Debug: Facter: resolving GCE facts.
Debug: Facter: not running under a GCE instance.
Debug: Facter: resolving augeas facts.
Debug: Facter: executing command: /opt/puppetlabs/puppet/bin/augparse --version
Debug: Facter: augparse 1.4.0 <http://augeas.net/>
Debug: Facter: completed processing output: closing child pipes.
Debug: Facter: process exited with status code 0.
Debug: Facter: fact "augeasversion" has resolved to "1.4.0".
Debug: Facter: fact "augeas" has resolved to {
  version => "1.4.0"
}.
Debug: Facter: resolving kernel facts.
Debug: Facter: fact "kernel" has resolved to "Linux".
Debug: Facter: fact "kernelrelease" has resolved to "3.10.0-862.9.1.el7.x86_64".
Debug: Facter: fact "kernelmajversion" has resolved to "3.10".
Debug: Facter: fact "kernelversion" has resolved to "3.10.0".
Debug: Facter: resolving operating system facts.
Debug: Facter: executing command: lsb_release -a
Debug: Facter: lsb_release was not found on the PATH.
Debug: Facter: fact "osfamily" has resolved to "RedHat".
Debug: Facter: fact "operatingsystemmajrelease" has resolved to "7".
Debug: Facter: fact "operatingsystemrelease" has resolved to "7.5.1804".
Debug: Facter: fact "hardwaremodel" has resolved to "x86_64".
Debug: Facter: fact "architecture" has resolved to "x86_64".
Debug: Facter: fact "operatingsystem" has resolved to "CentOS".
Debug: Facter: fact "selinux" has resolved to true.
Debug: Facter: fact "selinux_enforced" has resolved to false.
Debug: Facter: fact "selinux_current_mode" has resolved to "permissive".
Debug: Facter: fact "selinux_config_mode" has resolved to "permissive".
Debug: Facter: fact "selinux_config_policy" has resolved to "targeted".
Debug: Facter: fact "selinux_policyversion" has resolved to "31".
Debug: Facter: fact "os" has resolved to {
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "CentOS",
  release => {
    full => "7.5.1804",
    major => "7",
    minor => "5"
  },
  selinux => {
    config_mode => "permissive",
    config_policy => "targeted",
    current_mode => "permissive",
    enabled => true,
    enforced => false,
    policy_version => "31"
  }
}.
Debug: Facter: resolving networking facts.
Debug: Facter: executing command: /usr/sbin/ip route show
Debug: Facter: default via 10.0.2.2 dev enp0s3 proto dhcp metric 100
Debug: Facter: 10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 100
Debug: Facter: process exited with status code 0.
Debug: Facter: executing command: /usr/sbin/ip -6 route show
Debug: Facter: unreachable ::/96 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
Debug: Facter: unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
Debug: Facter: fe80::/64 dev enp0s3 proto kernel metric 100 pref medium
Debug: Facter: fe80::/64 dev enp0s3 proto kernel metric 256 pref medium
Debug: Facter: process exited with status code 0.
Debug: Facter: using the FQDN returned by gethostname: localhost.localdomain.
Debug: Facter: searching "/var/lib/dhclient" for dhclient lease files.
Debug: Facter: searching "/var/lib/dhcp" for dhclient lease files.
Debug: Facter: searching "/var/lib/dhcp3" for dhclient lease files.
Debug: Facter: searching "/var/lib/NetworkManager" for dhclient lease files.
Debug: Facter: searching "/var/db" for dhclient lease files.
Debug: Facter: executing command: dhcpcd -U enp0s3
Debug: Facter: dhcpcd was not found on the PATH.
Debug: Facter: executing command: dhcpcd -U lo
Debug: Facter: dhcpcd was not found on the PATH.
Debug: Facter: executing command: /usr/sbin/ip link show enp0s3
Debug: Facter: 2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
Debug: Facter: link/ether 08:00:27:01:ab:81 brd ff:ff:ff:ff:ff:ff
Debug: Facter: process exited with status code 0.
Debug: Facter: executing command: /usr/sbin/ip link show lo
Debug: Facter: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
Debug: Facter: link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
Debug: Facter: process exited with status code 0.
Debug: Facter: fact "ipaddress_enp0s3" has resolved to "10.0.2.15".
Debug: Facter: fact "ipaddress" has resolved to "10.0.2.15".
Debug: Facter: fact "netmask_enp0s3" has resolved to "255.255.255.0".
Debug: Facter: fact "netmask" has resolved to "255.255.255.0".
Debug: Facter: fact "network_enp0s3" has resolved to "10.0.2.0".
Debug: Facter: fact "network" has resolved to "10.0.2.0".
Debug: Facter: fact "ipaddress6_enp0s3" has resolved to "fe80::a00:27ff:fe01:ab81".
Debug: Facter: fact "ipaddress6" has resolved to "fe80::a00:27ff:fe01:ab81".
Debug: Facter: fact "netmask6_enp0s3" has resolved to "ffff:ffff:ffff:ffff::".
Debug: Facter: fact "netmask6" has resolved to "ffff:ffff:ffff:ffff::".
Debug: Facter: fact "network6_enp0s3" has resolved to "fe80::".
Debug: Facter: fact "network6" has resolved to "fe80::".
Debug: Facter: fact "macaddress_enp0s3" has resolved to "08:00:27:01:ab:81".
Debug: Facter: fact "macaddress" has resolved to "08:00:27:01:ab:81".
Debug: Facter: fact "mtu_enp0s3" has resolved to 1500.
Debug: Facter: fact "ipaddress_lo" has resolved to "127.0.0.1".
Debug: Facter: fact "netmask_lo" has resolved to "255.0.0.0".
Debug: Facter: fact "network_lo" has resolved to "127.0.0.0".
Debug: Facter: fact "ipaddress6_lo" has resolved to "::1".
Debug: Facter: fact "netmask6_lo" has resolved to "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff".
Debug: Facter: fact "network6_lo" has resolved to "::1".
Debug: Facter: fact "mtu_lo" has resolved to 65536.
Debug: Facter: fact "hostname" has resolved to "localhost".
Debug: Facter: fact "domain" has resolved to "localdomain".
Debug: Facter: fact "fqdn" has resolved to "localhost.localdomain".
Debug: Facter: fact "interfaces" has resolved to "enp0s3,lo".
Debug: Facter: fact "networking" has resolved to {
  domain => "localdomain",
  fqdn => "localhost.localdomain",
  hostname => "localhost",
  interfaces => {
    enp0s3 => {
      bindings => [
        {
          address => "10.0.2.15",
          netmask => "255.255.255.0",
          network => "10.0.2.0"
        }
      ],
      bindings6 => [
        {
          address => "fe80::a00:27ff:fe01:ab81",
          netmask => "ffff:ffff:ffff:ffff::",
          network => "fe80::"
        }
      ],
      ip => "10.0.2.15",
      ip6 => "fe80::a00:27ff:fe01:ab81",
      mac => "08:00:27:01:ab:81",
      mtu => 1500,
      netmask => "255.255.255.0",
      netmask6 => "ffff:ffff:ffff:ffff::",
      network => "10.0.2.0",
      network6 => "fe80::"
    },
    lo => {
      bindings => [
        {
          address => "127.0.0.1",
          netmask => "255.0.0.0",
          network => "127.0.0.0"
        }
      ],
      bindings6 => [
        {
          address => "::1",
          netmask => "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
          network => "::1"
        }
      ],
      ip => "127.0.0.1",
      ip6 => "::1",
      mtu => 65536,
      netmask => "255.0.0.0",
      netmask6 => "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
      network => "127.0.0.0",
      network6 => "::1"
    }
  },
  ip => "10.0.2.15",
  ip6 => "fe80::a00:27ff:fe01:ab81",
  mac => "08:00:27:01:ab:81",
  mtu => 1500,
  netmask => "255.255.255.0",
  netmask6 => "ffff:ffff:ffff:ffff::",
  network => "10.0.2.0",
  network6 => "fe80::",
  primary => "enp0s3"
}.
Debug: Facter: resolving disk facts.
Debug: Facter: fact "blockdevice_sda_vendor" has resolved to "ATA".
Debug: Facter: fact "blockdevice_sda_model" has resolved to "VBOX HARDDISK".
Debug: Facter: fact "blockdevice_sda_size" has resolved to 85899345920.
Debug: Facter: fact "blockdevices" has resolved to "sda".
Debug: Facter: fact "disks" has resolved to {
  sda => {
    model => "VBOX HARDDISK",
    size => "80.00 GiB",
    size_bytes => 85899345920,
    vendor => "ATA"
  }
}.
Debug: Facter: resolving processor facts.
Debug: Facter: executing command: /usr/bin/uname -p
Debug: Facter: x86_64
Debug: Facter: process exited with status code 0.
Debug: Facter: fact "hardwareisa" has resolved to "x86_64".
Debug: Facter: fact "processorcount" has resolved to 2.
Debug: Facter: fact "physicalprocessorcount" has resolved to 1.
Debug: Facter: fact "processor0" has resolved to "Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz".
Debug: Facter: fact "processor1" has resolved to "Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz".
Debug: Facter: fact "processors" has resolved to {
  count => 2,
  isa => "x86_64",
  models => [
    "Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz",
    "Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz"
  ],
  physicalcount => 1
}.
Debug: Facter: resolving uptime facts.
Debug: Facter: fact "uptime_seconds" has resolved to 1743.
Debug: Facter: fact "uptime_hours" has resolved to 0.
Debug: Facter: fact "uptime_days" has resolved to 0.
Debug: Facter: fact "uptime" has resolved to "0:29 hours".
Debug: Facter: fact "system_uptime" has resolved to {
  days => 0,
  hours => 0,
  seconds => 1743,
  uptime => "0:29 hours"
}.
Debug: Facter: resolving id facts.
Debug: Facter: fact "id" has resolved to "vagrant".
Debug: Facter: fact "gid" has resolved to "vagrant".
Debug: Facter: fact "identity" has resolved to {
  gid => 1000,
  group => "vagrant",
  privileged => false,
  uid => 1000,
  user => "vagrant"
}.
Debug: Facter: resolving timezone facts.
Debug: Facter: fact "timezone" has resolved to "NZST".
Debug: Facter: resolving file system facts.
Debug: Facter: fact "mountpoints" has resolved to {
  / => {
    available => "48.45 GiB",
    available_bytes => 52022439936,
    capacity => "3.05%",
    device => "/dev/mapper/centos-root",
    filesystem => "xfs",
    options => [
      "rw",
      "seclabel",
      "relatime",
      "attr2",
      "inode64",
      "noquota"
    ],
    size => "49.98 GiB",
    size_bytes => 53660876800,
    used => "1.53 GiB",
    used_bytes => 1638436864
  },
  /boot => {
    available => "842.65 MiB",
    available_bytes => 883580928,
    capacity => "16.90%",
    device => "/dev/sda1",
    filesystem => "xfs",
    options => [
      "rw",
      "seclabel",
      "relatime",
      "attr2",
      "inode64",
      "noquota"
    ],
    size => "1014.00 MiB",
    size_bytes => 1063256064,
    used => "171.35 MiB",
    used_bytes => 179675136
  },
  /dev/shm => {
    available => "942.28 MiB",
    available_bytes => 988053504,
    capacity => "0%",
    device => "tmpfs",
    filesystem => "tmpfs",
    options => [
      "rw",
      "seclabel",
      "nosuid",
      "nodev"
    ],
    size => "942.28 MiB",
    size_bytes => 988053504,
    used => "0 bytes",
    used_bytes => 0
  },
  /home => {
    available => "27.95 GiB",
    available_bytes => 30007775232,
    capacity => "0.11%",
    device => "/dev/mapper/centos-home",
    filesystem => "xfs",
    options => [
      "rw",
      "seclabel",
      "relatime",
      "attr2",
      "inode64",
      "noquota"
    ],
    size => "27.98 GiB",
    size_bytes => 30041706496,
    used => "32.36 MiB",
    used_bytes => 33931264
  },
  /run => {
    available => "933.78 MiB",
    available_bytes => 979136512,
    capacity => "0.90%",
    device => "tmpfs",
    filesystem => "tmpfs",
    options => [
      "rw",
      "seclabel",
      "nosuid",
      "nodev",
      "mode=755"
    ],
    size => "942.28 MiB",
    size_bytes => 988053504,
    used => "8.50 MiB",
    used_bytes => 8916992
  },
  /run/user/1000 => {
    available => "188.46 MiB",
    available_bytes => 197611520,
    capacity => "0%",
    device => "tmpfs",
    filesystem => "tmpfs",
    options => [
      "rw",
      "seclabel",
      "nosuid",
      "nodev",
      "relatime",
      "size=192980k",
      "mode=700",
      "uid=1000",
      "gid=1000"
    ],
    size => "188.46 MiB",
    size_bytes => 197611520,
    used => "0 bytes",
    used_bytes => 0
  },
  /sys/fs/cgroup => {
    available => "942.28 MiB",
    available_bytes => 988053504,
    capacity => "0%",
    device => "tmpfs",
    filesystem => "tmpfs",
    options => [
      "ro",
      "seclabel",
      "nosuid",
      "nodev",
      "noexec",
      "mode=755"
    ],
    size => "942.28 MiB",
    size_bytes => 988053504,
    used => "0 bytes",
    used_bytes => 0
  }
}.
Debug: Facter: fact "filesystems" has resolved to "xfs".
Debug: Facter: fact "partitions" has resolved to {
  /dev/mapper/centos-home => {
    mount => "/home",
    size => "27.99 GiB",
    size_bytes => 30056382464
  },
  /dev/mapper/centos-root => {
    mount => "/",
    size => "50.00 GiB",
    size_bytes => 53687091200
  },
  /dev/mapper/centos-swap => {
    size => "1.00 GiB",
    size_bytes => 1073741824
  },
  /dev/sda1 => {
    mount => "/boot",
    size => "1.00 GiB",
    size_bytes => 1073741824
  },
  /dev/sda2 => {
    size => "79.00 GiB",
    size_bytes => 84824555520
  }
}.
Debug: Facter: resolving memory facts.
Debug: Facter: fact "memoryfree" has resolved to "1.48 GiB".
Debug: Facter: fact "memoryfree_mb" has resolved to 1515.2.
Debug: Facter: fact "memorysize" has resolved to "1.84 GiB".
Debug: Facter: fact "memorysize_mb" has resolved to 1884.56.
Debug: Facter: fact "swapfree" has resolved to "1.00 GiB".
Debug: Facter: fact "swapfree_mb" has resolved to 1024.
Debug: Facter: fact "swapsize" has resolved to "1.00 GiB".
Debug: Facter: fact "swapsize_mb" has resolved to 1024.
Debug: Facter: fact "memory" has resolved to {
  swap => {
    available => "1.00 GiB",
    available_bytes => 1073737728,
    capacity => "0%",
    total => "1.00 GiB",
    total_bytes => 1073737728,
    used => "0 bytes",
    used_bytes => 0
  },
  system => {
    available => "1.48 GiB",
    available_bytes => 1588801536,
    capacity => "19.60%",
    total => "1.84 GiB",
    total_bytes => 1976107008,
    used => "369.36 MiB",
    used_bytes => 387305472
  }
}.
Debug: Facter: resolving load_average facts.
Debug: Facter: fact "load_averages" has resolved to {
  15m => 0.05,
  1m => 0,
  5m => 0.02
}.
Debug: Facter: resolving Xen facts.
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Could not find locales configuration file for puppetlabs-azure_arm at /tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/locales/config.yaml. Skipping i18n initialization.
Debug: importing '/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/profile/manifests/azure_arm_puppet.pp' in environment production
Debug: Automatically imported profile::azure_arm_puppet from profile/azure_arm_puppet into production
Notice: Compiled catalog for localhost.localdomain in environment production in 0.18 seconds
Debug: Creating default schedules
Debug: Loaded state in 0.00 seconds
Debug: Loaded state in 0.00 seconds
Debug: Loaded transaction store file in 0.00 seconds
Info: Applying configuration version '1535493187'
Info: exists_one for resource Puppet Testing of type <no value>
Info: Calling operation Applications_Get
Alert: Exception during exists_one. ex is Invalid parameter objectid(:objectid) and backtrace is ["/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:640:in `[]'", "/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:293:in `block in invoke_get_one'", "/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:281:in `each'", "/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:281:in `invoke_get_one'", "/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:336:in `exists_one'", "/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:332:in `exists?'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in `retrieve'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in `retrieve_resource'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:300:in `from_resource'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:233:in `apply'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:249:in `eval_resource'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'", "/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'", "/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'", "/opt/puppetlabs/bin/puppet:5:in `<main>'"]
Error: /Stage[main]/Profile::Azure_arm_puppet/Azure_application[Puppet Testing]: Could not evaluate: Invalid parameter objectid(:objectid)
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:640:in `[]'
/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:293:in `block in invoke_get_one'
/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:281:in `each'
/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:281:in `invoke_get_one'
/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:336:in `exists_one'
/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:332:in `exists?'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in `retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in `retrieve_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:300:in `from_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:233:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:249:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:507:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:506:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:224:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:348:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:306:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:662:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
Debug: Class[Profile::Azure_arm_puppet]: Resource is being skipped, unscheduling all events
Debug: Stage[main]: Resource is being skipped, unscheduling all events
Debug: Finishing transaction 21768920
Debug: Storing state
Debug: Stored state in 0.00 seconds
Notice: Applied catalog in 0.02 seconds
Debug: Applying settings catalog for sections reporting, metrics
Debug: Finishing transaction 37651580
Debug: Received report to process from localhost.localdomain
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Processing report from localhost.localdomain with processor Puppet::Reports::Store
sheenaajay commented 6 years ago

Thank you @sfhardman for the valuable comment. Could you please verify your manifests on this branch. This branch contains the temporary fix. Thanks again for your time. https://github.com/sheenaajay/puppetlabs-azure_arm/tree/fixforapplication

sfhardman commented 6 years ago

The updated branch gets a bit further but now errors with:

Alert: Exception during create. The state of the resource is unknown. ex is undefined method ``[]=' for nil:NilClass and backtrace is ["/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:350:in ``block in add_keys_to_request'", "/tmp/vagrant-puppet/modules-0a26a273e7687a678beb88197201a9d1/azure_arm/lib/puppet/provider/azure_application/azure_application.rb:350:in ``each'"

This is because self.call_op does not handle POST requests. A fix for this is in:

https://github.com/sfhardman/puppetlabs-azure_arm/commit/196029f5af1011e6698dc7bef64c876745fdab0d#diff-3a3343e5074d09091d1c9a0e756f38cdR383

sheenaajay commented 6 years ago

@sfhardman Thanks alot for your contribution.