Error in building a resource when objects exist. The error is "object not found"
Expected behavior
Options:
Reformat error with: object already exists
Decision Tree on if new object with the same name but a different UUID is generated.... Something to discuss with the API team.
Current behavior
(venv) (base) acoleman@M-KGYXTTH2MF remote_networks % terraform apply --auto-approve
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│ - paloaltonetworks-local/sase in /Users/acoleman/Documents/Projects/PracticeDevelopment/github/terraform-provider-sase
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
data.sase_bandwidth_allocations_list.this: Reading...
data.sase_remote_networks_list.before: Reading...
data.sase_ike_gateways_list.before: Reading...
data.sase_ipsec_tunnels_list.before: Reading...
module.remote_networks_with_yaml.sase_ike_crypto_profiles.this["terraform-ike-crypto-test1"]: Refreshing state... [id=Remote Networks:70f75684-81e7-46b8-acd2-359a4af9d9c2]
module.remote_networks_with_yaml.sase_ike_crypto_profiles.this["terraform-ike-crypto-test2"]: Refreshing state... [id=Remote Networks:761f620d-3496-4489-978e-c04f65a36dca]
module.remote_networks_with_yaml.sase_ipsec_crypto_profiles.this["terraform-ipsec-crypto-test1"]: Refreshing state... [id=Remote Networks:ae2bf50f-c6aa-4704-b901-818e94b197e2]
module.remote_networks_with_yaml.sase_ipsec_crypto_profiles.this["terraform-ipsec-crypto-test2"]: Refreshing state... [id=Remote Networks:098e974d-c101-4d33-9782-59e1d3261f2d]
data.sase_bandwidth_allocations_list.this: Read complete after 0s [id=0:0]
module.remote_networks_with_yaml.sase_remote_networks.this["terraform-rn-1"]: Refreshing state... [id=Remote Networks:570663d6-f81a-4887-bc34-96d77c2bf031]
module.remote_networks_with_yaml.sase_remote_networks.this["terraform-rn-2"]: Refreshing state... [id=Remote Networks:9f08fbe3-0dbf-4c80-a39e-ed72c2777590]
data.sase_remote_networks_list.before: Read complete after 0s [id=0:0::Remote Networks]
data.sase_ipsec_tunnels_list.before: Read complete after 0s [id=0:0::Remote Networks]
data.sase_ike_gateways_list.before: Read complete after 0s [id=0:0::Remote Networks]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# module.remote_networks_with_yaml.sase_ipsec_tunnels.this["terraform-ipsec-tunnel1"] will be created
+ resource "sase_ipsec_tunnels" "this" {
+ anti_replay = false
+ auto_key = {
+ ike_gateway = [
+ {
+ name = "terraform-ike-1"
},
]
+ ipsec_crypto_profile = "Others-IPSec-Crypto-Default"
}
+ copy_tos = false
+ enable_gre_encapsulation = false
+ folder = "Remote Networks"
+ id = (known after apply)
+ name = "terraform-ipsec-tunnel1"
+ object_id = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
module.remote_networks_with_yaml.sase_ipsec_tunnels.this["terraform-ipsec-tunnel1"]: Creating...
╷
│ Error: Error in create
│
│ with module.remote_networks_with_yaml.sase_ipsec_tunnels.this["terraform-ipsec-tunnel1"],
│ on ../../modules/remote_networks/main.tf line 56, in resource "sase_ipsec_tunnels" "this":
│ 56: resource "sase_ipsec_tunnels" "this" {
│
│ object not found
╵
Possible solution
Review expected behavior options.
Steps to reproduce
Create resource either with different state or in UI
Try to create a new resource with a fresh state but the name of the resource stays the same.
Screenshots
Context
I am trying to build a new IPsec tunnel, but if the tunnel name is already taken a failure is presented.
Your Environment
Version used: Terraform 1.3.9
Operating System and version (Mac OS Ventura 13.2.1):
Describe the bug
Error in building a resource when objects exist. The error is "object not found"
Expected behavior
Options:
Current behavior
Possible solution
Review expected behavior options.
Steps to reproduce
Screenshots
Context
I am trying to build a new IPsec tunnel, but if the tunnel name is already taken a failure is presented.
Your Environment