1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. MagicTransitSite
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.MagicTransitSite

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleMagicTransitSite = new cloudflare.MagicTransitSite("example_magic_transit_site", {
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        name: "site_1",
        connectorId: "ac60d3d0435248289d446cedd870bcf4",
        description: "description",
        haMode: true,
        location: {
            lat: "37.6192",
            lon: "122.3816",
        },
        secondaryConnectorId: "8d67040d3835dbcf46ce29da440dc482",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_magic_transit_site = cloudflare.MagicTransitSite("example_magic_transit_site",
        account_id="023e105f4ecef8ad9ca31a8372d0c353",
        name="site_1",
        connector_id="ac60d3d0435248289d446cedd870bcf4",
        description="description",
        ha_mode=True,
        location={
            "lat": "37.6192",
            "lon": "122.3816",
        },
        secondary_connector_id="8d67040d3835dbcf46ce29da440dc482")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewMagicTransitSite(ctx, "example_magic_transit_site", &cloudflare.MagicTransitSiteArgs{
    			AccountId:   pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    			Name:        pulumi.String("site_1"),
    			ConnectorId: pulumi.String("ac60d3d0435248289d446cedd870bcf4"),
    			Description: pulumi.String("description"),
    			HaMode:      pulumi.Bool(true),
    			Location: &cloudflare.MagicTransitSiteLocationArgs{
    				Lat: pulumi.String("37.6192"),
    				Lon: pulumi.String("122.3816"),
    			},
    			SecondaryConnectorId: pulumi.String("8d67040d3835dbcf46ce29da440dc482"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleMagicTransitSite = new Cloudflare.MagicTransitSite("example_magic_transit_site", new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            Name = "site_1",
            ConnectorId = "ac60d3d0435248289d446cedd870bcf4",
            Description = "description",
            HaMode = true,
            Location = new Cloudflare.Inputs.MagicTransitSiteLocationArgs
            {
                Lat = "37.6192",
                Lon = "122.3816",
            },
            SecondaryConnectorId = "8d67040d3835dbcf46ce29da440dc482",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.MagicTransitSite;
    import com.pulumi.cloudflare.MagicTransitSiteArgs;
    import com.pulumi.cloudflare.inputs.MagicTransitSiteLocationArgs;
    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 exampleMagicTransitSite = new MagicTransitSite("exampleMagicTransitSite", MagicTransitSiteArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .name("site_1")
                .connectorId("ac60d3d0435248289d446cedd870bcf4")
                .description("description")
                .haMode(true)
                .location(MagicTransitSiteLocationArgs.builder()
                    .lat("37.6192")
                    .lon("122.3816")
                    .build())
                .secondaryConnectorId("8d67040d3835dbcf46ce29da440dc482")
                .build());
    
        }
    }
    
    resources:
      exampleMagicTransitSite:
        type: cloudflare:MagicTransitSite
        name: example_magic_transit_site
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          name: site_1
          connectorId: ac60d3d0435248289d446cedd870bcf4
          description: description
          haMode: true
          location:
            lat: '37.6192'
            lon: '122.3816'
          secondaryConnectorId: 8d67040d3835dbcf46ce29da440dc482
    

    Create MagicTransitSite Resource

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

    Constructor syntax

    new MagicTransitSite(name: string, args: MagicTransitSiteArgs, opts?: CustomResourceOptions);
    @overload
    def MagicTransitSite(resource_name: str,
                         args: MagicTransitSiteArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def MagicTransitSite(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         account_id: Optional[str] = None,
                         name: Optional[str] = None,
                         connector_id: Optional[str] = None,
                         description: Optional[str] = None,
                         ha_mode: Optional[bool] = None,
                         location: Optional[MagicTransitSiteLocationArgs] = None,
                         secondary_connector_id: Optional[str] = None)
    func NewMagicTransitSite(ctx *Context, name string, args MagicTransitSiteArgs, opts ...ResourceOption) (*MagicTransitSite, error)
    public MagicTransitSite(string name, MagicTransitSiteArgs args, CustomResourceOptions? opts = null)
    public MagicTransitSite(String name, MagicTransitSiteArgs args)
    public MagicTransitSite(String name, MagicTransitSiteArgs args, CustomResourceOptions options)
    
    type: cloudflare:MagicTransitSite
    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 MagicTransitSiteArgs
    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 MagicTransitSiteArgs
    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 MagicTransitSiteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MagicTransitSiteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MagicTransitSiteArgs
    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 magicTransitSiteResource = new Cloudflare.MagicTransitSite("magicTransitSiteResource", new()
    {
        AccountId = "string",
        Name = "string",
        ConnectorId = "string",
        Description = "string",
        HaMode = false,
        Location = new Cloudflare.Inputs.MagicTransitSiteLocationArgs
        {
            Lat = "string",
            Lon = "string",
        },
        SecondaryConnectorId = "string",
    });
    
    example, err := cloudflare.NewMagicTransitSite(ctx, "magicTransitSiteResource", &cloudflare.MagicTransitSiteArgs{
    	AccountId:   pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ConnectorId: pulumi.String("string"),
    	Description: pulumi.String("string"),
    	HaMode:      pulumi.Bool(false),
    	Location: &cloudflare.MagicTransitSiteLocationArgs{
    		Lat: pulumi.String("string"),
    		Lon: pulumi.String("string"),
    	},
    	SecondaryConnectorId: pulumi.String("string"),
    })
    
    var magicTransitSiteResource = new MagicTransitSite("magicTransitSiteResource", MagicTransitSiteArgs.builder()
        .accountId("string")
        .name("string")
        .connectorId("string")
        .description("string")
        .haMode(false)
        .location(MagicTransitSiteLocationArgs.builder()
            .lat("string")
            .lon("string")
            .build())
        .secondaryConnectorId("string")
        .build());
    
    magic_transit_site_resource = cloudflare.MagicTransitSite("magicTransitSiteResource",
        account_id="string",
        name="string",
        connector_id="string",
        description="string",
        ha_mode=False,
        location={
            "lat": "string",
            "lon": "string",
        },
        secondary_connector_id="string")
    
    const magicTransitSiteResource = new cloudflare.MagicTransitSite("magicTransitSiteResource", {
        accountId: "string",
        name: "string",
        connectorId: "string",
        description: "string",
        haMode: false,
        location: {
            lat: "string",
            lon: "string",
        },
        secondaryConnectorId: "string",
    });
    
    type: cloudflare:MagicTransitSite
    properties:
        accountId: string
        connectorId: string
        description: string
        haMode: false
        location:
            lat: string
            lon: string
        name: string
        secondaryConnectorId: string
    

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

    AccountId string
    Identifier
    Name string
    The name of the site.
    ConnectorId string
    Magic Connector identifier tag.
    Description string
    HaMode bool
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    Location MagicTransitSiteLocation
    Location of site in latitude and longitude.
    SecondaryConnectorId string
    Magic Connector identifier tag. Used when high availability mode is on.
    AccountId string
    Identifier
    Name string
    The name of the site.
    ConnectorId string
    Magic Connector identifier tag.
    Description string
    HaMode bool
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    Location MagicTransitSiteLocationArgs
    Location of site in latitude and longitude.
    SecondaryConnectorId string
    Magic Connector identifier tag. Used when high availability mode is on.
    accountId String
    Identifier
    name String
    The name of the site.
    connectorId String
    Magic Connector identifier tag.
    description String
    haMode Boolean
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location MagicTransitSiteLocation
    Location of site in latitude and longitude.
    secondaryConnectorId String
    Magic Connector identifier tag. Used when high availability mode is on.
    accountId string
    Identifier
    name string
    The name of the site.
    connectorId string
    Magic Connector identifier tag.
    description string
    haMode boolean
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location MagicTransitSiteLocation
    Location of site in latitude and longitude.
    secondaryConnectorId string
    Magic Connector identifier tag. Used when high availability mode is on.
    account_id str
    Identifier
    name str
    The name of the site.
    connector_id str
    Magic Connector identifier tag.
    description str
    ha_mode bool
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location MagicTransitSiteLocationArgs
    Location of site in latitude and longitude.
    secondary_connector_id str
    Magic Connector identifier tag. Used when high availability mode is on.
    accountId String
    Identifier
    name String
    The name of the site.
    connectorId String
    Magic Connector identifier tag.
    description String
    haMode Boolean
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location Property Map
    Location of site in latitude and longitude.
    secondaryConnectorId String
    Magic Connector identifier tag. Used when high availability mode is on.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MagicTransitSite 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MagicTransitSite Resource

    Get an existing MagicTransitSite 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?: MagicTransitSiteState, opts?: CustomResourceOptions): MagicTransitSite
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            connector_id: Optional[str] = None,
            description: Optional[str] = None,
            ha_mode: Optional[bool] = None,
            location: Optional[MagicTransitSiteLocationArgs] = None,
            name: Optional[str] = None,
            secondary_connector_id: Optional[str] = None) -> MagicTransitSite
    func GetMagicTransitSite(ctx *Context, name string, id IDInput, state *MagicTransitSiteState, opts ...ResourceOption) (*MagicTransitSite, error)
    public static MagicTransitSite Get(string name, Input<string> id, MagicTransitSiteState? state, CustomResourceOptions? opts = null)
    public static MagicTransitSite get(String name, Output<String> id, MagicTransitSiteState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:MagicTransitSite    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.
    The following state arguments are supported:
    AccountId string
    Identifier
    ConnectorId string
    Magic Connector identifier tag.
    Description string
    HaMode bool
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    Location MagicTransitSiteLocation
    Location of site in latitude and longitude.
    Name string
    The name of the site.
    SecondaryConnectorId string
    Magic Connector identifier tag. Used when high availability mode is on.
    AccountId string
    Identifier
    ConnectorId string
    Magic Connector identifier tag.
    Description string
    HaMode bool
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    Location MagicTransitSiteLocationArgs
    Location of site in latitude and longitude.
    Name string
    The name of the site.
    SecondaryConnectorId string
    Magic Connector identifier tag. Used when high availability mode is on.
    accountId String
    Identifier
    connectorId String
    Magic Connector identifier tag.
    description String
    haMode Boolean
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location MagicTransitSiteLocation
    Location of site in latitude and longitude.
    name String
    The name of the site.
    secondaryConnectorId String
    Magic Connector identifier tag. Used when high availability mode is on.
    accountId string
    Identifier
    connectorId string
    Magic Connector identifier tag.
    description string
    haMode boolean
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location MagicTransitSiteLocation
    Location of site in latitude and longitude.
    name string
    The name of the site.
    secondaryConnectorId string
    Magic Connector identifier tag. Used when high availability mode is on.
    account_id str
    Identifier
    connector_id str
    Magic Connector identifier tag.
    description str
    ha_mode bool
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location MagicTransitSiteLocationArgs
    Location of site in latitude and longitude.
    name str
    The name of the site.
    secondary_connector_id str
    Magic Connector identifier tag. Used when high availability mode is on.
    accountId String
    Identifier
    connectorId String
    Magic Connector identifier tag.
    description String
    haMode Boolean
    Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
    location Property Map
    Location of site in latitude and longitude.
    name String
    The name of the site.
    secondaryConnectorId String
    Magic Connector identifier tag. Used when high availability mode is on.

    Supporting Types

    MagicTransitSiteLocation, MagicTransitSiteLocationArgs

    Lat string
    Latitude
    Lon string
    Longitude
    Lat string
    Latitude
    Lon string
    Longitude
    lat String
    Latitude
    lon String
    Longitude
    lat string
    Latitude
    lon string
    Longitude
    lat str
    Latitude
    lon str
    Longitude
    lat String
    Latitude
    lon String
    Longitude

    Import

    $ pulumi import cloudflare:index/magicTransitSite:MagicTransitSite example '<account_id>/<site_id>'
    

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

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi