import * as pulumi from "@pulumi/pulumi"; /** * Manages a V2 neutron security group resource within OpenStack. * Unlike Nova security groups, neutron separates the group from the rules * and also allows an admin to target a specific tenant_id. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const secgroup1 = new openstack.networking.SecGroup("secgroup_1", { * name: "secgroup_1", * description: "My neutron security group", * }); * ``` * * ## Default Security Group Rules * * In most cases, OpenStack will create some egress security group rules for each * new security group. These security group rules will not be managed by * Terraform, so if you prefer to have *all* aspects of your infrastructure * managed by Terraform, set `deleteDefaultRules` to `true` and then create * separate security group rules such as the following: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const secgroupRuleV4 = new openstack.networking.SecGroupRule("secgroup_rule_v4", { * direction: "egress", * ethertype: "IPv4", * securityGroupId: secgroup.id, * }); * const secgroupRuleV6 = new openstack.networking.SecGroupRule("secgroup_rule_v6", { * direction: "egress", * ethertype: "IPv6", * securityGroupId: secgroup.id, * }); * ``` * * Please note that this behavior may differ depending on the configuration of * the OpenStack cloud. The above illustrates the current default Neutron * behavior. Some OpenStack clouds might provide additional rules and some might * not provide any rules at all (in which case the `deleteDefaultRules` setting * is moot). * * ## Import * * Security Groups can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:networking/secGroup:SecGroup secgroup_1 38809219-5e8a-4852-9139-6f461c90e8bc * ``` */ export declare class SecGroup extends pulumi.CustomResource { /** * Get an existing SecGroup resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SecGroupState, opts?: pulumi.CustomResourceOptions): SecGroup; /** * Returns true if the given object is an instance of SecGroup. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SecGroup; /** * The collection of tags assigned on the security group, which have * been explicitly and implicitly added. */ readonly allTags: pulumi.Output; /** * Whether or not to delete the default * egress security rules. This is `false` by default. See the below note * for more information. */ readonly deleteDefaultRules: pulumi.Output; /** * A unique name for the security group. */ readonly description: pulumi.Output; /** * A unique name for the security group. */ readonly name: pulumi.Output; /** * The region in which to obtain the V2 networking client. * A networking client is needed to create a port. If omitted, the * `region` argument of the provider is used. Changing this creates a new * security group. */ readonly region: pulumi.Output; /** * Indicates if the security group is stateful or * stateless. Update of the stateful argument is allowed when there is no port * associated with the security group. Available only in OpenStack environments * with the `stateful-security-group` extension. Defaults to true. */ readonly stateful: pulumi.Output; /** * A set of string tags for the security group. */ readonly tags: pulumi.Output; /** * The owner of the security group. Required if admin * wants to create a port for another tenant. Changing this creates a new * security group. */ readonly tenantId: pulumi.Output; /** * Create a SecGroup resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: SecGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SecGroup resources. */ export interface SecGroupState { /** * The collection of tags assigned on the security group, which have * been explicitly and implicitly added. */ allTags?: pulumi.Input[] | undefined>; /** * Whether or not to delete the default * egress security rules. This is `false` by default. See the below note * for more information. */ deleteDefaultRules?: pulumi.Input; /** * A unique name for the security group. */ description?: pulumi.Input; /** * A unique name for the security group. */ name?: pulumi.Input; /** * The region in which to obtain the V2 networking client. * A networking client is needed to create a port. If omitted, the * `region` argument of the provider is used. Changing this creates a new * security group. */ region?: pulumi.Input; /** * Indicates if the security group is stateful or * stateless. Update of the stateful argument is allowed when there is no port * associated with the security group. Available only in OpenStack environments * with the `stateful-security-group` extension. Defaults to true. */ stateful?: pulumi.Input; /** * A set of string tags for the security group. */ tags?: pulumi.Input[] | undefined>; /** * The owner of the security group. Required if admin * wants to create a port for another tenant. Changing this creates a new * security group. */ tenantId?: pulumi.Input; } /** * The set of arguments for constructing a SecGroup resource. */ export interface SecGroupArgs { /** * Whether or not to delete the default * egress security rules. This is `false` by default. See the below note * for more information. */ deleteDefaultRules?: pulumi.Input; /** * A unique name for the security group. */ description?: pulumi.Input; /** * A unique name for the security group. */ name?: pulumi.Input; /** * The region in which to obtain the V2 networking client. * A networking client is needed to create a port. If omitted, the * `region` argument of the provider is used. Changing this creates a new * security group. */ region?: pulumi.Input; /** * Indicates if the security group is stateful or * stateless. Update of the stateful argument is allowed when there is no port * associated with the security group. Available only in OpenStack environments * with the `stateful-security-group` extension. Defaults to true. */ stateful?: pulumi.Input; /** * A set of string tags for the security group. */ tags?: pulumi.Input[] | undefined>; /** * The owner of the security group. Required if admin * wants to create a port for another tenant. Changing this creates a new * security group. */ tenantId?: pulumi.Input; } //# sourceMappingURL=secGroup.d.ts.map