SecurityFirewall
This resource allows you to configure and manage firewall rules for the CloudAMQP instance. Beware that all rules need to be present, since all older configurations will be overwritten.
Only available for dedicated subscription plans.
Depedency
This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id
.
Example Usage
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
class MyStack : Stack
{
public MyStack()
{
var firewallSettings = new CloudAmqp.SecurityFirewall("firewallSettings", new CloudAmqp.SecurityFirewallArgs
{
InstanceId = cloudamqp_instance.Instance.Id,
Rules =
{
new CloudAmqp.Inputs.SecurityFirewallRuleArgs
{
Ip = "192.168.0.0/24",
Ports =
{
4567,
4568,
},
Services =
{
"AMQP",
"AMQPS",
},
},
new CloudAmqp.Inputs.SecurityFirewallRuleArgs
{
Ip = "10.56.72.0/24",
Ports = {},
Services =
{
"AMQP",
"AMQPS",
},
},
},
});
}
}
Coming soon!
import pulumi
import pulumi_cloudamqp as cloudamqp
firewall_settings = cloudamqp.SecurityFirewall("firewallSettings",
instance_id=cloudamqp_instance["instance"]["id"],
rules=[
cloudamqp.SecurityFirewallRuleArgs(
ip="192.168.0.0/24",
ports=[
4567,
4568,
],
services=[
"AMQP",
"AMQPS",
],
),
cloudamqp.SecurityFirewallRuleArgs(
ip="10.56.72.0/24",
ports=[],
services=[
"AMQP",
"AMQPS",
],
),
])
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const firewallSettings = new cloudamqp.SecurityFirewall("firewallSettings", {
instanceId: cloudamqp_instance.instance.id,
rules: [
{
ip: "192.168.0.0/24",
ports: [
4567,
4568,
],
services: [
"AMQP",
"AMQPS",
],
},
{
ip: "10.56.72.0/24",
ports: [],
services: [
"AMQP",
"AMQPS",
],
},
],
});
Create a SecurityFirewall Resource
new SecurityFirewall(name: string, args: SecurityFirewallArgs, opts?: CustomResourceOptions);
def SecurityFirewall(resource_name: str, opts: Optional[ResourceOptions] = None, instance_id: Optional[int] = None, rules: Optional[Sequence[SecurityFirewallRuleArgs]] = None)
func NewSecurityFirewall(ctx *Context, name string, args SecurityFirewallArgs, opts ...ResourceOption) (*SecurityFirewall, error)
public SecurityFirewall(string name, SecurityFirewallArgs args, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args SecurityFirewallArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecurityFirewallArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityFirewallArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
SecurityFirewall Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The SecurityFirewall resource accepts the following input properties:
- Instance
Id int The CloudAMQP instance ID.
- Rules
List<Pulumi.
Cloud Amqp. Inputs. Security Firewall Rule Args> An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
- Instance
Id int The CloudAMQP instance ID.
- Rules
[]Security
Firewall Rule An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
- instance
Id number The CloudAMQP instance ID.
- rules
Security
Firewall Rule[] An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
- instance_
id int The CloudAMQP instance ID.
- rules
Sequence[Security
Firewall Rule Args] An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityFirewall 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 str
- The provider-assigned unique ID for this managed resource.
Look up an Existing SecurityFirewall Resource
Get an existing SecurityFirewall 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?: SecurityFirewallState, opts?: CustomResourceOptions): SecurityFirewall
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, instance_id: Optional[int] = None, rules: Optional[Sequence[SecurityFirewallRuleArgs]] = None) -> SecurityFirewall
func GetSecurityFirewall(ctx *Context, name string, id IDInput, state *SecurityFirewallState, opts ...ResourceOption) (*SecurityFirewall, error)
public static SecurityFirewall Get(string name, Input<string> id, SecurityFirewallState? state, CustomResourceOptions? opts = null)
- 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.
The following state arguments are supported:
- Instance
Id int The CloudAMQP instance ID.
- Rules
List<Pulumi.
Cloud Amqp. Inputs. Security Firewall Rule Args> An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
- Instance
Id int The CloudAMQP instance ID.
- Rules
[]Security
Firewall Rule An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
- instance
Id number The CloudAMQP instance ID.
- rules
Security
Firewall Rule[] An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
- instance_
id int The CloudAMQP instance ID.
- rules
Sequence[Security
Firewall Rule Args] An array of rules, minimum of 1 needs to be configured. Each
rules
block consists of the field documented below.
Supporting Types
SecurityFirewallRule
- Ip string
Source ip and netmask for the rule. (e.g. 10.56.72.0/24)
- Description string
Description name of the rule. e.g. Default.
- Ports List<int>
Custom ports to be opened
- Services List<string>
Pre-defined service ports
- Ip string
Source ip and netmask for the rule. (e.g. 10.56.72.0/24)
- Description string
Description name of the rule. e.g. Default.
- Ports []int
Custom ports to be opened
- Services []string
Pre-defined service ports
- ip string
Source ip and netmask for the rule. (e.g. 10.56.72.0/24)
- description string
Description name of the rule. e.g. Default.
- ports number[]
Custom ports to be opened
- services string[]
Pre-defined service ports
- ip str
Source ip and netmask for the rule. (e.g. 10.56.72.0/24)
- description str
Description name of the rule. e.g. Default.
- ports Sequence[int]
Custom ports to be opened
- services Sequence[str]
Pre-defined service ports
Import
cloudamqp_security_firewall
can be imported using CloudAMQP instance identifier.
$ pulumi import cloudamqp:index/securityFirewall:SecurityFirewall firewall <instance_id>`
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudamqp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudamqp
Terraform Provider.