vercel

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MPL-2.0 Imports: 40 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() provider.Provider

New instantiates a new instance of a vercel terraform provider.

Types

type AddErrorer added in v0.9.0

type AddErrorer interface {
	AddError(summary string, detail string)
}

AddErrorer defines an interface that contains the AddError method. Most commonly used with Diagnostics.

type Alias added in v0.6.0

type Alias struct {
	Alias        types.String `tfsdk:"alias"`
	ID           types.String `tfsdk:"id"`
	DeploymentID types.String `tfsdk:"deployment_id"`
	TeamID       types.String `tfsdk:"team_id"`
}

Alias represents the terraform state for an alias resource.

type DNSRecord added in v0.5.0

type DNSRecord struct {
	ID         types.String `tfsdk:"id"`
	Domain     types.String `tfsdk:"domain"`
	MXPriority types.Int64  `tfsdk:"mx_priority"`
	Name       types.String `tfsdk:"name"`
	SRV        *SRV         `tfsdk:"srv"`
	TTL        types.Int64  `tfsdk:"ttl"`
	TeamID     types.String `tfsdk:"team_id"`
	Type       types.String `tfsdk:"type"`
	Value      types.String `tfsdk:"value"`
	Comment    types.String `tfsdk:"comment"`
}

DNSRecord reflects the state terraform stores internally for a DNS Record.

type DeployHook added in v1.9.0

type DeployHook struct {
	Name types.String `tfsdk:"name"`
	Ref  types.String `tfsdk:"ref"`
	URL  types.String `tfsdk:"url"`
	ID   types.String `tfsdk:"id"`
}

type Deployment

type Deployment struct {
	Domains         types.List       `tfsdk:"domains"`
	Environment     types.Map        `tfsdk:"environment"`
	Files           types.Map        `tfsdk:"files"`
	ID              types.String     `tfsdk:"id"`
	Production      types.Bool       `tfsdk:"production"`
	ProjectID       types.String     `tfsdk:"project_id"`
	PathPrefix      types.String     `tfsdk:"path_prefix"`
	ProjectSettings *ProjectSettings `tfsdk:"project_settings"`
	TeamID          types.String     `tfsdk:"team_id"`
	URL             types.String     `tfsdk:"url"`
	DeleteOnDestroy types.Bool       `tfsdk:"delete_on_destroy"`
	Ref             types.String     `tfsdk:"ref"`
}

Deployment represents the terraform state for a deployment resource.

type DeploymentDataSource added in v1.8.0

type DeploymentDataSource struct {
	Domains    types.List   `tfsdk:"domains"`
	ID         types.String `tfsdk:"id"`
	Production types.Bool   `tfsdk:"production"`
	ProjectID  types.String `tfsdk:"project_id"`
	TeamID     types.String `tfsdk:"team_id"`
	URL        types.String `tfsdk:"url"`
	Ref        types.String `tfsdk:"ref"`
}

type EdgeConfig added in v1.5.0

type EdgeConfig struct {
	Name   types.String `tfsdk:"name"`
	ID     types.String `tfsdk:"id"`
	TeamID types.String `tfsdk:"team_id"`
}

type EdgeConfigSchema added in v1.5.0

type EdgeConfigSchema struct {
	ID         types.String `tfsdk:"id"`
	Definition types.String `tfsdk:"definition"`
	TeamID     types.String `tfsdk:"team_id"`
}

func (EdgeConfigSchema) JSONDefinition added in v1.5.0

func (e EdgeConfigSchema) JSONDefinition() (i any, err error)

type EdgeConfigToken added in v1.5.0

type EdgeConfigToken struct {
	Label            types.String `tfsdk:"label"`
	Token            types.String `tfsdk:"token"`
	ID               types.String `tfsdk:"id"`
	TeamID           types.String `tfsdk:"team_id"`
	EdgeConfigID     types.String `tfsdk:"edge_config_id"`
	ConnectionString types.String `tfsdk:"connection_string"`
}

type EndpointVerification added in v1.7.0

type EndpointVerification struct {
	ID               types.String `tfsdk:"id"`
	TeamID           types.String `tfsdk:"team_id"`
	VerificationCode types.String `tfsdk:"verification_code"`
}

FileData represents the information terraform knows about a File data source

type EnvironmentItem

type EnvironmentItem struct {
	Target    []types.String `tfsdk:"target"`
	GitBranch types.String   `tfsdk:"git_branch"`
	Key       types.String   `tfsdk:"key"`
	Value     types.String   `tfsdk:"value"`
	ID        types.String   `tfsdk:"id"`
	Sensitive types.Bool     `tfsdk:"sensitive"`
}

EnvironmentItem reflects the state terraform stores internally for a project's environment variable.

type FileData

type FileData struct {
	Path types.String      `tfsdk:"path"`
	ID   types.String      `tfsdk:"id"`
	File map[string]string `tfsdk:"file"`
}

FileData represents the information terraform knows about a File data source

type GitComments added in v1.9.0

type GitComments struct {
	OnPullRequest types.Bool `tfsdk:"on_pull_request"`
	OnCommit      types.Bool `tfsdk:"on_commit"`
}

type GitRepository

type GitRepository struct {
	Type             types.String `tfsdk:"type"`
	Repo             types.String `tfsdk:"repo"`
	ProductionBranch types.String `tfsdk:"production_branch"`
	DeployHooks      types.Set    `tfsdk:"deploy_hooks"`
}

GitRepository reflects the state terraform stores internally for a nested git_repository block on a project resource.

type LogDrain added in v1.7.0

type LogDrain struct {
	ID             types.String  `tfsdk:"id"`
	TeamID         types.String  `tfsdk:"team_id"`
	DeliveryFormat types.String  `tfsdk:"delivery_format"`
	Environments   types.Set     `tfsdk:"environments"`
	Headers        types.Map     `tfsdk:"headers"`
	ProjectIDs     types.Set     `tfsdk:"project_ids"`
	SamplingRate   types.Float64 `tfsdk:"sampling_rate"`
	Secret         types.String  `tfsdk:"secret"`
	Sources        types.Set     `tfsdk:"sources"`
	Endpoint       types.String  `tfsdk:"endpoint"`
}

type LogDrainWithoutSecret added in v1.7.0

type LogDrainWithoutSecret struct {
	ID             types.String  `tfsdk:"id"`
	TeamID         types.String  `tfsdk:"team_id"`
	DeliveryFormat types.String  `tfsdk:"delivery_format"`
	Environments   types.Set     `tfsdk:"environments"`
	Headers        types.Map     `tfsdk:"headers"`
	ProjectIDs     types.Set     `tfsdk:"project_ids"`
	SamplingRate   types.Float64 `tfsdk:"sampling_rate"`
	Sources        types.Set     `tfsdk:"sources"`
	Endpoint       types.String  `tfsdk:"endpoint"`
}

type PasswordProtection added in v0.13.0

type PasswordProtection struct {
	DeploymentType types.String `tfsdk:"deployment_type"`
}

type PasswordProtectionWithPassword added in v1.0.0

type PasswordProtectionWithPassword struct {
	DeploymentType types.String `tfsdk:"deployment_type"`
	Password       types.String `tfsdk:"password"`
}

type PrebuiltProjectData added in v0.9.0

type PrebuiltProjectData struct {
	Path   types.String      `tfsdk:"path"`
	ID     types.String      `tfsdk:"id"`
	Output map[string]string `tfsdk:"output"`
}

PrebuiltProjectData represents the information terraform knows about a project directory data source

type Project

type Project struct {
	BuildCommand                        types.String                    `tfsdk:"build_command"`
	DevCommand                          types.String                    `tfsdk:"dev_command"`
	Environment                         types.Set                       `tfsdk:"environment"`
	Framework                           types.String                    `tfsdk:"framework"`
	GitRepository                       *GitRepository                  `tfsdk:"git_repository"`
	ID                                  types.String                    `tfsdk:"id"`
	IgnoreCommand                       types.String                    `tfsdk:"ignore_command"`
	InstallCommand                      types.String                    `tfsdk:"install_command"`
	Name                                types.String                    `tfsdk:"name"`
	OutputDirectory                     types.String                    `tfsdk:"output_directory"`
	PublicSource                        types.Bool                      `tfsdk:"public_source"`
	RootDirectory                       types.String                    `tfsdk:"root_directory"`
	ServerlessFunctionRegion            types.String                    `tfsdk:"serverless_function_region"`
	TeamID                              types.String                    `tfsdk:"team_id"`
	VercelAuthentication                *VercelAuthentication           `tfsdk:"vercel_authentication"`
	PasswordProtection                  *PasswordProtectionWithPassword `tfsdk:"password_protection"`
	TrustedIps                          *TrustedIps                     `tfsdk:"trusted_ips"`
	ProtectionBypassForAutomation       types.Bool                      `tfsdk:"protection_bypass_for_automation"`
	ProtectionBypassForAutomationSecret types.String                    `tfsdk:"protection_bypass_for_automation_secret"`
	AutoExposeSystemEnvVars             types.Bool                      `tfsdk:"automatically_expose_system_environment_variables"`
	GitComments                         types.Object                    `tfsdk:"git_comments"`
	PreviewComments                     types.Bool                      `tfsdk:"preview_comments"`
	AutoAssignCustomDomains             types.Bool                      `tfsdk:"auto_assign_custom_domains"`
	GitLFS                              types.Bool                      `tfsdk:"git_lfs"`
	FunctionFailover                    types.Bool                      `tfsdk:"function_failover"`
	CustomerSuccessCodeVisibility       types.Bool                      `tfsdk:"customer_success_code_visibility"`
	GitForkProtection                   types.Bool                      `tfsdk:"git_fork_protection"`
	PrioritiseProductionBuilds          types.Bool                      `tfsdk:"prioritise_production_builds"`
	DirectoryListing                    types.Bool                      `tfsdk:"directory_listing"`
	SkewProtection                      types.String                    `tfsdk:"skew_protection"`
}

Project reflects the state terraform stores internally for a project.

func (Project) RequiresUpdateAfterCreation added in v1.9.0

func (p Project) RequiresUpdateAfterCreation() bool

type ProjectDataSource added in v0.13.0

type ProjectDataSource struct {
	BuildCommand                  types.String          `tfsdk:"build_command"`
	DevCommand                    types.String          `tfsdk:"dev_command"`
	Environment                   types.Set             `tfsdk:"environment"`
	Framework                     types.String          `tfsdk:"framework"`
	GitRepository                 *GitRepository        `tfsdk:"git_repository"`
	ID                            types.String          `tfsdk:"id"`
	IgnoreCommand                 types.String          `tfsdk:"ignore_command"`
	InstallCommand                types.String          `tfsdk:"install_command"`
	Name                          types.String          `tfsdk:"name"`
	OutputDirectory               types.String          `tfsdk:"output_directory"`
	PublicSource                  types.Bool            `tfsdk:"public_source"`
	RootDirectory                 types.String          `tfsdk:"root_directory"`
	ServerlessFunctionRegion      types.String          `tfsdk:"serverless_function_region"`
	TeamID                        types.String          `tfsdk:"team_id"`
	VercelAuthentication          *VercelAuthentication `tfsdk:"vercel_authentication"`
	PasswordProtection            *PasswordProtection   `tfsdk:"password_protection"`
	TrustedIps                    *TrustedIps           `tfsdk:"trusted_ips"`
	ProtectionBypassForAutomation types.Bool            `tfsdk:"protection_bypass_for_automation"`
	AutoExposeSystemEnvVars       types.Bool            `tfsdk:"automatically_expose_system_environment_variables"`
	GitComments                   types.Object          `tfsdk:"git_comments"`
	PreviewComments               types.Bool            `tfsdk:"preview_comments"`
	AutoAssignCustomDomains       types.Bool            `tfsdk:"auto_assign_custom_domains"`
	GitLFS                        types.Bool            `tfsdk:"git_lfs"`
	FunctionFailover              types.Bool            `tfsdk:"function_failover"`
	CustomerSuccessCodeVisibility types.Bool            `tfsdk:"customer_success_code_visibility"`
	GitForkProtection             types.Bool            `tfsdk:"git_fork_protection"`
	PrioritiseProductionBuilds    types.Bool            `tfsdk:"prioritise_production_builds"`
	DirectoryListing              types.Bool            `tfsdk:"directory_listing"`
	SkewProtection                types.String          `tfsdk:"skew_protection"`
}

Project reflects the state terraform stores internally for a project.

type ProjectDirectoryData

type ProjectDirectoryData struct {
	Path  types.String      `tfsdk:"path"`
	ID    types.String      `tfsdk:"id"`
	Files map[string]string `tfsdk:"files"`
}

ProjectDirectoryData represents the information terraform knows about a project directory data source

type ProjectDomain

type ProjectDomain struct {
	Domain             types.String `tfsdk:"domain"`
	GitBranch          types.String `tfsdk:"git_branch"`
	ID                 types.String `tfsdk:"id"`
	ProjectID          types.String `tfsdk:"project_id"`
	Redirect           types.String `tfsdk:"redirect"`
	RedirectStatusCode types.Int64  `tfsdk:"redirect_status_code"`
	TeamID             types.String `tfsdk:"team_id"`
}

ProjectDomain reflects the state terraform stores internally for a project domain.

type ProjectEnvironmentVariable added in v0.8.0

type ProjectEnvironmentVariable struct {
	Target    []types.String `tfsdk:"target"`
	GitBranch types.String   `tfsdk:"git_branch"`
	Key       types.String   `tfsdk:"key"`
	Value     types.String   `tfsdk:"value"`
	TeamID    types.String   `tfsdk:"team_id"`
	ProjectID types.String   `tfsdk:"project_id"`
	ID        types.String   `tfsdk:"id"`
	Sensitive types.Bool     `tfsdk:"sensitive"`
}

ProjectEnvironmentVariable reflects the state terraform stores internally for a project environment variable.

type ProjectSettings

type ProjectSettings struct {
	BuildCommand    types.String `tfsdk:"build_command"`
	Framework       types.String `tfsdk:"framework"`
	InstallCommand  types.String `tfsdk:"install_command"`
	OutputDirectory types.String `tfsdk:"output_directory"`
	RootDirectory   types.String `tfsdk:"root_directory"`
}

ProjectSettings represents the terraform state for a nested deployment -> project_settings block. These are overrides specific to a single deployment.

type ProtectionBypass added in v1.0.0

type ProtectionBypass struct {
	Scope types.String `tfsdk:"scope"`
}

type SRV added in v0.5.0

type SRV struct {
	Port     types.Int64  `tfsdk:"port"`
	Priority types.Int64  `tfsdk:"priority"`
	Target   types.String `tfsdk:"target"`
	Weight   types.Int64  `tfsdk:"weight"`
}

SRV reflect the state terraform stores internally for a nested SRV Record.

type SharedEnvironmentVariable added in v0.12.0

type SharedEnvironmentVariable struct {
	Target     types.Set    `tfsdk:"target"`
	Key        types.String `tfsdk:"key"`
	Value      types.String `tfsdk:"value"`
	TeamID     types.String `tfsdk:"team_id"`
	ProjectIDs types.Set    `tfsdk:"project_ids"`
	ID         types.String `tfsdk:"id"`
	Sensitive  types.Bool   `tfsdk:"sensitive"`
}

SharedEnvironmentVariable reflects the state terraform stores internally for a project environment variable.

type TrustedIpAddress added in v1.0.0

type TrustedIpAddress struct {
	Value types.String `tfsdk:"value"`
	Note  types.String `tfsdk:"note"`
}

type TrustedIps added in v1.0.0

type TrustedIps struct {
	DeploymentType types.String       `tfsdk:"deployment_type"`
	Addresses      []TrustedIpAddress `tfsdk:"addresses"`
	ProtectionMode types.String       `tfsdk:"protection_mode"`
}

type VercelAuthentication added in v0.13.0

type VercelAuthentication struct {
	DeploymentType types.String `tfsdk:"deployment_type"`
}

type Webhook added in v1.6.0

type Webhook struct {
	ID         types.String `tfsdk:"id"`
	TeamID     types.String `tfsdk:"team_id"`
	Endpoint   types.String `tfsdk:"endpoint"`
	Secret     types.String `tfsdk:"secret"`
	ProjectIDs types.Set    `tfsdk:"project_ids"`
	Events     types.Set    `tfsdk:"events"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL