Skip to content

Commit

Permalink
site deploy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonsnir committed Jun 3, 2024
1 parent 06ca9fb commit 25b7d52
Show file tree
Hide file tree
Showing 11 changed files with 868 additions and 1 deletion.
5 changes: 4 additions & 1 deletion UPDATING_OPENAPI_JSON.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ This project uses a modified `openapi.json`. Please maintain these instructions
1. Remove the `domain` property from the `required` array of the `DnsZone` object.
1. Remove the `values`, `scopes` and `is_secret` parameters from the `updateEnvVar` operation.
1. Add a request body schema to the `updateEnvVar` operation, by copying it from an earlier version of the `openapi.json`.
1. Add a `package_path` property of type string to the `Repo` object.
1. Add a `package_path` property of type `string` to the `Repo` object.
1. Add a `functions_region` property of type `string` to the `Site` object.
1. Add a `cdp_enabled_contexts` property of type `array` of `string`s to the `Site` object.
1. Add a `hud_enabled` property of type `boolean` to the `Site` object.
1. Duplicate the `Site` object into `PartialSite` and remove the `required` properties.
1. Change `updateSite` operation to use the `PartialSite` object as the request body schema (NOTE: not the response body schema).
1. Change the type of `LogDrain.id` to `string`.
Expand Down
39 changes: 39 additions & 0 deletions docs/resources/site_deploy_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netlify_site_deploy_settings Resource - netlify"
subcategory: ""
description: |-
---

# netlify_site_deploy_settings (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `production_branch` (String)
- `site_id` (String)

### Optional

- `branch_deploy_all_branches` (Boolean)
- `branch_deploy_branches` (List of String)
- `branch_deploy_custom_domain` (String)
- `custom_domain` (String)
- `deploy_preview_custom_domain` (String)
- `deploy_previews` (Boolean)
- `domain_aliases` (List of String)
- `functions_region` (String)
- `netlify_drawer_in_branch_deploys` (Boolean)
- `netlify_drawer_in_deploy_previews` (Boolean)
- `netlify_heads_up_display` (Boolean)

### Read-Only

- `last_updated` (String)
10 changes: 10 additions & 0 deletions examples/site_settings/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ resource "netlify_site_build_settings" "platform_test" {
build_command = "npm run build"
publish_directory = "dist"
}

resource "netlify_site_deploy_settings" "platform_test" {
site_id = data.netlify_site.platform_test.id
production_branch = "main"
branch_deploy_branches = ["meow", "woof"]
custom_domain = "platform-test.example-tf-test-test.com"
domain_aliases = ["meow.example-tf-test-test.com"]
branch_deploy_custom_domain = "branch.example-tf-test-test.com"
deploy_preview_custom_domain = "dp.example-tf-test-test.com"
}
26 changes: 26 additions & 0 deletions internal/netlifyapi/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10311,8 +10311,12 @@ components:
id_domain: id_domain
deploy_url: deploy_url
deploy_hook: deploy_hook
cdp_enabled_contexts:
- cdp_enabled_contexts
- cdp_enabled_contexts
created_at: 2000-01-23T04:56:07.000+00:00
sso_login_context: sso_login_context
functions_region: functions_region
domain_aliases:
- domain_aliases
- domain_aliases
Expand All @@ -10331,6 +10335,7 @@ components:
force_ssl: true
notification_email: notification_email
capabilities: "{}"
hud_enabled: true
admin_url: admin_url
build_settings:
repo_type: repo_type
Expand Down Expand Up @@ -10464,6 +10469,14 @@ components:
items:
$ref: '#/components/schemas/SiteLabel'
type: array
functions_region:
type: string
cdp_enabled_contexts:
items:
type: string
type: array
hud_enabled:
type: boolean
required:
- account_id
- account_name
Expand Down Expand Up @@ -10508,8 +10521,12 @@ components:
id_domain: id_domain
deploy_url: deploy_url
deploy_hook: deploy_hook
cdp_enabled_contexts:
- cdp_enabled_contexts
- cdp_enabled_contexts
created_at: 2000-01-23T04:56:07.000+00:00
sso_login_context: sso_login_context
functions_region: functions_region
domain_aliases:
- domain_aliases
- domain_aliases
Expand All @@ -10528,6 +10545,7 @@ components:
force_ssl: true
notification_email: notification_email
capabilities: "{}"
hud_enabled: true
admin_url: admin_url
build_settings:
repo_type: repo_type
Expand Down Expand Up @@ -10661,6 +10679,14 @@ components:
items:
$ref: '#/components/schemas/SiteLabel'
type: array
functions_region:
type: string
cdp_enabled_contexts:
items:
type: string
type: array
hud_enabled:
type: boolean
SitesSummary:
description: SitesSummary model definition
properties:
Expand Down
111 changes: 111 additions & 0 deletions internal/netlifyapi/model_admin_site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 25b7d52

Please sign in to comment.