diff --git a/provider/internal/connector/data_source.go b/provider/internal/connector/data_source.go index 83c41260..c072f642 100644 --- a/provider/internal/connector/data_source.go +++ b/provider/internal/connector/data_source.go @@ -6,7 +6,6 @@ package connector import ( "context" "fmt" - cdoClient "github.com/CiscoDevnet/terraform-provider-cdo/go-client" "github.com/CiscoDevnet/terraform-provider-cdo/go-client/connector" "github.com/hashicorp/terraform-plugin-framework/attr" diff --git a/provider/internal/device/asa/resource.go b/provider/internal/device/asa/resource.go index 030f7323..eab843d6 100644 --- a/provider/internal/device/asa/resource.go +++ b/provider/internal/device/asa/resource.go @@ -7,6 +7,7 @@ import ( "github.com/CiscoDevnet/terraform-provider-cdo/internal/util" "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/listdefault" "strconv" "strings" @@ -103,10 +104,16 @@ func (r *AsaDeviceResource) Schema(ctx context.Context, req resource.SchemaReque "port": schema.Int64Attribute{ MarkdownDescription: "The port used to connect to the device.", Computed: true, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, }, "host": schema.StringAttribute{ MarkdownDescription: "The host used to connect to the device.", Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, "labels": schema.ListAttribute{ MarkdownDescription: "Set a list of labels to identify the device as part of a group. Refer to the [CDO documentation](https://docs.defenseorchestrator.com/t-applying-labels-to-devices-and-objects.html#!c-labels-and-filtering.html) for details on how labels are used in CDO.", diff --git a/provider/internal/device/ftd/resource.go b/provider/internal/device/ftd/resource.go index 8c48a5a1..8b738ba5 100644 --- a/provider/internal/device/ftd/resource.go +++ b/provider/internal/device/ftd/resource.go @@ -128,22 +128,37 @@ func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp "generated_command": schema.StringAttribute{ MarkdownDescription: "The command to run in the FTD CLI to register it with the cloud-delivered FMC (cdFMC).", Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, "access_policy_id": schema.StringAttribute{ MarkdownDescription: "The ID of the cloud-delivered FMC (cdFMC) access policy applied to this FTD.", Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, "hostname": schema.StringAttribute{ MarkdownDescription: "The Hostname of the cloud-delivered FMC (cdFMC) manages this FTD.", Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, "nat_id": schema.StringAttribute{ MarkdownDescription: "The Network Address Translation (NAT) ID of this FTD.", Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, "reg_key": schema.StringAttribute{ MarkdownDescription: "The Registration Key of this FTD.", Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, }, } diff --git a/provider/internal/device/ios/resource.go b/provider/internal/device/ios/resource.go index 8cb54938..09d2ffbc 100644 --- a/provider/internal/device/ios/resource.go +++ b/provider/internal/device/ios/resource.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/listdefault" "strings" @@ -88,10 +89,16 @@ func (r *IosDeviceResource) Schema(ctx context.Context, req resource.SchemaReque "port": schema.Int64Attribute{ MarkdownDescription: "The port used to connect to the device.", Computed: true, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, }, "host": schema.StringAttribute{ MarkdownDescription: "The host used to connect to the device.", Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, }, "username": schema.StringAttribute{ MarkdownDescription: "The username used to authenticate with the device.",