1. Packages
  2. Packages
  3. Fastly Provider
  4. API Docs
  5. TsigKey
Viewing docs for Fastly v12.2.1
published on Saturday, Jun 6, 2026 by Pulumi
fastly logo
Viewing docs for Fastly v12.2.1
published on Saturday, Jun 6, 2026 by Pulumi

    Provides a Fastly TSIG Key.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fastly from "@pulumi/fastly";
    
    // IMPORTANT: Deleting a TSIG Key requires first removing the inbound_tsig_key_id reference in any DNS Zone that uses it.
    // This requires a two-step `pulumi up` as we can't guarantee deletion order.
    // e.g. removal of inbound_tsig_key_id within fastly_dns_zone might not finish first.
    const example = new fastly.TsigKey("example", {
        name: "example.com.",
        algorithm: "hmac-sha256",
        secret: "c2VjcmV0a2V5MTIzNDU2Nzg=",
        description: "My TSIG key",
    });
    
    import pulumi
    import pulumi_fastly as fastly
    
    # IMPORTANT: Deleting a TSIG Key requires first removing the inbound_tsig_key_id reference in any DNS Zone that uses it.
    # This requires a two-step `pulumi up` as we can't guarantee deletion order.
    # e.g. removal of inbound_tsig_key_id within fastly_dns_zone might not finish first.
    example = fastly.TsigKey("example",
        name="example.com.",
        algorithm="hmac-sha256",
        secret="c2VjcmV0a2V5MTIzNDU2Nzg=",
        description="My TSIG key")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-fastly/sdk/v12/go/fastly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// IMPORTANT: Deleting a TSIG Key requires first removing the inbound_tsig_key_id reference in any DNS Zone that uses it.
    		// This requires a two-step `pulumi up` as we can't guarantee deletion order.
    		// e.g. removal of inbound_tsig_key_id within fastly_dns_zone might not finish first.
    		_, err := fastly.NewTsigKey(ctx, "example", &fastly.TsigKeyArgs{
    			Name:        pulumi.String("example.com."),
    			Algorithm:   pulumi.String("hmac-sha256"),
    			Secret:      pulumi.String("c2VjcmV0a2V5MTIzNDU2Nzg="),
    			Description: pulumi.String("My TSIG key"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        // IMPORTANT: Deleting a TSIG Key requires first removing the inbound_tsig_key_id reference in any DNS Zone that uses it.
        // This requires a two-step `pulumi up` as we can't guarantee deletion order.
        // e.g. removal of inbound_tsig_key_id within fastly_dns_zone might not finish first.
        var example = new Fastly.TsigKey("example", new()
        {
            Name = "example.com.",
            Algorithm = "hmac-sha256",
            Secret = "c2VjcmV0a2V5MTIzNDU2Nzg=",
            Description = "My TSIG key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fastly.TsigKey;
    import com.pulumi.fastly.TsigKeyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // IMPORTANT: Deleting a TSIG Key requires first removing the inbound_tsig_key_id reference in any DNS Zone that uses it.
            // This requires a two-step `pulumi up` as we can't guarantee deletion order.
            // e.g. removal of inbound_tsig_key_id within fastly_dns_zone might not finish first.
            var example = new TsigKey("example", TsigKeyArgs.builder()
                .name("example.com.")
                .algorithm("hmac-sha256")
                .secret("c2VjcmV0a2V5MTIzNDU2Nzg=")
                .description("My TSIG key")
                .build());
    
        }
    }
    
    resources:
      # IMPORTANT: Deleting a TSIG Key requires first removing the inbound_tsig_key_id reference in any DNS Zone that uses it.
      # This requires a two-step `pulumi up` as we can't guarantee deletion order.
      # e.g. removal of inbound_tsig_key_id within fastly_dns_zone might not finish first.
      example:
        type: fastly:TsigKey
        properties:
          name: example.com.
          algorithm: hmac-sha256
          secret: c2VjcmV0a2V5MTIzNDU2Nzg=
          description: My TSIG key
    
    pulumi {
      required_providers {
        fastly = {
          source = "pulumi/fastly"
        }
      }
    }
    
    # IMPORTANT: Deleting a TSIG Key requires first removing the inbound_tsig_key_id reference in any DNS Zone that uses it.
    # This requires a two-step `pulumi up` as we can't guarantee deletion order.
    # e.g. removal of inbound_tsig_key_id within fastly_dns_zone might not finish first.
    resource "fastly_tsigkey" "example" {
      name        = "example.com."
      algorithm   = "hmac-sha256"
      secret      = "c2VjcmV0a2V5MTIzNDU2Nzg="
      description = "My TSIG key"
    }
    

    Create TsigKey Resource

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

    Constructor syntax

    new TsigKey(name: string, args: TsigKeyArgs, opts?: CustomResourceOptions);
    @overload
    def TsigKey(resource_name: str,
                args: TsigKeyArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def TsigKey(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                algorithm: Optional[str] = None,
                secret: Optional[str] = None,
                description: Optional[str] = None,
                name: Optional[str] = None)
    func NewTsigKey(ctx *Context, name string, args TsigKeyArgs, opts ...ResourceOption) (*TsigKey, error)
    public TsigKey(string name, TsigKeyArgs args, CustomResourceOptions? opts = null)
    public TsigKey(String name, TsigKeyArgs args)
    public TsigKey(String name, TsigKeyArgs args, CustomResourceOptions options)
    
    type: fastly:TsigKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "fastly_tsigkey" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TsigKeyArgs
    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 TsigKeyArgs
    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 TsigKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TsigKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TsigKeyArgs
    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 tsigKeyResource = new Fastly.TsigKey("tsigKeyResource", new()
    {
        Algorithm = "string",
        Secret = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := fastly.NewTsigKey(ctx, "tsigKeyResource", &fastly.TsigKeyArgs{
    	Algorithm:   pulumi.String("string"),
    	Secret:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    resource "fastly_tsigkey" "tsigKeyResource" {
      algorithm   = "string"
      secret      = "string"
      description = "string"
      name        = "string"
    }
    
    var tsigKeyResource = new TsigKey("tsigKeyResource", TsigKeyArgs.builder()
        .algorithm("string")
        .secret("string")
        .description("string")
        .name("string")
        .build());
    
    tsig_key_resource = fastly.TsigKey("tsigKeyResource",
        algorithm="string",
        secret="string",
        description="string",
        name="string")
    
    const tsigKeyResource = new fastly.TsigKey("tsigKeyResource", {
        algorithm: "string",
        secret: "string",
        description: "string",
        name: "string",
    });
    
    type: fastly:TsigKey
    properties:
        algorithm: string
        description: string
        name: string
        secret: string
    

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

    Algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    Secret string
    The Base64 encoded secret key.
    Description string
    A freeform descriptive note.
    Name string
    The name of the TSIG key.
    Algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    Secret string
    The Base64 encoded secret key.
    Description string
    A freeform descriptive note.
    Name string
    The name of the TSIG key.
    algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    secret string
    The Base64 encoded secret key.
    description string
    A freeform descriptive note.
    name string
    The name of the TSIG key.
    algorithm String
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    secret String
    The Base64 encoded secret key.
    description String
    A freeform descriptive note.
    name String
    The name of the TSIG key.
    algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    secret string
    The Base64 encoded secret key.
    description string
    A freeform descriptive note.
    name string
    The name of the TSIG key.
    algorithm str
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    secret str
    The Base64 encoded secret key.
    description str
    A freeform descriptive note.
    name str
    The name of the TSIG key.
    algorithm String
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    secret String
    The Base64 encoded secret key.
    description String
    A freeform descriptive note.
    name String
    The name of the TSIG key.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TsigKey Resource

    Get an existing TsigKey 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?: TsigKeyState, opts?: CustomResourceOptions): TsigKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            algorithm: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            secret: Optional[str] = None) -> TsigKey
    func GetTsigKey(ctx *Context, name string, id IDInput, state *TsigKeyState, opts ...ResourceOption) (*TsigKey, error)
    public static TsigKey Get(string name, Input<string> id, TsigKeyState? state, CustomResourceOptions? opts = null)
    public static TsigKey get(String name, Output<String> id, TsigKeyState state, CustomResourceOptions options)
    resources:  _:    type: fastly:TsigKey    get:      id: ${id}
    import {
      to = fastly_tsigkey.example
      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.
    The following state arguments are supported:
    Algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    Description string
    A freeform descriptive note.
    Name string
    The name of the TSIG key.
    Secret string
    The Base64 encoded secret key.
    Algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    Description string
    A freeform descriptive note.
    Name string
    The name of the TSIG key.
    Secret string
    The Base64 encoded secret key.
    algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    description string
    A freeform descriptive note.
    name string
    The name of the TSIG key.
    secret string
    The Base64 encoded secret key.
    algorithm String
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    description String
    A freeform descriptive note.
    name String
    The name of the TSIG key.
    secret String
    The Base64 encoded secret key.
    algorithm string
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    description string
    A freeform descriptive note.
    name string
    The name of the TSIG key.
    secret string
    The Base64 encoded secret key.
    algorithm str
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    description str
    A freeform descriptive note.
    name str
    The name of the TSIG key.
    secret str
    The Base64 encoded secret key.
    algorithm String
    The algorithm of the TSIG key. One of: hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512.
    description String
    A freeform descriptive note.
    name String
    The name of the TSIG key.
    secret String
    The Base64 encoded secret key.

    Import

    Fastly TSIG Keys can be imported using their Key ID, e.g.

    $ pulumi import fastly:index/tsigKey:TsigKey example xxxxxxxxxxxxxxxxxxxx
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Fastly pulumi/pulumi-fastly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fastly Terraform Provider.
    fastly logo
    Viewing docs for Fastly v12.2.1
    published on Saturday, Jun 6, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial