layout | page_title | sidebar_current | description |
---|---|---|---|
netlify |
Netlify: netlify_site |
docs-netlify-resource-site |
Provides an site resource. |
netlify_site
Primary settings for a Netlify site - should contain the bulk of your configuration. Allows configuration of most aspects of your Netlify site.
Example Usage
resource "netlify_site" "main" {
name = "my-site"
repo {
command = "middleman build"
deploy_key_id = "${netlify_deploy_key.key.id}"
dir = "/build"
provider = "github"
repo_path = "username/repo"
repo_branch = "master"
}
}
Argument Reference
The following arguments are supported:
name
- (Required) - Name of your site on Netlify (e.g. mysite.netlify.com)repo
- (Required) - See Repositorycustom_domain
- (Optional) - Custom domain of the site, must be configured using a CNAME in accordance with Netlify's docs. (e.g.www.example.com
)deploy_url
- (Optional)
Repository
repo
supports the following arguments:
command
- (Optional) - Shell command to run before deployment, typically used to build the sitedeploy_key_id
- (Optional) - A deploy key id from thedeploy_key
resourcedir
- (Optional) - Directory to deploy, typically where the build puts the processed filesprovider
- (Required) - Name of your VCS provider (e.g.github
)repo_path
- (Required) - path to your repo, typicallyusername/reponame
repo_branch
- (Required) - branch to be deployed