Skip to content

Commit

Permalink
upstream provider v1 (#102)
Browse files Browse the repository at this point in the history
v1
  • Loading branch information
omercnet authored Nov 27, 2023
1 parent 03b3e24 commit 5798c62
Show file tree
Hide file tree
Showing 37 changed files with 1,545 additions and 360 deletions.
8 changes: 8 additions & 0 deletions examples/examples_py_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ func getPythonBaseOptions(t *testing.T) integration.ProgramTestOptions {

return basePython
}

func TestAccVercelPy(t *testing.T) {
test := getPythonBaseOptions(t).
With(integration.ProgramTestOptions{
Dir: filepath.Join(getCwd(t), "vercel-py"),
})
integration.ProgramTest(t, &test)
}
6 changes: 6 additions & 0 deletions examples/vercel-py/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""A Python Pulumi program"""

import pulumi
import pulumiverse_vercel as vercel

project = vercel.Project("pulumi-vercel", root_directory="src")
deployment = vercel.Deployment("production-deployment", project_id=project.id, production=True, files=vercel.get_project_directory_output(path="./src").files)

pulumi.export("url", deployment.url)
36 changes: 32 additions & 4 deletions provider/cmd/pulumi-resource-vercel/bridge-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
}
}
}
},
"trusted_ips": {
"elem": {
"fields": {
"addresses": {
"maxItemsOne": false
}
}
}
}
}
},
Expand Down Expand Up @@ -91,6 +100,15 @@
}
}
}
},
"trusted_ips": {
"elem": {
"fields": {
"addresses": {
"maxItemsOne": false
}
}
}
}
}
},
Expand Down Expand Up @@ -502,10 +520,14 @@
"productionBranch": "production_branch"
},
"vercel:index/ProjectPasswordProtection:ProjectPasswordProtection": {
"protectProduction": "protect_production"
"deploymentType": "deployment_type"
},
"vercel:index/ProjectTrustedIps:ProjectTrustedIps": {
"deploymentType": "deployment_type",
"protectionMode": "protection_mode"
},
"vercel:index/ProjectVercelAuthentication:ProjectVercelAuthentication": {
"protectProduction": "protect_production"
"deploymentType": "deployment_type"
},
"vercel:index/alias:Alias": {
"deploymentId": "deployment_id",
Expand Down Expand Up @@ -539,6 +561,7 @@
"rootDirectory": "root_directory",
"serverlessFunctionRegion": "serverless_function_region",
"teamId": "team_id",
"trustedIps": "trusted_ips",
"vercelAuthentication": "vercel_authentication"
},
"vercel:index/getProjectEnvironment:getProjectEnvironment": {
Expand All @@ -549,10 +572,14 @@
"productionBranch": "production_branch"
},
"vercel:index/getProjectPasswordProtection:getProjectPasswordProtection": {
"protectProduction": "protect_production"
"deploymentType": "deployment_type"
},
"vercel:index/getProjectTrustedIps:getProjectTrustedIps": {
"deploymentType": "deployment_type",
"protectionMode": "protection_mode"
},
"vercel:index/getProjectVercelAuthentication:getProjectVercelAuthentication": {
"protectProduction": "protect_production"
"deploymentType": "deployment_type"
},
"vercel:index/project:Project": {
"buildCommand": "build_command",
Expand All @@ -569,6 +596,7 @@
"rootDirectory": "root_directory",
"serverlessFunctionRegion": "serverless_function_region",
"teamId": "team_id",
"trustedIps": "trusted_ips",
"vercelAuthentication": "vercel_authentication"
},
"vercel:index/projectDomain:ProjectDomain": {
Expand Down
160 changes: 132 additions & 28 deletions provider/cmd/pulumi-resource-vercel/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,44 +198,83 @@
},
"vercel:index/ProjectPasswordProtection:ProjectPasswordProtection": {
"properties": {
"deploymentType": {
"type": "string",
"description": "The deployment environment to protect. Must be one of `standard_protection`, `all_deployments`, or `only_preview_deployments`.\n"
},
"password": {
"type": "string",
"description": "The password that visitors must enter to gain access to your Preview Deployments. Drift detection is not possible for this field.\n",
"secret": true
},
"protectProduction": {
"type": "boolean",
"description": "If true, production deployments will also be protected\n"
}
},
"type": "object",
"required": [
"deploymentType",
"password"
]
},
"vercel:index/ProjectTrustedIps:ProjectTrustedIps": {
"properties": {
"addresses": {
"type": "array",
"items": {
"$ref": "#/types/vercel:index/ProjectTrustedIpsAddress:ProjectTrustedIpsAddress"
},
"description": "The allowed IP addressses and CIDR ranges with optional descriptions.\n"
},
"deploymentType": {
"type": "string",
"description": "The deployment environment to protect. Must be one of `standard_protection`, `all_deployments`, `only_production_deployments`, or `only_preview_deployments`.\n"
},
"protectionMode": {
"type": "string",
"description": "Whether or not Trusted IPs is optional to access a deployment. Must be either `trusted_ip_required` or `trusted_ip_optional`. `trusted_ip_optional` is only available with Standalone Trusted IPs.\n"
}
},
"type": "object",
"required": [
"addresses",
"deploymentType"
],
"language": {
"nodejs": {
"requiredOutputs": [
"password",
"protectProduction"
"addresses",
"deploymentType",
"protectionMode"
]
}
}
},
"vercel:index/ProjectVercelAuthentication:ProjectVercelAuthentication": {
"vercel:index/ProjectTrustedIpsAddress:ProjectTrustedIpsAddress": {
"properties": {
"protectProduction": {
"type": "boolean",
"description": "If true, production deployments will also be protected\n"
"note": {
"type": "string",
"description": "A description for the value\n"
},
"value": {
"type": "string",
"description": "The value of the Environment Variable.\n",
"secret": true
}
},
"type": "object",
"language": {
"nodejs": {
"requiredOutputs": [
"protectProduction"
]
"required": [
"value"
]
},
"vercel:index/ProjectVercelAuthentication:ProjectVercelAuthentication": {
"properties": {
"deploymentType": {
"type": "string",
"description": "The deployment environment to protect. Must be one of `standard_protection`, `all_deployments`, `only_preview_deployments`, or `none`.\n"
}
}
},
"type": "object",
"required": [
"deploymentType"
]
},
"vercel:index/getProjectEnvironment:getProjectEnvironment": {
"properties": {
Expand Down Expand Up @@ -306,14 +345,65 @@
},
"vercel:index/getProjectPasswordProtection:getProjectPasswordProtection": {
"properties": {
"protectProduction": {
"type": "boolean",
"description": "If true, production deployments will also be protected\n"
"deploymentType": {
"type": "string",
"description": "The deployment environment that will be protected.\n"
}
},
"type": "object",
"required": [
"deploymentType"
],
"language": {
"nodejs": {
"requiredInputs": []
}
}
},
"vercel:index/getProjectTrustedIps:getProjectTrustedIps": {
"properties": {
"addresses": {
"type": "array",
"items": {
"$ref": "#/types/vercel:index/getProjectTrustedIpsAddress:getProjectTrustedIpsAddress"
},
"description": "The allowed IP addressses and CIDR ranges with optional descriptions.\n"
},
"deploymentType": {
"type": "string",
"description": "The deployment environment that will be protected.\n"
},
"protectionMode": {
"type": "string",
"description": "Whether or not Trusted IPs is required or optional to access a deployment.\n"
}
},
"type": "object",
"required": [
"protectProduction"
"addresses",
"deploymentType",
"protectionMode"
],
"language": {
"nodejs": {
"requiredInputs": []
}
}
},
"vercel:index/getProjectTrustedIpsAddress:getProjectTrustedIpsAddress": {
"properties": {
"note": {
"type": "string"
},
"value": {
"type": "string",
"description": "The value of the environment variable.\n"
}
},
"type": "object",
"required": [
"note",
"value"
],
"language": {
"nodejs": {
Expand All @@ -323,14 +413,14 @@
},
"vercel:index/getProjectVercelAuthentication:getProjectVercelAuthentication": {
"properties": {
"protectProduction": {
"type": "boolean",
"description": "If true, production deployments will also be protected\n"
"deploymentType": {
"type": "string",
"description": "The deployment environment that will be protected.\n"
}
},
"type": "object",
"required": [
"protectProduction"
"deploymentType"
],
"language": {
"nodejs": {
Expand Down Expand Up @@ -798,6 +888,10 @@
"type": "string",
"description": "The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.\n"
},
"trustedIps": {
"$ref": "#/types/vercel:index/ProjectTrustedIps:ProjectTrustedIps",
"description": "Ensures only visitors from an allowed IP address can access your deployment.\n"
},
"vercelAuthentication": {
"$ref": "#/types/vercel:index/ProjectVercelAuthentication:ProjectVercelAuthentication",
"description": "Ensures visitors to your Preview Deployments are logged into Vercel and have a minimum of Viewer access on your team.\n"
Expand Down Expand Up @@ -874,6 +968,10 @@
"type": "string",
"description": "The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.\n"
},
"trustedIps": {
"$ref": "#/types/vercel:index/ProjectTrustedIps:ProjectTrustedIps",
"description": "Ensures only visitors from an allowed IP address can access your deployment.\n"
},
"vercelAuthentication": {
"$ref": "#/types/vercel:index/ProjectVercelAuthentication:ProjectVercelAuthentication",
"description": "Ensures visitors to your Preview Deployments are logged into Vercel and have a minimum of Viewer access on your team.\n"
Expand Down Expand Up @@ -949,6 +1047,10 @@
"type": "string",
"description": "The team ID to add the project to. Required when configuring a team resource if a default team has not been set in the provider.\n"
},
"trustedIps": {
"$ref": "#/types/vercel:index/ProjectTrustedIps:ProjectTrustedIps",
"description": "Ensures only visitors from an allowed IP address can access your deployment.\n"
},
"vercelAuthentication": {
"$ref": "#/types/vercel:index/ProjectVercelAuthentication:ProjectVercelAuthentication",
"description": "Ensures visitors to your Preview Deployments are logged into Vercel and have a minimum of Viewer access on your team.\n"
Expand Down Expand Up @@ -1406,10 +1508,6 @@
"type": "string",
"description": "The name of the project.\n"
},
"passwordProtection": {
"$ref": "#/types/vercel:index/getProjectPasswordProtection:getProjectPasswordProtection",
"description": "Ensures visitors of your Preview Deployments must enter a password in order to gain access.\n"
},
"teamId": {
"type": "string",
"description": "The team ID the project exists beneath. Required when configuring a team resource if a default team has not been set in the provider.\n"
Expand Down Expand Up @@ -1486,6 +1584,10 @@
"type": "string",
"description": "The team ID the project exists beneath. Required when configuring a team resource if a default team has not been set in the provider.\n"
},
"trustedIps": {
"$ref": "#/types/vercel:index/getProjectTrustedIps:getProjectTrustedIps",
"description": "Ensures only visitors from an allowed IP address can access your deployment.\n"
},
"vercelAuthentication": {
"$ref": "#/types/vercel:index/getProjectVercelAuthentication:getProjectVercelAuthentication",
"description": "Ensures visitors to your Preview Deployments are logged into Vercel and have a minimum of Viewer access on your team.\n"
Expand All @@ -1503,10 +1605,12 @@
"installCommand",
"name",
"outputDirectory",
"passwordProtection",
"publicSource",
"rootDirectory",
"serverlessFunctionRegion",
"teamId",
"trustedIps",
"vercelAuthentication"
]
}
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/pulumi/pulumi-terraform-bridge/pf v0.20.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.66.0
github.com/vercel/terraform-provider-vercel v0.16.0
github.com/vercel/terraform-provider-vercel v1.0.0
golang.org/x/text v0.14.0
)

Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1811,8 +1811,8 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vercel/terraform-provider-vercel v0.16.0 h1:7qi5yskBtwpK71AeJTXSktM24aX15uE0WTKMSu0xZsA=
github.com/vercel/terraform-provider-vercel v0.16.0/go.mod h1:D0bLKoMfiSUmDxGqFYICdDO6e1RH43yIyotzb5Va+94=
github.com/vercel/terraform-provider-vercel v1.0.0 h1:sTjfIvseri7dEHv5wO83fkCBCCYQ4P5Emnc9gMFJi5g=
github.com/vercel/terraform-provider-vercel v1.0.0/go.mod h1:D0bLKoMfiSUmDxGqFYICdDO6e1RH43yIyotzb5Va+94=
github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
Expand Down
Loading

0 comments on commit 5798c62

Please sign in to comment.