incapsula.SiteDomainConfiguration
Explore with Pulumi AI
Provides an Incapsula Site Domain Configuration resource. The provider will add/delete domains to/from an Imperva site, based on this resource.
Note: The provider is using a single update request, hence domains that exists in the account, but are missing from the TF file will be deleted.
This resource is designed to work with sites represented by the “incapsula.Site” resource, and cannot be used together in the same configuration with the “incapsula.Domain” resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const site_domain_configuration = new incapsula.SiteDomainConfiguration("site-domain-configuration", {
siteId: incapsula_site["example-site"].id,
domains: [
{
name: "example-a.my-web-site.com",
},
{
name: "example-b.my-web-site.com",
},
],
});
import pulumi
import pulumi_incapsula as incapsula
site_domain_configuration = incapsula.SiteDomainConfiguration("site-domain-configuration",
site_id=incapsula_site["example-site"]["id"],
domains=[
{
"name": "example-a.my-web-site.com",
},
{
"name": "example-b.my-web-site.com",
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := incapsula.NewSiteDomainConfiguration(ctx, "site-domain-configuration", &incapsula.SiteDomainConfigurationArgs{
SiteId: pulumi.Any(incapsula_site.ExampleSite.Id),
Domains: incapsula.SiteDomainConfigurationDomainArray{
&incapsula.SiteDomainConfigurationDomainArgs{
Name: pulumi.String("example-a.my-web-site.com"),
},
&incapsula.SiteDomainConfigurationDomainArgs{
Name: pulumi.String("example-b.my-web-site.com"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var site_domain_configuration = new Incapsula.SiteDomainConfiguration("site-domain-configuration", new()
{
SiteId = incapsula_site.Example_site.Id,
Domains = new[]
{
new Incapsula.Inputs.SiteDomainConfigurationDomainArgs
{
Name = "example-a.my-web-site.com",
},
new Incapsula.Inputs.SiteDomainConfigurationDomainArgs
{
Name = "example-b.my-web-site.com",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.SiteDomainConfiguration;
import com.pulumi.incapsula.SiteDomainConfigurationArgs;
import com.pulumi.incapsula.inputs.SiteDomainConfigurationDomainArgs;
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 site_domain_configuration = new SiteDomainConfiguration("site-domain-configuration", SiteDomainConfigurationArgs.builder()
.siteId(incapsula_site.example-site().id())
.domains(
SiteDomainConfigurationDomainArgs.builder()
.name("example-a.my-web-site.com")
.build(),
SiteDomainConfigurationDomainArgs.builder()
.name("example-b.my-web-site.com")
.build())
.build());
}
}
resources:
site-domain-configuration:
type: incapsula:SiteDomainConfiguration
properties:
siteId: ${incapsula_site"example-site"[%!s(MISSING)].id}
domains:
- name: example-a.my-web-site.com
- name: example-b.my-web-site.com
Limitations
Auto-discovered domains:
The provider ignores Auto-Discovered domains, hence it will not delete such domains, and it will not manage them on the TF state.
Maximum domains per Imperva site:
As per the official Website Domain Management feature, the number of domains permitted for each website is
up to 1,000.
Note: This includes auto-discovered domains.
The official docs for Website Domain Management API are located here: https://docs.imperva.com/bundle/cloud-application-security/page/website-domain-api-definition.htm
Create SiteDomainConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SiteDomainConfiguration(name: string, args: SiteDomainConfigurationArgs, opts?: CustomResourceOptions);
@overload
def SiteDomainConfiguration(resource_name: str,
args: SiteDomainConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SiteDomainConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
domains: Optional[Sequence[SiteDomainConfigurationDomainArgs]] = None,
site_id: Optional[str] = None,
deprecated: Optional[bool] = None,
site_domain_configuration_id: Optional[str] = None,
timeouts: Optional[SiteDomainConfigurationTimeoutsArgs] = None)
func NewSiteDomainConfiguration(ctx *Context, name string, args SiteDomainConfigurationArgs, opts ...ResourceOption) (*SiteDomainConfiguration, error)
public SiteDomainConfiguration(string name, SiteDomainConfigurationArgs args, CustomResourceOptions? opts = null)
public SiteDomainConfiguration(String name, SiteDomainConfigurationArgs args)
public SiteDomainConfiguration(String name, SiteDomainConfigurationArgs args, CustomResourceOptions options)
type: incapsula:SiteDomainConfiguration
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 SiteDomainConfigurationArgs
- 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 SiteDomainConfigurationArgs
- 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 SiteDomainConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SiteDomainConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SiteDomainConfigurationArgs
- 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 siteDomainConfigurationResource = new Incapsula.SiteDomainConfiguration("siteDomainConfigurationResource", new()
{
Domains = new[]
{
new Incapsula.Inputs.SiteDomainConfigurationDomainArgs
{
Name = "string",
ARecords = new[]
{
"string",
},
Id = 0,
Status = "string",
},
},
SiteId = "string",
Deprecated = false,
SiteDomainConfigurationId = "string",
Timeouts = new Incapsula.Inputs.SiteDomainConfigurationTimeoutsArgs
{
Read = "string",
Update = "string",
},
});
example, err := incapsula.NewSiteDomainConfiguration(ctx, "siteDomainConfigurationResource", &incapsula.SiteDomainConfigurationArgs{
Domains: incapsula.SiteDomainConfigurationDomainArray{
&incapsula.SiteDomainConfigurationDomainArgs{
Name: pulumi.String("string"),
ARecords: pulumi.StringArray{
pulumi.String("string"),
},
Id: pulumi.Float64(0),
Status: pulumi.String("string"),
},
},
SiteId: pulumi.String("string"),
Deprecated: pulumi.Bool(false),
SiteDomainConfigurationId: pulumi.String("string"),
Timeouts: &incapsula.SiteDomainConfigurationTimeoutsArgs{
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var siteDomainConfigurationResource = new SiteDomainConfiguration("siteDomainConfigurationResource", SiteDomainConfigurationArgs.builder()
.domains(SiteDomainConfigurationDomainArgs.builder()
.name("string")
.aRecords("string")
.id(0)
.status("string")
.build())
.siteId("string")
.deprecated(false)
.siteDomainConfigurationId("string")
.timeouts(SiteDomainConfigurationTimeoutsArgs.builder()
.read("string")
.update("string")
.build())
.build());
site_domain_configuration_resource = incapsula.SiteDomainConfiguration("siteDomainConfigurationResource",
domains=[{
"name": "string",
"a_records": ["string"],
"id": 0,
"status": "string",
}],
site_id="string",
deprecated=False,
site_domain_configuration_id="string",
timeouts={
"read": "string",
"update": "string",
})
const siteDomainConfigurationResource = new incapsula.SiteDomainConfiguration("siteDomainConfigurationResource", {
domains: [{
name: "string",
aRecords: ["string"],
id: 0,
status: "string",
}],
siteId: "string",
deprecated: false,
siteDomainConfigurationId: "string",
timeouts: {
read: "string",
update: "string",
},
});
type: incapsula:SiteDomainConfiguration
properties:
deprecated: false
domains:
- aRecords:
- string
id: 0
name: string
status: string
siteDomainConfigurationId: string
siteId: string
timeouts:
read: string
update: string
SiteDomainConfiguration 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 SiteDomainConfiguration resource accepts the following input properties:
- Domains
List<Site
Domain Configuration Domain> - The fully qualified domain name of the site.
- Site
Id string - Numeric identifier of the site to operate on.
- Deprecated bool
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- Site
Domain stringConfiguration Id - The id of the domain.
- Timeouts
Site
Domain Configuration Timeouts
- Domains
[]Site
Domain Configuration Domain Args - The fully qualified domain name of the site.
- Site
Id string - Numeric identifier of the site to operate on.
- Deprecated bool
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- Site
Domain stringConfiguration Id - The id of the domain.
- Timeouts
Site
Domain Configuration Timeouts Args
- domains
List<Site
Domain Configuration Domain> - The fully qualified domain name of the site.
- site
Id String - Numeric identifier of the site to operate on.
- deprecated Boolean
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- site
Domain StringConfiguration Id - The id of the domain.
- timeouts
Site
Domain Configuration Timeouts
- domains
Site
Domain Configuration Domain[] - The fully qualified domain name of the site.
- site
Id string - Numeric identifier of the site to operate on.
- deprecated boolean
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- site
Domain stringConfiguration Id - The id of the domain.
- timeouts
Site
Domain Configuration Timeouts
- domains
Sequence[Site
Domain Configuration Domain Args] - The fully qualified domain name of the site.
- site_
id str - Numeric identifier of the site to operate on.
- deprecated bool
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- site_
domain_ strconfiguration_ id - The id of the domain.
- timeouts
Site
Domain Configuration Timeouts Args
- domains List<Property Map>
- The fully qualified domain name of the site.
- site
Id String - Numeric identifier of the site to operate on.
- deprecated Boolean
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- site
Domain StringConfiguration Id - The id of the domain.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the SiteDomainConfiguration resource produces the following output properties:
- Cname
Redirection stringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- Id string
- The provider-assigned unique ID for this managed resource.
- Cname
Redirection stringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- Id string
- The provider-assigned unique ID for this managed resource.
- cname
Redirection StringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- id String
- The provider-assigned unique ID for this managed resource.
- cname
Redirection stringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- id string
- The provider-assigned unique ID for this managed resource.
- cname_
redirection_ strrecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- id str
- The provider-assigned unique ID for this managed resource.
- cname
Redirection StringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SiteDomainConfiguration Resource
Get an existing SiteDomainConfiguration 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?: SiteDomainConfigurationState, opts?: CustomResourceOptions): SiteDomainConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cname_redirection_record: Optional[str] = None,
deprecated: Optional[bool] = None,
domains: Optional[Sequence[SiteDomainConfigurationDomainArgs]] = None,
site_domain_configuration_id: Optional[str] = None,
site_id: Optional[str] = None,
timeouts: Optional[SiteDomainConfigurationTimeoutsArgs] = None) -> SiteDomainConfiguration
func GetSiteDomainConfiguration(ctx *Context, name string, id IDInput, state *SiteDomainConfigurationState, opts ...ResourceOption) (*SiteDomainConfiguration, error)
public static SiteDomainConfiguration Get(string name, Input<string> id, SiteDomainConfigurationState? state, CustomResourceOptions? opts = null)
public static SiteDomainConfiguration get(String name, Output<String> id, SiteDomainConfigurationState state, CustomResourceOptions options)
resources: _: type: incapsula:SiteDomainConfiguration 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.
- Cname
Redirection stringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- Deprecated bool
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- Domains
List<Site
Domain Configuration Domain> - The fully qualified domain name of the site.
- Site
Domain stringConfiguration Id - The id of the domain.
- Site
Id string - Numeric identifier of the site to operate on.
- Timeouts
Site
Domain Configuration Timeouts
- Cname
Redirection stringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- Deprecated bool
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- Domains
[]Site
Domain Configuration Domain Args - The fully qualified domain name of the site.
- Site
Domain stringConfiguration Id - The id of the domain.
- Site
Id string - Numeric identifier of the site to operate on.
- Timeouts
Site
Domain Configuration Timeouts Args
- cname
Redirection StringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- deprecated Boolean
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- domains
List<Site
Domain Configuration Domain> - The fully qualified domain name of the site.
- site
Domain StringConfiguration Id - The id of the domain.
- site
Id String - Numeric identifier of the site to operate on.
- timeouts
Site
Domain Configuration Timeouts
- cname
Redirection stringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- deprecated boolean
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- domains
Site
Domain Configuration Domain[] - The fully qualified domain name of the site.
- site
Domain stringConfiguration Id - The id of the domain.
- site
Id string - Numeric identifier of the site to operate on.
- timeouts
Site
Domain Configuration Timeouts
- cname_
redirection_ strrecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- deprecated bool
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- domains
Sequence[Site
Domain Configuration Domain Args] - The fully qualified domain name of the site.
- site_
domain_ strconfiguration_ id - The id of the domain.
- site_
id str - Numeric identifier of the site to operate on.
- timeouts
Site
Domain Configuration Timeouts Args
- cname
Redirection StringRecord - CNAME validation code for traffic redirection. Point your domain's DNS to this record in order to forward the traffic to Imperva
- deprecated Boolean
- Use 'true' to deprecate this resource, any change on the resource will not take effect. Deleting the resource will not delete the domains. Default value: false
- domains List<Property Map>
- The fully qualified domain name of the site.
- site
Domain StringConfiguration Id - The id of the domain.
- site
Id String - Numeric identifier of the site to operate on.
- timeouts Property Map
Supporting Types
SiteDomainConfigurationDomain, SiteDomainConfigurationDomainArgs
SiteDomainConfigurationTimeouts, SiteDomainConfigurationTimeoutsArgs
Import
Site domain configuration can be imported using the site_id, e.g.:
$ pulumi import incapsula:index/siteDomainConfiguration:SiteDomainConfiguration example_incapsula_site_domain_configuration site_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- incapsula imperva/terraform-provider-incapsula
- License
- Notes
- This Pulumi package is based on the
incapsula
Terraform Provider.