1. Packages
  2. Netlify Provider
  3. API Docs
  4. DeployKey
netlify 0.2.2 published on Friday, Mar 7, 2025 by netlify

netlify.DeployKey

Explore with Pulumi AI

Deploy key for Git repositories. Avoid creating this resource directly if possible. Read more

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as netlify from "@pulumi/netlify";

const common = new netlify.DeployKey("common", {});
Copy
import pulumi
import pulumi_netlify as netlify

common = netlify.DeployKey("common")
Copy
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.NewDeployKey(ctx, "common", nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netlify = Pulumi.Netlify;

return await Deployment.RunAsync(() => 
{
    var common = new Netlify.DeployKey("common");

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netlify.DeployKey;
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 common = new DeployKey("common");

    }
}
Copy
resources:
  common:
    type: netlify:DeployKey
Copy

Create DeployKey Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DeployKey(name: string, args?: DeployKeyArgs, opts?: CustomResourceOptions);
@overload
def DeployKey(resource_name: str,
              args: Optional[DeployKeyArgs] = None,
              opts: Optional[ResourceOptions] = None)

@overload
def DeployKey(resource_name: str,
              opts: Optional[ResourceOptions] = None)
func NewDeployKey(ctx *Context, name string, args *DeployKeyArgs, opts ...ResourceOption) (*DeployKey, error)
public DeployKey(string name, DeployKeyArgs? args = null, CustomResourceOptions? opts = null)
public DeployKey(String name, DeployKeyArgs args)
public DeployKey(String name, DeployKeyArgs args, CustomResourceOptions options)
type: netlify:DeployKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args DeployKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args DeployKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args DeployKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args DeployKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DeployKeyArgs
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 deployKeyResource = new Netlify.DeployKey("deployKeyResource");
Copy
example, err := netlify.NewDeployKey(ctx, "deployKeyResource", nil)
Copy
var deployKeyResource = new DeployKey("deployKeyResource");
Copy
deploy_key_resource = netlify.DeployKey("deployKeyResource")
Copy
const deployKeyResource = new netlify.DeployKey("deployKeyResource", {});
Copy
type: netlify:DeployKey
properties: {}
Copy

DeployKey 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 DeployKey resource accepts the following input properties:

Outputs

All input properties are implicitly available as output properties. Additionally, the DeployKey resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
LastUpdated string
PublicKey string
Id string
The provider-assigned unique ID for this managed resource.
LastUpdated string
PublicKey string
id String
The provider-assigned unique ID for this managed resource.
lastUpdated String
publicKey String
id string
The provider-assigned unique ID for this managed resource.
lastUpdated string
publicKey string
id str
The provider-assigned unique ID for this managed resource.
last_updated str
public_key str
id String
The provider-assigned unique ID for this managed resource.
lastUpdated String
publicKey String

Look up Existing DeployKey Resource

Get an existing DeployKey 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?: DeployKeyState, opts?: CustomResourceOptions): DeployKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        last_updated: Optional[str] = None,
        public_key: Optional[str] = None) -> DeployKey
func GetDeployKey(ctx *Context, name string, id IDInput, state *DeployKeyState, opts ...ResourceOption) (*DeployKey, error)
public static DeployKey Get(string name, Input<string> id, DeployKeyState? state, CustomResourceOptions? opts = null)
public static DeployKey get(String name, Output<String> id, DeployKeyState state, CustomResourceOptions options)
resources:  _:    type: netlify:DeployKey    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
LastUpdated string
PublicKey string
LastUpdated string
PublicKey string
lastUpdated String
publicKey String
lastUpdated string
publicKey string
lastUpdated String
publicKey String

Import

Import a deploy key by its ID

$ pulumi import netlify:index/deployKey:DeployKey common 6600abcdef1234567890abcd
Copy

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.