PaloAltoNetworks / terraform-provider-scm

The Terraform provider for Strata Cloud Manager
Apache License 2.0
7 stars 2 forks source link

Destroy operations fail for certain resource types #6

Closed ancoleman closed 7 months ago

ancoleman commented 8 months ago

Describe the bug

When trying to destroy _scm_ike_cryptoprofile resources it fails because folder is not being passed to the DELETE Rest method of the API endpoint. I suspect other destroy operations will fail for other resources, additionally we need to ensure the Rest PUT methods in the SDK also meet all payload attribute requirements.

Expected behavior

Resources should destroy as expected, and pass all payload requirements to perform Rest DELETE operations.

Current behavior

│ with module.rn_test.scm_ike_crypto_profile.this["terraform-ike-crypto-moj2"], │ on ../../modules/remote_networks/main.tf line 1, in resource "scm_ike_crypto_profile" "this": │ 1: resource "scm_ike_crypto_profile" "this" { │ │ [HTTP 400] API_I00035 Invalid Request Payload [object Object] - ["folder" is required]

Possible solution

Update the GO SDK to include all required payload attributes for Rest DELETE operations.

Steps to reproduce

  1. Terraform Apply to create a Resource _scm_ike_cryptoprofile
  2. Terraform Destroy to delete the ike crypto profile

Context

Not being able to update or delete resources properly makes the provider useless.

Your Environment

shinmog commented 7 months ago

fixed in v0.1.2