Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Fix mutating extant resources not forcing new #190

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/provider/app_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ func (ar flyAppResourceType) GetSchema(context.Context) (tfsdk.Schema, diag.Diag
MarkdownDescription: "Name of application",
Required: true,
Type: types.StringType,
PlanModifiers: tfsdk.AttributePlanModifiers{
resource.RequiresReplace(),
},
},
"org": {
Computed: true,
Optional: true,
MarkdownDescription: "Optional org slug to operate upon",
Type: types.StringType,
PlanModifiers: tfsdk.AttributePlanModifiers{
resource.RequiresReplace(),
},
},
"orgid": {
Computed: true,
Expand Down
5 changes: 4 additions & 1 deletion internal/provider/machine_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ func (mr flyMachineResourceType) GetSchema(context.Context) (tfsdk.Schema, diag.
},
"volume": {
Required: true,
MarkdownDescription: "Name or ID of volume",
MarkdownDescription: "ID of volume",
Type: types.StringType,
PlanModifiers: tfsdk.AttributePlanModifiers{
resource.RequiresReplace(),
},
},
}),
},
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/volume_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func (t flyVolumeResourceType) GetSchema(context.Context) (tfsdk.Schema, diag.Di
MarkdownDescription: "Size of volume in gb",
Required: true,
Type: types.Int64Type,
PlanModifiers: tfsdk.AttributePlanModifiers{
resource.RequiresReplace(),
},
},
"name": {
MarkdownDescription: "name",
Expand Down