From a0d0562ae9a46ad7bf716e98f2e31b98f616b150 Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Wed, 8 Jan 2025 12:49:55 +0100 Subject: [PATCH] [dynamic] send an empty config on destroy calls (#2815) Similar to https://github.com/pulumi/pulumi-terraform-provider/issues/36, older versions of terraform-plugin-sdk/v2 require an empty (non-nil) `req.Config` field to avoid crashing. ```go configVal, err := msgpack.Unmarshal(req.Config.MsgPack, schemaBlock.ImpliedType()) if err != nil { resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err) return resp, nil } ``` ([src](https://github.com/pulumi/terraform-plugin-sdk/blob/1798ae4ae71f7ffff29312a07c92d41205aff03b/helper/schema/grpc_provider.go#L926-L930)) Newer versions of SDKv2 add a [guard](https://github.com/pulumi/terraform-plugin-sdk/blob/da29621efae69dd03dfdc540aa5f63beab1b764c/helper/schema/grpc_provider.go#L810-L822) before this line is reached. Fixes https://github.com/pulumi/pulumi-terraform-provider/issues/55 --- dynamic/log_replay_test.go | 53 +++++++++++++++++-- .../testdata/TestConfigInDestroy/logs.json | 38 +++++++++++++ pkg/pf/tfbridge/provider_delete.go | 5 +- 3 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 dynamic/testdata/TestConfigInDestroy/logs.json diff --git a/dynamic/log_replay_test.go b/dynamic/log_replay_test.go index 4f2f47787..eda210f33 100644 --- a/dynamic/log_replay_test.go +++ b/dynamic/log_replay_test.go @@ -9,25 +9,26 @@ import ( "github.com/hashicorp/terraform-plugin-go/tftypes" "github.com/pulumi/providertest/pulumitest/optnewstack" "github.com/pulumi/providertest/pulumitest/opttest" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin" "github.com/stretchr/testify/require" + "gotest.tools/v3/assert" "github.com/pulumi/pulumi-terraform-bridge/v3/dynamic/internal/shim/grpcutil" v6shim "github.com/pulumi/pulumi-terraform-bridge/v3/dynamic/internal/shim/protov6" "github.com/pulumi/pulumi-terraform-bridge/v3/dynamic/parameterize" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tests/pulcheck" + "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info" ) func TestLogReplayProvider(t *testing.T) { t.Parallel() grpcLogs, err := os.ReadFile("./testdata/TestLogReplayProvider/grpc_log_random.json") - if err != nil { - t.Fatalf("failed to read grpc log: %v", err) - } + require.NoError(t, err) provPlugin := grpcutil.NewLogReplayProvider("random", "0.0.1", grpcLogs) prov := v6shim.New(provPlugin) - require.NoError(t, err) resp, err := prov.GetProviderSchema(context.Background(), &tfprotov6.GetProviderSchemaRequest{}) require.NoError(t, err) @@ -49,6 +50,50 @@ func TestLogReplayProvider(t *testing.T) { "the config is is msgpack encoded, so we compare the bytes") } +// TestConfigInDestroy asserts that a nil config is passed to SDKv2 providers on destroy. +// +// This acts as a regression test for https://github.com/pulumi/pulumi-terraform-provider/issues/55. +func TestConfigInDestroy(t *testing.T) { + t.Parallel() + + logs, err := os.ReadFile("./testdata/TestConfigInDestroy/logs.json") + require.NoError(t, err) + p := makeLogReplayProvider(t, "phpipam", "0.0.1", logs) + + ctx := context.Background() + prov, err := tfbridge.NewProvider(ctx, p, tfbridge.ProviderMetadata{PackageSchema: []byte(`{}`)}) + require.NoError(t, err) + + resp, err := prov.Delete(ctx, plugin.DeleteRequest{ + ID: "12", + URN: "urn:pulumi:prod::space-ipam::phpipam:index/section:Section::section", + Name: "section", + Type: "phpipam:index/section:Section", + Inputs: resource.PropertyMap{ + "name": resource.NewProperty("Section Name"), + }, + Outputs: resource.PropertyMap{ + "__meta": resource.NewProperty("{\"private_state\":\"bnVsbA==\"}"), + "description": resource.NewProperty(""), + "displayOrder": resource.NewProperty(0.0), + "dnsResolverId": resource.NewProperty(0.0), + "editDate": resource.NewProperty(""), + "masterSectionId": resource.NewProperty(0.0), + "name": resource.NewProperty("Section Name"), + "permissions": resource.NewProperty(""), + "phpipamSectionId": resource.NewProperty("12"), + "sectionId": resource.NewProperty(12.0), + "showSupernetOnly": resource.NewProperty(false), + "showVlanInSubnetListing": resource.NewProperty(false), + "showVrfInSubnetListing": resource.NewProperty(false), + "strictMode": resource.NewProperty(true), + "subnetOrdering": resource.NewProperty(""), + }, + }) + require.NoError(t, err) + assert.Equal(t, plugin.DeleteResponse{}, resp) +} + type runProvider struct { tfprotov6.ProviderServer name, version string diff --git a/dynamic/testdata/TestConfigInDestroy/logs.json b/dynamic/testdata/TestConfigInDestroy/logs.json new file mode 100644 index 000000000..216ee823e --- /dev/null +++ b/dynamic/testdata/TestConfigInDestroy/logs.json @@ -0,0 +1,38 @@ +[ + { + "name": "github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.GetProviderSchema", + "call": "/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5to6server/tf5to6server.go:93", + "request": "", + "response": "{\"provider\":{\"block\":{\"attributes\":[{\"name\":\"app_id\",\"type\":\"InN0cmluZyI=\",\"description\":\"The application ID required for API requests\",\"optional\":true},{\"name\":\"endpoint\",\"type\":\"InN0cmluZyI=\",\"description\":\"The full URL (plus path) to the API endpoint\",\"optional\":true},{\"name\":\"insecure\",\"type\":\"ImJvb2wi\",\"description\":\"Whether server should be accessed without verifying the TLS certificate.\",\"optional\":true},{\"name\":\"nest_custom_fields\",\"type\":\"ImJvb2wi\",\"description\":\"Whether the API client is configured to nest custom values.\",\"optional\":true},{\"name\":\"password\",\"type\":\"InN0cmluZyI=\",\"description\":\"The password of the PHPIPAM account\",\"optional\":true},{\"name\":\"username\",\"type\":\"InN0cmluZyI=\",\"description\":\"The username of the PHPIPAM account\",\"optional\":true}]}},\"resource_schemas\":{\"phpipam_address\":{\"block\":{\"attributes\":[{\"name\":\"address_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"device_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"exclude_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"is_gateway\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"last_seen\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"mac_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"note\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"owner\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ptr_record_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"remove_dns_on_delete\",\"type\":\"ImJvb2wi\",\"optional\":true},{\"name\":\"skip_ptr_record\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"state_tag_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"switch_port_label\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_first_free_address\":{\"block\":{\"attributes\":[{\"name\":\"address_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"device_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"exclude_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"is_gateway\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"last_seen\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"mac_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"note\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"owner\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ptr_record_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"skip_ptr_record\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"state_tag_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"switch_port_label\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_first_free_subnet\":{\"block\":{\"attributes\":[{\"name\":\"allow_ip_requests\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"create_ptr_records\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true,\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"display_hostnames\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"gateway\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"gateway_id\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"host_discovery_enabled\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"include_in_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_folder\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_full\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"linked_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"location_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameserver_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameservers\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"parent_subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"resolve_dns\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"scan_agent_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"show_name\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"utilization_threshold\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vrf_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_l2domain\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"domain_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"sections\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_section\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"display_order\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"dns_resolver_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"show_supernet_only\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"show_vlan_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"show_vrf_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"strict_mode\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_ordering\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_subnet\":{\"block\":{\"attributes\":[{\"name\":\"allow_ip_requests\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"create_ptr_records\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"display_hostnames\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"gateway\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"gateway_id\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"host_discovery_enabled\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"include_in_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_folder\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_full\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"linked_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"location_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameserver_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameservers\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"parent_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"resolve_dns\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"scan_agent_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"show_name\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_address\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"utilization_threshold\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vrf_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_vlan\":{\"block\":{\"attributes\":[{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"l2_domain_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"number\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true}]}}},\"data_source_schemas\":{\"phpipam_address\":{\"block\":{\"attributes\":[{\"name\":\"address_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"device_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"exclude_ping\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"is_gateway\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"last_seen\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"mac_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"note\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"owner\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"ptr_record_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"skip_ptr_record\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"state_tag_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"switch_port_label\",\"type\":\"InN0cmluZyI=\",\"computed\":true}]}},\"phpipam_addresses\":{\"block\":{\"attributes\":[{\"name\":\"address_ids\",\"type\":\"WyJsaXN0IiwibnVtYmVyIl0=\",\"computed\":true},{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true}]}},\"phpipam_first_free_address\":{\"block\":{\"attributes\":[{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true}]}},\"phpipam_first_free_subnet\":{\"block\":{\"attributes\":[{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"required\":true}]}},\"phpipam_l2domain\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"domain_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"sections\",\"type\":\"InN0cmluZyI=\",\"computed\":true}]}},\"phpipam_section\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"display_order\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"dns_resolver_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_section_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"show_supernet_only\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"show_vlan_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"show_vrf_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"strict_mode\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"subnet_ordering\",\"type\":\"InN0cmluZyI=\",\"computed\":true}]}},\"phpipam_subnet\":{\"block\":{\"attributes\":[{\"name\":\"allow_ip_requests\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"create_ptr_records\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"description_match\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"display_hostnames\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"gateway\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"gateway_id\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"host_discovery_enabled\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"include_in_ping\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"is_folder\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"is_full\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"linked_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"location_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"master_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"nameserver_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"nameservers\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"parent_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"resolve_dns\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"scan_agent_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"show_name\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"subnet_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"utilization_threshold\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"vrf_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true}]}},\"phpipam_subnets\":{\"block\":{\"attributes\":[{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"description_match\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"subnet_ids\",\"type\":\"WyJsaXN0IiwibnVtYmVyIl0=\",\"computed\":true}]}},\"phpipam_vlan\":{\"block\":{\"attributes\":[{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"l2_domain_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"number\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true}]}}},\"provider_meta\":{\"block\":{}}}" + }, + { + "name": "github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ValidateProviderConfig", + "call": "/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5to6server/tf5to6server.go:197", + "request": "config:{msgpack:\"\\x86\\xa6app_id\\xa6pulumi\\xa8endpoint\\xd9(https://phpipam.space.voided.network/api\\xa8insecure\\xc0\\xb2nest_custom_fields\\xc0\\xa8password\\xbeRrS94KVOZHbQnHEOhl0joqEM8MumxN\\xa8username\\xa6pulumi\"}", + "response": "{\"prepared_config\":{\"msgpack\":\"hqZhcHBfaWSmcHVsdW1pqGVuZHBvaW502ShodHRwczovL3BocGlwYW0uc3BhY2Uudm9pZGVkLm5ldHdvcmsvYXBpqGluc2VjdXJlwrJuZXN0X2N1c3RvbV9maWVsZHPCqHBhc3N3b3JkvlJyUzk0S1ZPWkhiUW5IRU9obDBqb3FFTThNdW14Tqh1c2VybmFtZaZwdWx1bWk=\"}}" + }, + { + "name": "github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.GetProviderSchema", + "call": "/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5to6server/tf5to6server.go:93", + "request": "", + "response": "{\"provider\":{\"block\":{\"attributes\":[{\"name\":\"app_id\",\"type\":\"InN0cmluZyI=\",\"description\":\"The application ID required for API requests\",\"optional\":true},{\"name\":\"endpoint\",\"type\":\"InN0cmluZyI=\",\"description\":\"The full URL (plus path) to the API endpoint\",\"optional\":true},{\"name\":\"insecure\",\"type\":\"ImJvb2wi\",\"description\":\"Whether server should be accessed without verifying the TLS certificate.\",\"optional\":true},{\"name\":\"nest_custom_fields\",\"type\":\"ImJvb2wi\",\"description\":\"Whether the API client is configured to nest custom values.\",\"optional\":true},{\"name\":\"password\",\"type\":\"InN0cmluZyI=\",\"description\":\"The password of the PHPIPAM account\",\"optional\":true},{\"name\":\"username\",\"type\":\"InN0cmluZyI=\",\"description\":\"The username of the PHPIPAM account\",\"optional\":true}]}},\"resource_schemas\":{\"phpipam_address\":{\"block\":{\"attributes\":[{\"name\":\"address_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"device_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"exclude_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"is_gateway\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"last_seen\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"mac_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"note\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"owner\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ptr_record_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"remove_dns_on_delete\",\"type\":\"ImJvb2wi\",\"optional\":true},{\"name\":\"skip_ptr_record\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"state_tag_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"switch_port_label\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_first_free_address\":{\"block\":{\"attributes\":[{\"name\":\"address_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"device_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"exclude_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"is_gateway\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"last_seen\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"mac_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"note\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"owner\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ptr_record_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"skip_ptr_record\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"state_tag_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"switch_port_label\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_first_free_subnet\":{\"block\":{\"attributes\":[{\"name\":\"allow_ip_requests\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"create_ptr_records\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true,\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"display_hostnames\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"gateway\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"gateway_id\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"host_discovery_enabled\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"include_in_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_folder\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_full\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"linked_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"location_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameserver_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameservers\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"parent_subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"resolve_dns\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"scan_agent_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"show_name\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"utilization_threshold\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vrf_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_l2domain\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"domain_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"sections\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_section\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"display_order\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"dns_resolver_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"show_supernet_only\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"show_vlan_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"show_vrf_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"strict_mode\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_ordering\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_subnet\":{\"block\":{\"attributes\":[{\"name\":\"allow_ip_requests\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"create_ptr_records\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"display_hostnames\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"gateway\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"gateway_id\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"host_discovery_enabled\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"include_in_ping\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_folder\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"is_full\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"linked_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"location_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameserver_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"nameservers\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"parent_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"resolve_dns\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"scan_agent_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"show_name\",\"type\":\"ImJvb2wi\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_address\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"utilization_threshold\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vrf_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true}]}},\"phpipam_vlan\":{\"block\":{\"attributes\":[{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"l2_domain_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"required\":true},{\"name\":\"number\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true}]}}},\"data_source_schemas\":{\"phpipam_address\":{\"block\":{\"attributes\":[{\"name\":\"address_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"device_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"exclude_ping\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"is_gateway\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"last_seen\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"mac_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"note\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"owner\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"ptr_record_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"skip_ptr_record\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"state_tag_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"switch_port_label\",\"type\":\"InN0cmluZyI=\",\"computed\":true}]}},\"phpipam_addresses\":{\"block\":{\"attributes\":[{\"name\":\"address_ids\",\"type\":\"WyJsaXN0IiwibnVtYmVyIl0=\",\"computed\":true},{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"hostname\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true}]}},\"phpipam_first_free_address\":{\"block\":{\"attributes\":[{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true}]}},\"phpipam_first_free_subnet\":{\"block\":{\"attributes\":[{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"ip_address\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"required\":true}]}},\"phpipam_l2domain\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"domain_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"sections\",\"type\":\"InN0cmluZyI=\",\"computed\":true}]}},\"phpipam_section\":{\"block\":{\"attributes\":[{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"display_order\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"dns_resolver_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"master_section_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"show_supernet_only\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"show_vlan_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"show_vrf_in_subnet_listing\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"strict_mode\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"subnet_ordering\",\"type\":\"InN0cmluZyI=\",\"computed\":true}]}},\"phpipam_subnet\":{\"block\":{\"attributes\":[{\"name\":\"allow_ip_requests\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"create_ptr_records\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"description_match\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"display_hostnames\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"gateway\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"gateway_id\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"host_discovery_enabled\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"include_in_ping\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"is_folder\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"is_full\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"linked_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"location_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"master_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"nameserver_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"nameservers\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"parent_subnet_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"permissions\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"resolve_dns\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"scan_agent_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"show_name\",\"type\":\"ImJvb2wi\",\"computed\":true},{\"name\":\"subnet_address\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"subnet_mask\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"utilization_threshold\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true},{\"name\":\"vrf_id\",\"type\":\"Im51bWJlciI=\",\"computed\":true}]}},\"phpipam_subnets\":{\"block\":{\"attributes\":[{\"name\":\"custom_field_filter\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"optional\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"description_match\",\"type\":\"InN0cmluZyI=\",\"optional\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"section_id\",\"type\":\"Im51bWJlciI=\",\"required\":true},{\"name\":\"subnet_ids\",\"type\":\"WyJsaXN0IiwibnVtYmVyIl0=\",\"computed\":true}]}},\"phpipam_vlan\":{\"block\":{\"attributes\":[{\"name\":\"custom_fields\",\"type\":\"WyJtYXAiLCJzdHJpbmciXQ==\",\"computed\":true},{\"name\":\"description\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"edit_date\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"id\",\"type\":\"InN0cmluZyI=\",\"optional\":true,\"computed\":true},{\"name\":\"l2_domain_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"name\",\"type\":\"InN0cmluZyI=\",\"computed\":true},{\"name\":\"number\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true},{\"name\":\"vlan_id\",\"type\":\"Im51bWJlciI=\",\"optional\":true,\"computed\":true}]}}},\"provider_meta\":{\"block\":{}}}" + }, + { + "name": "github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ValidateProviderConfig", + "call": "/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5to6server/tf5to6server.go:197", + "request": "config:{msgpack:\"\\x86\\xa6app_id\\xa6pulumi\\xa8endpoint\\xd9(https://phpipam.space.voided.network/api\\xa8insecure\\xc0\\xb2nest_custom_fields\\xc0\\xa8password\\xbeRrS94KVOZHbQnHEOhl0joqEM8MumxN\\xa8username\\xa6pulumi\"}", + "response": "{\"prepared_config\":{\"msgpack\":\"hqZhcHBfaWSmcHVsdW1pqGVuZHBvaW502ShodHRwczovL3BocGlwYW0uc3BhY2Uudm9pZGVkLm5ldHdvcmsvYXBpqGluc2VjdXJlwrJuZXN0X2N1c3RvbV9maWVsZHPCqHBhc3N3b3JkvlJyUzk0S1ZPWkhiUW5IRU9obDBqb3FFTThNdW14Tqh1c2VybmFtZaZwdWx1bWk=\"}}" + }, + { + "name": "github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ConfigureProvider", + "call": "/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5to6server/tf5to6server.go:60", + "request": "terraform_version:\"pulumi-terraform-bridge\" config:{msgpack:\"\\x86\\xa6app_id\\xa6pulumi\\xa8endpoint\\xd9(https://phpipam.space.voided.network/api\\xa8insecure\\xc0\\xb2nest_custom_fields\\xc0\\xa8password\\xbeRrS94KVOZHbQnHEOhl0joqEM8MumxN\\xa8username\\xa6pulumi\"}", + "response": "{}" + }, + { + "name": "github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ApplyResourceChange", + "call": "/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5to6server/tf5to6server.go:38", + "request": "type_name:\"phpipam_section\" prior_state:{msgpack:\"\\x8e\\xabdescription\\xa0\\xaddisplay_order\\x00\\xafdns_resolver_id\\x00\\xa9edit_date\\xa0\\xa2id\\xa212\\xb1master_section_id\\x00\\xa4name\\xacSection Name\\xabpermissions\\xa0\\xaasection_id\\x0c\\xb2show_supernet_only»show_vlan_in_subnet_listingºshow_vrf_in_subnet_listing«strict_modeïsubnet_ordering\\xa0\"} planned_state:{msgpack:\"\\xc0\"} config:{msgpack:\"\\xc0\"}", + "response": "{}" + } +] diff --git a/pkg/pf/tfbridge/provider_delete.go b/pkg/pf/tfbridge/provider_delete.go index 7994ebdd9..2f8eddb6f 100644 --- a/pkg/pf/tfbridge/provider_delete.go +++ b/pkg/pf/tfbridge/provider_delete.go @@ -52,7 +52,7 @@ func (p *provider) DeleteWithContext( return resource.StatusOK, err } - plannedState, err := tfprotov6.NewDynamicValue(tfType, tftypes.NewValue(tfType, nil)) + nilState, err := tfprotov6.NewDynamicValue(tfType, tftypes.NewValue(tfType, nil)) contract.AssertNoErrorf(err, "nil is always a valid value to marshal to a dynamic state") // terraform-plugin-framework recognizes PlannedState=nil ApplyResourceChangeRequest request as DELETE. @@ -62,7 +62,8 @@ func (p *provider) DeleteWithContext( req := tfprotov6.ApplyResourceChangeRequest{ TypeName: rh.terraformResourceName, PriorState: priorState, - PlannedState: &plannedState, + PlannedState: &nilState, + Config: &nilState, } resp, err := p.tfServer.ApplyResourceChange(ctx, &req)