From d45316954f25612b4fd0bf4f8baa9e1c85aeb090 Mon Sep 17 00:00:00 2001 From: Dana Fallon <8871189+danafallon@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:34:20 -0700 Subject: [PATCH] Make status read-only since the update deployment endpoint doesn't modify it --- docs/resources/deployment.md | 2 +- internal/provider/deployment_resource.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resources/deployment.md b/docs/resources/deployment.md index 0fedeb3..a8353a6 100644 --- a/docs/resources/deployment.md +++ b/docs/resources/deployment.md @@ -24,10 +24,10 @@ Artie Deployment resource ### Optional - `destination_uuid` (String) -- `status` (String) ### Read-Only +- `status` (String) - `uuid` (String) diff --git a/internal/provider/deployment_resource.go b/internal/provider/deployment_resource.go index 83d162e..0758777 100644 --- a/internal/provider/deployment_resource.go +++ b/internal/provider/deployment_resource.go @@ -44,7 +44,7 @@ func (r *DeploymentResource) Schema(ctx context.Context, req resource.SchemaRequ Attributes: map[string]schema.Attribute{ "uuid": schema.StringAttribute{Computed: true, PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()}}, "name": schema.StringAttribute{Required: true}, - "status": schema.StringAttribute{Computed: true, Optional: true, PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()}}, + "status": schema.StringAttribute{Computed: true, PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()}}, "destination_uuid": schema.StringAttribute{Computed: true, Optional: true, PlanModifiers: []planmodifier.String{stringplanmodifier.UseStateForUnknown()}}, "source": schema.SingleNestedAttribute{ Required: true,