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

Commit

Permalink
Fix mutating extant resources not forcing new
Browse files Browse the repository at this point in the history
Relates to #154, #19.
  • Loading branch information
OJFord committed Feb 22, 2023
1 parent 97124a1 commit 3da35db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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

0 comments on commit 3da35db

Please sign in to comment.