PaloAltoNetworks / terraform-provider-sase

Terraform provider for SASE API
Apache License 2.0
1 stars 2 forks source link

enforced defaults cause resource creation to fail for sase_objects_hip_objects #11

Open ancoleman opened 1 year ago

ancoleman commented 1 year ago

Describe the bug

This issue is a list of bugs for the same resource: sase_objects_hip_objects

When using nested parameter tree: anti_malwarecriterialast_scan_timeproduct_version

The parameter expects a string, but the response from the API is an integer.

╷
│ Error: Error in create
│ 
│   with module.hip_with_tfvars.sase_objects_hip_objects.this["terraform-hip-ms-as"],
│   on ../../modules/hip/main.tf line 1, in resource "sase_objects_hip_objects" "this":
│    1: resource "sase_objects_hip_objects" "this" {
│ 
│ json: cannot unmarshal number into Go struct field ProductVersionObject.anti_malware.criteria.product_version.greater_equal of type string

When using nested parameter tree: anti_malwarecriteriavirdef_versionwithin OR not_withindays OR versions

both are being enforced at the same time, but the API requires an either or, not both together.

When using nested parameter tree: disk_encryptioncriteriaencrypted_locationsencrypted_stateis OR is_not

Both values are being enforced with defaults, but the API requires an either or, not both together

When using nested parameter tree: host_infocriteriadomainoscontains

All vendor keys are being enforced with defaults, but the API requires an either or, not both together.

When using nested parameter tree: disk_backupcriterialast_backup_timewithindays OR hours

both are being enforced at the same time, but the API requires an either or, not both together.

Expected behavior

  1. Set parameter field as integer instead of string
  2. Do not enforce defaults
  3. Do not enforce defaults
  4. Do not enforce defaults
  5. Do not enforce defaults

Current behavior

Can not use current parameters within the respective criteria due to enforced defaults that cause creation errors.

Possible solution

Steps to reproduce

1. 5. 6. 7.

Screenshots

Context

Your Environment