@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
256 lines (255 loc) • 10.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages a VPC IP address group resource within HuaweiCloud.
*
* ## Example Usage
* ### IPv4 Address Group
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const ipv4 = new huaweicloud.Vpc.AddressGroup("ipv4", {
* addresses: [
* "192.168.10.10",
* "192.168.1.1-192.168.1.50",
* ],
* });
* ```
* ### IPv6 Address Group
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const ipv6 = new huaweicloud.Vpc.AddressGroup("ipv6", {
* addresses: ["2001:db8:a583:6e::/64"],
* ipVersion: 6,
* });
* ```
* ### Address Group with ipExtraSet
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const ipv6 = new huaweicloud.Vpc.AddressGroup("ipv6", {
* ipExtraSets: [
* {
* ip: "192.168.3.2",
* remarks: "terraform test 1",
* },
* {
* ip: "192.168.5.0/24",
* remarks: "terraform test 2",
* },
* {
* ip: "192.168.3.20-192.168.3.100",
* },
* ],
* ipVersion: 4,
* });
* ```
*
* ## Import
*
* IP address groups can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Vpc/addressGroup:AddressGroup test bc96f6b0-ca2c-42ee-b719-0f26bc9c8661
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response. The missing attributes include`force_destroy`. It is generally recommended running `terraform plan` after importing the image. You can then decide if changes should be applied to the image, or the resource definition should be updated to align with the image. Also you can ignore changes as below. hcl resource "huaweicloud_vpc_address_group" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* force_destroy,
*
* ]
*
* } }
*/
export declare class AddressGroup extends pulumi.CustomResource {
/**
* Get an existing AddressGroup 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<pulumi.ID>, state?: AddressGroupState, opts?: pulumi.CustomResourceOptions): AddressGroup;
/**
* Returns true if the given object is an instance of AddressGroup. 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 AddressGroup;
/**
* Specifies an array of one or more IP addresses. The address can be a single IP
* address, IP address range or IP address CIDR. Only one of `addresses` and `ipExtraSet` can be specified.
*/
readonly addresses: pulumi.Output<string[]>;
/**
* Specifies the supplementary information about the IP address group.
* The value is a string of no more than `255` characters and cannot contain angle brackets (< or >).
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the enterprise project ID.
* Changing this creates a new address group.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Specifies whether to forcibly destroy the address group if it is associated with
* a security group rule, the address group and the associated security group rule will be deleted together.
* The default value is **false**.
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
/**
* Specifies the IP addresses and their remarks in an IP address group.
* The ipExtraSet structure is documented below.
* Only one of `addresses` and `ipExtraSet` can be specified.
*/
readonly ipExtraSets: pulumi.Output<outputs.Vpc.AddressGroupIpExtraSet[]>;
/**
* Specifies the IP version, either `4` (default) or `6`.
* Changing this creates a new address group.
*/
readonly ipVersion: pulumi.Output<number | undefined>;
/**
* Specifies the maximum number of addresses that an address group can contain.
* The valid value is range from `1` to `20`, the default value is `20`.
*/
readonly maxCapacity: pulumi.Output<number>;
/**
* Specifies the IP address group name.
* The value is a string of `1` to `64` characters that can contain letters, digits, underscores (_), hyphens (-) and
* periods (.).
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the region in which to create the IP address group. If omitted, the
* provider-level region will be used. Changing this creates a new address group.
*/
readonly region: pulumi.Output<string>;
/**
* Create a AddressGroup 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?: AddressGroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AddressGroup resources.
*/
export interface AddressGroupState {
/**
* Specifies an array of one or more IP addresses. The address can be a single IP
* address, IP address range or IP address CIDR. Only one of `addresses` and `ipExtraSet` can be specified.
*/
addresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the supplementary information about the IP address group.
* The value is a string of no more than `255` characters and cannot contain angle brackets (< or >).
*/
description?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID.
* Changing this creates a new address group.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies whether to forcibly destroy the address group if it is associated with
* a security group rule, the address group and the associated security group rule will be deleted together.
* The default value is **false**.
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* Specifies the IP addresses and their remarks in an IP address group.
* The ipExtraSet structure is documented below.
* Only one of `addresses` and `ipExtraSet` can be specified.
*/
ipExtraSets?: pulumi.Input<pulumi.Input<inputs.Vpc.AddressGroupIpExtraSet>[]>;
/**
* Specifies the IP version, either `4` (default) or `6`.
* Changing this creates a new address group.
*/
ipVersion?: pulumi.Input<number>;
/**
* Specifies the maximum number of addresses that an address group can contain.
* The valid value is range from `1` to `20`, the default value is `20`.
*/
maxCapacity?: pulumi.Input<number>;
/**
* Specifies the IP address group name.
* The value is a string of `1` to `64` characters that can contain letters, digits, underscores (_), hyphens (-) and
* periods (.).
*/
name?: pulumi.Input<string>;
/**
* Specifies the region in which to create the IP address group. If omitted, the
* provider-level region will be used. Changing this creates a new address group.
*/
region?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AddressGroup resource.
*/
export interface AddressGroupArgs {
/**
* Specifies an array of one or more IP addresses. The address can be a single IP
* address, IP address range or IP address CIDR. Only one of `addresses` and `ipExtraSet` can be specified.
*/
addresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the supplementary information about the IP address group.
* The value is a string of no more than `255` characters and cannot contain angle brackets (< or >).
*/
description?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID.
* Changing this creates a new address group.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies whether to forcibly destroy the address group if it is associated with
* a security group rule, the address group and the associated security group rule will be deleted together.
* The default value is **false**.
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* Specifies the IP addresses and their remarks in an IP address group.
* The ipExtraSet structure is documented below.
* Only one of `addresses` and `ipExtraSet` can be specified.
*/
ipExtraSets?: pulumi.Input<pulumi.Input<inputs.Vpc.AddressGroupIpExtraSet>[]>;
/**
* Specifies the IP version, either `4` (default) or `6`.
* Changing this creates a new address group.
*/
ipVersion?: pulumi.Input<number>;
/**
* Specifies the maximum number of addresses that an address group can contain.
* The valid value is range from `1` to `20`, the default value is `20`.
*/
maxCapacity?: pulumi.Input<number>;
/**
* Specifies the IP address group name.
* The value is a string of `1` to `64` characters that can contain letters, digits, underscores (_), hyphens (-) and
* periods (.).
*/
name?: pulumi.Input<string>;
/**
* Specifies the region in which to create the IP address group. If omitted, the
* provider-level region will be used. Changing this creates a new address group.
*/
region?: pulumi.Input<string>;
}