@@ -46,10 +46,11 @@ type siteBuildSettingsResourceModel struct {
4646 StopBuilds types.Bool `tfsdk:"stop_builds"`
4747 // Runtime types.String `tfsdk:"runtime"` // ?!?! is this plugins.package?
4848
49- ProductionBranch types.String `tfsdk:"production_branch"`
50- BranchDeployAllBranches types.Bool `tfsdk:"branch_deploy_all_branches"`
51- BranchDeployBranches []types.String `tfsdk:"branch_deploy_branches"`
52- DeployPreviews types.Bool `tfsdk:"deploy_previews"`
49+ ProductionBranch types.String `tfsdk:"production_branch"`
50+ BranchDeployAllBranches types.Bool `tfsdk:"branch_deploy_all_branches"`
51+ BranchDeployBranches []types.String `tfsdk:"branch_deploy_branches"`
52+ DeployPreviews types.Bool `tfsdk:"deploy_previews"`
53+ PreventNonGitProdDeploys types.Bool `tfsdk:"prevent_non_git_prod_deploys"`
5354
5455 BuildImage types.String `tfsdk:"build_image"`
5556 // NodeJSVersion types.String `tfsdk:"node_js_version"` // versions.node.active / default: versions.node.active or versions.node.default
@@ -152,6 +153,12 @@ func (r *siteBuildSettingsResource) Schema(_ context.Context, _ resource.SchemaR
152153 Computed : true ,
153154 Default : booldefault .StaticBool (true ),
154155 },
156+ "prevent_non_git_prod_deploys" : schema.BoolAttribute {
157+ Optional : true ,
158+ Computed : true ,
159+ Default : booldefault .StaticBool (false ),
160+ Description : "When enabled, prevents production deploys from sources other than the linked git repository." ,
161+ },
155162 "build_image" : schema.StringAttribute {
156163 Optional : true ,
157164 Computed : true ,
@@ -288,6 +295,7 @@ func (r *siteBuildSettingsResource) read(ctx context.Context, state *siteBuildSe
288295 } else {
289296 state .DeployPreviews = types .BoolValue (! * site .BuildSettings .SkipPrs )
290297 }
298+ state .PreventNonGitProdDeploys = types .BoolPointerValue (site .PreventNonGitProdDeploys )
291299 state .BuildImage = types .StringValue (site .BuildImage )
292300 state .FunctionsRegion = types .StringPointerValue (site .FunctionsRegion )
293301 state .PrettyURLs = types .BoolPointerValue (site .ProcessingSettings .Html .PrettyUrls )
@@ -340,6 +348,7 @@ func (r *siteBuildSettingsResource) write(ctx context.Context, plan *siteBuildSe
340348 PrettyUrls : plan .PrettyURLs .ValueBoolPointer (),
341349 },
342350 },
351+ PreventNonGitProdDeploys : plan .PreventNonGitProdDeploys .ValueBoolPointer (),
343352 }
344353
345354 if plan .BuildImage .IsUnknown () {
0 commit comments