citrix / terraform-provider-citrixadc

Part of NetScaler Automation Toolkit | https://github.com/netscaler/automation-toolkit
https://registry.terraform.io/providers/citrix/citrixadc
Apache License 2.0
118 stars 58 forks source link

[BUG] snmpmanager imcomplete #1076

Open adc-nerd opened 1 year ago

adc-nerd commented 1 year ago

Bug Report

Describe the bug SNMP Managers (citrixadc_snmpmanager) not fully set.

To Reproduce Steps to reproduce the behaviour:

  1. ressource file
    resource "citrixadc_snmpmanager" "tf_snmp01" {
    ipaddress          = "1.1.1.1"
    }
    resource "citrixadc_snmpmanager" "tf_snmp02" {
    ipaddress          = "1.1.1.2"
    }
    resource "citrixadc_snmpmanager" "tf_snmp03" {
    ipaddress          = "1.1.1.3"
    }
    resource "citrixadc_snmpmanager" "tf_snmp04" {
    ipaddress          = "1.1.1.4"
    }
    resource "citrixadc_snmpmanager" "tf_snmp05" {
    ipaddress          = "1.1.1.5"
    }
    resource "citrixadc_snmpmanager" "tf_snmp06" {
    ipaddress          = "1.1.1.6"
    }
    resource "citrixadc_snmpmanager" "tf_snmp07" {
    ipaddress          = "1.1.1.7"
    }
    resource "citrixadc_snmpmanager" "tf_snmp08" {
    ipaddress          = "1.1.1.8"
    }
    resource "citrixadc_snmpmanager" "tf_snmp09" {
    ipaddress          = "1.1.1.9"
    }
    resource "citrixadc_snmpmanager" "tf_snmp10" {
    ipaddress          = "1.1.1.10"
    }
    resource "citrixadc_snmpmanager" "tf_snmp11" {
    ipaddress          = "1.1.1.11"
    }
    resource "citrixadc_snmpmanager" "tf_snmp12" {
    ipaddress          = "1.1.1.12"
    }
  2. which terraform command I am getting the error
    terrafrom apply
  3. Terraform output
    
    ...
    Error: Provider produced inconsistent result after apply

When applying changes to citrixadc_snmpmanager.tf_snmp03, provider "provider[\"registry.terraform.io/citrix/citrixadc\"]" produced an unexpected new value: Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own issue tracker.

Error: Provider produced inconsistent result after apply

When applying changes to citrixadc_snmpmanager.tf_snmp05, provider "provider[\"registry.terraform.io/citrix/citrixadc\"]" produced an unexpected new value: Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own issue tracker. ...



4. Error I am facing on NetScaler
You may find some errors in ns.log - set commands seems to be incomplete.

**Expected behaviour**
Set/unset of multiple SNMP Managers.

**Environment (please fill the following information):**
 - OS: Windows
 - Terraform: v1.5.5
 - citrixadc:  v1.36.0

**Additional context**
There seems to be also a problem with the optional netmask argument. Sometimes provider states replacement without any changes to the ressource files. 
kaiAsmOne commented 11 months ago

Try this instead

resource "citrixadc_snmpmanager" "citrixadm_snmpmanager" { ipaddress = var.sys_citrixadm_ipaddress netmask = "255.255.255.255" }

rohit-myali commented 5 months ago

Hi @adc-nerd I'm not able to reproduce this bug.

Can you please use the above suggested way to configure your citrixadc_snmpmanager and update me here?