cloudflare.MagicTransitSite
Explore with Pulumi AI
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:
- Account
Id string - Identifier
- Name string
- The name of the site.
- Connector
Id string - Magic Connector identifier tag.
- Description string
- Ha
Mode bool - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- Location
Magic
Transit Site Location - Location of site in latitude and longitude.
- Secondary
Connector stringId - Magic Connector identifier tag. Used when high availability mode is on.
- Account
Id string - Identifier
- Name string
- The name of the site.
- Connector
Id string - Magic Connector identifier tag.
- Description string
- Ha
Mode bool - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- Location
Magic
Transit Site Location Args - Location of site in latitude and longitude.
- Secondary
Connector stringId - Magic Connector identifier tag. Used when high availability mode is on.
- account
Id String - Identifier
- name String
- The name of the site.
- connector
Id String - Magic Connector identifier tag.
- description String
- ha
Mode Boolean - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- location
Magic
Transit Site Location - Location of site in latitude and longitude.
- secondary
Connector StringId - Magic Connector identifier tag. Used when high availability mode is on.
- account
Id string - Identifier
- name string
- The name of the site.
- connector
Id string - Magic Connector identifier tag.
- description string
- ha
Mode boolean - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- location
Magic
Transit Site Location - Location of site in latitude and longitude.
- secondary
Connector stringId - 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
Magic
Transit Site Location Args - Location of site in latitude and longitude.
- secondary_
connector_ strid - Magic Connector identifier tag. Used when high availability mode is on.
- account
Id String - Identifier
- name String
- The name of the site.
- connector
Id String - Magic Connector identifier tag.
- description String
- ha
Mode 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.
- secondary
Connector StringId - 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.
- Account
Id string - Identifier
- Connector
Id string - Magic Connector identifier tag.
- Description string
- Ha
Mode bool - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- Location
Magic
Transit Site Location - Location of site in latitude and longitude.
- Name string
- The name of the site.
- Secondary
Connector stringId - Magic Connector identifier tag. Used when high availability mode is on.
- Account
Id string - Identifier
- Connector
Id string - Magic Connector identifier tag.
- Description string
- Ha
Mode bool - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- Location
Magic
Transit Site Location Args - Location of site in latitude and longitude.
- Name string
- The name of the site.
- Secondary
Connector stringId - Magic Connector identifier tag. Used when high availability mode is on.
- account
Id String - Identifier
- connector
Id String - Magic Connector identifier tag.
- description String
- ha
Mode Boolean - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- location
Magic
Transit Site Location - Location of site in latitude and longitude.
- name String
- The name of the site.
- secondary
Connector StringId - Magic Connector identifier tag. Used when high availability mode is on.
- account
Id string - Identifier
- connector
Id string - Magic Connector identifier tag.
- description string
- ha
Mode boolean - Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
- location
Magic
Transit Site Location - Location of site in latitude and longitude.
- name string
- The name of the site.
- secondary
Connector stringId - 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
Magic
Transit Site Location Args - Location of site in latitude and longitude.
- name str
- The name of the site.
- secondary_
connector_ strid - Magic Connector identifier tag. Used when high availability mode is on.
- account
Id String - Identifier
- connector
Id String - Magic Connector identifier tag.
- description String
- ha
Mode 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.
- secondary
Connector StringId - Magic Connector identifier tag. Used when high availability mode is on.
Supporting Types
MagicTransitSiteLocation, MagicTransitSiteLocationArgs
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.