Linode
FirewallDevice
Manages a Linode Firewall Device.
NOTICE: Attaching a Linode Firewall Device to a linode.Firewall
resource with user-defined linodes
may cause device conflicts.
Example Usage
using Pulumi;
using Linode = Pulumi.Linode;
class MyStack : Stack
{
public MyStack()
{
var myFirewall = new Linode.Firewall("myFirewall", new Linode.FirewallArgs
{
Label = "my_firewall",
Inbounds =
{
new Linode.Inputs.FirewallInboundArgs
{
Label = "http",
Action = "ACCEPT",
Protocol = "TCP",
Ports = "80",
Ipv4s =
{
"0.0.0.0/0",
},
Ipv6s =
{
"::/0",
},
},
},
InboundPolicy = "DROP",
OutboundPolicy = "ACCEPT",
});
var myInstance = new Linode.Instance("myInstance", new Linode.InstanceArgs
{
Label = "my_instance",
Region = "us-southeast",
Type = "g6-standard-1",
});
var myDevice = new Linode.FirewallDevice("myDevice", new Linode.FirewallDeviceArgs
{
FirewallId = myFirewall.Id,
EntityId = myInstance.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myFirewall, err := linode.NewFirewall(ctx, "myFirewall", &linode.FirewallArgs{
Label: pulumi.String("my_firewall"),
Inbounds: FirewallInboundArray{
&FirewallInboundArgs{
Label: pulumi.String("http"),
Action: pulumi.String("ACCEPT"),
Protocol: pulumi.String("TCP"),
Ports: pulumi.String("80"),
Ipv4s: pulumi.StringArray{
pulumi.String("0.0.0.0/0"),
},
Ipv6s: pulumi.StringArray{
pulumi.String("::/0"),
},
},
},
InboundPolicy: pulumi.String("DROP"),
OutboundPolicy: pulumi.String("ACCEPT"),
})
if err != nil {
return err
}
myInstance, err := linode.NewInstance(ctx, "myInstance", &linode.InstanceArgs{
Label: pulumi.String("my_instance"),
Region: pulumi.String("us-southeast"),
Type: pulumi.String("g6-standard-1"),
})
if err != nil {
return err
}
_, err = linode.NewFirewallDevice(ctx, "myDevice", &linode.FirewallDeviceArgs{
FirewallId: myFirewall.ID(),
EntityId: myInstance.ID(),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_linode as linode
my_firewall = linode.Firewall("myFirewall",
label="my_firewall",
inbounds=[linode.FirewallInboundArgs(
label="http",
action="ACCEPT",
protocol="TCP",
ports="80",
ipv4s=["0.0.0.0/0"],
ipv6s=["::/0"],
)],
inbound_policy="DROP",
outbound_policy="ACCEPT")
my_instance = linode.Instance("myInstance",
label="my_instance",
region="us-southeast",
type="g6-standard-1")
my_device = linode.FirewallDevice("myDevice",
firewall_id=my_firewall.id,
entity_id=my_instance.id)
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const myFirewall = new linode.Firewall("myFirewall", {
label: "my_firewall",
inbounds: [{
label: "http",
action: "ACCEPT",
protocol: "TCP",
ports: "80",
ipv4s: ["0.0.0.0/0"],
ipv6s: ["::/0"],
}],
inboundPolicy: "DROP",
outboundPolicy: "ACCEPT",
});
const myInstance = new linode.Instance("myInstance", {
label: "my_instance",
region: "us-southeast",
type: "g6-standard-1",
});
const myDevice = new linode.FirewallDevice("myDevice", {
firewallId: myFirewall.id,
entityId: myInstance.id,
});
Coming soon!
Create a FirewallDevice Resource
new FirewallDevice(name: string, args: FirewallDeviceArgs, opts?: CustomResourceOptions);
@overload
def FirewallDevice(resource_name: str,
opts: Optional[ResourceOptions] = None,
entity_id: Optional[int] = None,
entity_type: Optional[str] = None,
firewall_id: Optional[int] = None)
@overload
def FirewallDevice(resource_name: str,
args: FirewallDeviceInitArgs,
opts: Optional[ResourceOptions] = None)
func NewFirewallDevice(ctx *Context, name string, args FirewallDeviceArgs, opts ...ResourceOption) (*FirewallDevice, error)
public FirewallDevice(string name, FirewallDeviceArgs args, CustomResourceOptions? opts = null)
public FirewallDevice(String name, FirewallDeviceArgs args)
public FirewallDevice(String name, FirewallDeviceArgs args, CustomResourceOptions options)
type: linode:FirewallDevice
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FirewallDeviceArgs
- 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 FirewallDeviceInitArgs
- 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 FirewallDeviceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FirewallDeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FirewallDeviceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
FirewallDevice Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The FirewallDevice resource accepts the following input properties:
- Entity
Id int The unique ID of the entity to attach.
- Firewall
Id int The unique ID of the target Firewall.
- Entity
Type string The type of the entity to attach. (default:
linode
)
- Entity
Id int The unique ID of the entity to attach.
- Firewall
Id int The unique ID of the target Firewall.
- Entity
Type string The type of the entity to attach. (default:
linode
)
- entity
Id Integer The unique ID of the entity to attach.
- firewall
Id Integer The unique ID of the target Firewall.
- entity
Type String The type of the entity to attach. (default:
linode
)
- entity
Id number The unique ID of the entity to attach.
- firewall
Id number The unique ID of the target Firewall.
- entity
Type string The type of the entity to attach. (default:
linode
)
- entity_
id int The unique ID of the entity to attach.
- firewall_
id int The unique ID of the target Firewall.
- entity_
type str The type of the entity to attach. (default:
linode
)
- entity
Id Number The unique ID of the entity to attach.
- firewall
Id Number The unique ID of the target Firewall.
- entity
Type String The type of the entity to attach. (default:
linode
)
Outputs
All input properties are implicitly available as output properties. Additionally, the FirewallDevice resource produces the following output properties:
Look up an Existing FirewallDevice Resource
Get an existing FirewallDevice 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?: FirewallDeviceState, opts?: CustomResourceOptions): FirewallDevice
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created: Optional[str] = None,
entity_id: Optional[int] = None,
entity_type: Optional[str] = None,
firewall_id: Optional[int] = None,
updated: Optional[str] = None) -> FirewallDevice
func GetFirewallDevice(ctx *Context, name string, id IDInput, state *FirewallDeviceState, opts ...ResourceOption) (*FirewallDevice, error)
public static FirewallDevice Get(string name, Input<string> id, FirewallDeviceState? state, CustomResourceOptions? opts = null)
public static FirewallDevice get(String name, Output<String> id, FirewallDeviceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Created string
When the Firewall Device was last created.
- Entity
Id int The unique ID of the entity to attach.
- Entity
Type string The type of the entity to attach. (default:
linode
)- Firewall
Id int The unique ID of the target Firewall.
- Updated string
When the Firewall Device was last updated.
- Created string
When the Firewall Device was last created.
- Entity
Id int The unique ID of the entity to attach.
- Entity
Type string The type of the entity to attach. (default:
linode
)- Firewall
Id int The unique ID of the target Firewall.
- Updated string
When the Firewall Device was last updated.
- created String
When the Firewall Device was last created.
- entity
Id Integer The unique ID of the entity to attach.
- entity
Type String The type of the entity to attach. (default:
linode
)- firewall
Id Integer The unique ID of the target Firewall.
- updated String
When the Firewall Device was last updated.
- created string
When the Firewall Device was last created.
- entity
Id number The unique ID of the entity to attach.
- entity
Type string The type of the entity to attach. (default:
linode
)- firewall
Id number The unique ID of the target Firewall.
- updated string
When the Firewall Device was last updated.
- created str
When the Firewall Device was last created.
- entity_
id int The unique ID of the entity to attach.
- entity_
type str The type of the entity to attach. (default:
linode
)- firewall_
id int The unique ID of the target Firewall.
- updated str
When the Firewall Device was last updated.
- created String
When the Firewall Device was last created.
- entity
Id Number The unique ID of the entity to attach.
- entity
Type String The type of the entity to attach. (default:
linode
)- firewall
Id Number The unique ID of the target Firewall.
- updated String
When the Firewall Device was last updated.
Package Details
- Repository
- https://github.com/pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
linode
Terraform Provider.