netlify.SiteDomainSettings
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netlify from "@pulumi/netlify";
const blog = new netlify.SiteDomainSettings("blog", {
siteId: data.netlify_site.blog.id,
customDomain: "blog.example.com",
domainAliases: ["blog-alias.example.com"],
branchDeployCustomDomain: "blog-branch.example.com",
deployPreviewCustomDomain: "blog-dp.example.com",
});
import pulumi
import pulumi_netlify as netlify
blog = netlify.SiteDomainSettings("blog",
site_id=data["netlify_site"]["blog"]["id"],
custom_domain="blog.example.com",
domain_aliases=["blog-alias.example.com"],
branch_deploy_custom_domain="blog-branch.example.com",
deploy_preview_custom_domain="blog-dp.example.com")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netlify/netlify"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netlify.NewSiteDomainSettings(ctx, "blog", &netlify.SiteDomainSettingsArgs{
SiteId: pulumi.Any(data.Netlify_site.Blog.Id),
CustomDomain: pulumi.String("blog.example.com"),
DomainAliases: pulumi.StringArray{
pulumi.String("blog-alias.example.com"),
},
BranchDeployCustomDomain: pulumi.String("blog-branch.example.com"),
DeployPreviewCustomDomain: pulumi.String("blog-dp.example.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netlify = Pulumi.Netlify;
return await Deployment.RunAsync(() =>
{
var blog = new Netlify.SiteDomainSettings("blog", new()
{
SiteId = data.Netlify_site.Blog.Id,
CustomDomain = "blog.example.com",
DomainAliases = new[]
{
"blog-alias.example.com",
},
BranchDeployCustomDomain = "blog-branch.example.com",
DeployPreviewCustomDomain = "blog-dp.example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netlify.SiteDomainSettings;
import com.pulumi.netlify.SiteDomainSettingsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var blog = new SiteDomainSettings("blog", SiteDomainSettingsArgs.builder()
.siteId(data.netlify_site().blog().id())
.customDomain("blog.example.com")
.domainAliases("blog-alias.example.com")
.branchDeployCustomDomain("blog-branch.example.com")
.deployPreviewCustomDomain("blog-dp.example.com")
.build());
}
}
resources:
blog:
type: netlify:SiteDomainSettings
properties:
siteId: ${data.netlify_site.blog.id}
customDomain: blog.example.com
domainAliases:
- blog-alias.example.com
branchDeployCustomDomain: blog-branch.example.com
deployPreviewCustomDomain: blog-dp.example.com
Create SiteDomainSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SiteDomainSettings(name: string, args: SiteDomainSettingsArgs, opts?: CustomResourceOptions);
@overload
def SiteDomainSettings(resource_name: str,
args: SiteDomainSettingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SiteDomainSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
site_id: Optional[str] = None,
branch_deploy_custom_domain: Optional[str] = None,
custom_domain: Optional[str] = None,
deploy_preview_custom_domain: Optional[str] = None,
domain_aliases: Optional[Sequence[str]] = None)
func NewSiteDomainSettings(ctx *Context, name string, args SiteDomainSettingsArgs, opts ...ResourceOption) (*SiteDomainSettings, error)
public SiteDomainSettings(string name, SiteDomainSettingsArgs args, CustomResourceOptions? opts = null)
public SiteDomainSettings(String name, SiteDomainSettingsArgs args)
public SiteDomainSettings(String name, SiteDomainSettingsArgs args, CustomResourceOptions options)
type: netlify:SiteDomainSettings
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SiteDomainSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SiteDomainSettingsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SiteDomainSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SiteDomainSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SiteDomainSettingsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var siteDomainSettingsResource = new Netlify.SiteDomainSettings("siteDomainSettingsResource", new()
{
SiteId = "string",
BranchDeployCustomDomain = "string",
CustomDomain = "string",
DeployPreviewCustomDomain = "string",
DomainAliases = new[]
{
"string",
},
});
example, err := netlify.NewSiteDomainSettings(ctx, "siteDomainSettingsResource", &netlify.SiteDomainSettingsArgs{
SiteId: pulumi.String("string"),
BranchDeployCustomDomain: pulumi.String("string"),
CustomDomain: pulumi.String("string"),
DeployPreviewCustomDomain: pulumi.String("string"),
DomainAliases: pulumi.StringArray{
pulumi.String("string"),
},
})
var siteDomainSettingsResource = new SiteDomainSettings("siteDomainSettingsResource", SiteDomainSettingsArgs.builder()
.siteId("string")
.branchDeployCustomDomain("string")
.customDomain("string")
.deployPreviewCustomDomain("string")
.domainAliases("string")
.build());
site_domain_settings_resource = netlify.SiteDomainSettings("siteDomainSettingsResource",
site_id="string",
branch_deploy_custom_domain="string",
custom_domain="string",
deploy_preview_custom_domain="string",
domain_aliases=["string"])
const siteDomainSettingsResource = new netlify.SiteDomainSettings("siteDomainSettingsResource", {
siteId: "string",
branchDeployCustomDomain: "string",
customDomain: "string",
deployPreviewCustomDomain: "string",
domainAliases: ["string"],
});
type: netlify:SiteDomainSettings
properties:
branchDeployCustomDomain: string
customDomain: string
deployPreviewCustomDomain: string
domainAliases:
- string
siteId: string
SiteDomainSettings Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SiteDomainSettings resource accepts the following input properties:
- Site
Id string - Branch
Deploy stringCustom Domain - Custom
Domain string - Deploy
Preview stringCustom Domain - Domain
Aliases List<string>
- Site
Id string - Branch
Deploy stringCustom Domain - Custom
Domain string - Deploy
Preview stringCustom Domain - Domain
Aliases []string
- site
Id String - branch
Deploy StringCustom Domain - custom
Domain String - deploy
Preview StringCustom Domain - domain
Aliases List<String>
- site
Id string - branch
Deploy stringCustom Domain - custom
Domain string - deploy
Preview stringCustom Domain - domain
Aliases string[]
- site_
id str - branch_
deploy_ strcustom_ domain - custom_
domain str - deploy_
preview_ strcustom_ domain - domain_
aliases Sequence[str]
- site
Id String - branch
Deploy StringCustom Domain - custom
Domain String - deploy
Preview StringCustom Domain - domain
Aliases List<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the SiteDomainSettings resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String
Look up Existing SiteDomainSettings Resource
Get an existing SiteDomainSettings resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SiteDomainSettingsState, opts?: CustomResourceOptions): SiteDomainSettings
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
branch_deploy_custom_domain: Optional[str] = None,
custom_domain: Optional[str] = None,
deploy_preview_custom_domain: Optional[str] = None,
domain_aliases: Optional[Sequence[str]] = None,
last_updated: Optional[str] = None,
site_id: Optional[str] = None) -> SiteDomainSettings
func GetSiteDomainSettings(ctx *Context, name string, id IDInput, state *SiteDomainSettingsState, opts ...ResourceOption) (*SiteDomainSettings, error)
public static SiteDomainSettings Get(string name, Input<string> id, SiteDomainSettingsState? state, CustomResourceOptions? opts = null)
public static SiteDomainSettings get(String name, Output<String> id, SiteDomainSettingsState state, CustomResourceOptions options)
resources: _: type: netlify:SiteDomainSettings get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Branch
Deploy stringCustom Domain - Custom
Domain string - Deploy
Preview stringCustom Domain - Domain
Aliases List<string> - Last
Updated string - Site
Id string
- Branch
Deploy stringCustom Domain - Custom
Domain string - Deploy
Preview stringCustom Domain - Domain
Aliases []string - Last
Updated string - Site
Id string
- branch
Deploy StringCustom Domain - custom
Domain String - deploy
Preview StringCustom Domain - domain
Aliases List<String> - last
Updated String - site
Id String
- branch
Deploy stringCustom Domain - custom
Domain string - deploy
Preview stringCustom Domain - domain
Aliases string[] - last
Updated string - site
Id string
- branch_
deploy_ strcustom_ domain - custom_
domain str - deploy_
preview_ strcustom_ domain - domain_
aliases Sequence[str] - last_
updated str - site_
id str
- branch
Deploy StringCustom Domain - custom
Domain String - deploy
Preview StringCustom Domain - domain
Aliases List<String> - last
Updated String - site
Id String
Import
Import a site’s domain settings by the site ID
$ pulumi import netlify:index/siteDomainSettings:SiteDomainSettings blog 12345667-0000-0000-0000-abcdef012345
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- netlify netlify/terraform-provider-netlify
- License
- Notes
- This Pulumi package is based on the
netlify
Terraform Provider.