import * as pulumi from "@pulumi/pulumi"; /** * > **DEPRECATED** Use `ipRestrictions` field in `ovh.CloudProject.Database` resource instead. Using the `ovh.CloudProjectDatabase.IpRestriction` resource to add an IP restriction to a `ovh.CloudProject.Database` resource will cause its update on each apply * * > **NOTE** This resource is only compatible with the following engines: **cassandra, grafana, kafka, kakfaConnect, m3db, mongodb, mysql, opensearch, postgres, redis** * * Apply IP restrictions to an OVHcloud Managed Database cluster. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const db = ovh.CloudProjectDatabase.getDatabase({ * serviceName: "XXXX", * engine: "YYYY", * id: "ZZZZ", * }); * const ipRestriction = new ovh.cloudprojectdatabase.IpRestriction("ip_restriction", { * serviceName: db.then(db => db.serviceName), * engine: db.then(db => db.engine), * clusterId: db.then(db => db.id), * ip: "178.97.6.0/24", * }); * ``` * * ## Import * * OVHcloud Managed database cluster IP restrictions can be imported using the `service_name`, `engine`, `cluster_id` and the `ip`, separated by "/" E.g., * * bash * * ```sh * $ pulumi import ovh:CloudProjectDatabase/ipRestriction:IpRestriction my_ip_restriction service_name/engine/cluster_id/178.97.6.0/24 * ``` */ export declare class IpRestriction extends pulumi.CustomResource { /** * Get an existing IpRestriction 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?: IpRestrictionState, opts?: pulumi.CustomResourceOptions): IpRestriction; /** * Returns true if the given object is an instance of IpRestriction. 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 IpRestriction; /** * Cluster ID. */ readonly clusterId: pulumi.Output; /** * Description of the IP restriction. */ readonly description: pulumi.Output; /** * The engine of the database cluster you want to add an IP restriction. To get a full list of available engine visit. [public documentation](https://docs.ovh.com/gb/en/publiccloud/databases). */ readonly engine: pulumi.Output; /** * Authorized IP. */ readonly ip: pulumi.Output; /** * The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. */ readonly serviceName: pulumi.Output; /** * Current status of the IP restriction. */ readonly status: pulumi.Output; /** * Create a IpRestriction 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: IpRestrictionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering IpRestriction resources. */ export interface IpRestrictionState { /** * Cluster ID. */ clusterId?: pulumi.Input; /** * Description of the IP restriction. */ description?: pulumi.Input; /** * The engine of the database cluster you want to add an IP restriction. To get a full list of available engine visit. [public documentation](https://docs.ovh.com/gb/en/publiccloud/databases). */ engine?: pulumi.Input; /** * Authorized IP. */ ip?: pulumi.Input; /** * The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. */ serviceName?: pulumi.Input; /** * Current status of the IP restriction. */ status?: pulumi.Input; } /** * The set of arguments for constructing a IpRestriction resource. */ export interface IpRestrictionArgs { /** * Cluster ID. */ clusterId: pulumi.Input; /** * Description of the IP restriction. */ description?: pulumi.Input; /** * The engine of the database cluster you want to add an IP restriction. To get a full list of available engine visit. [public documentation](https://docs.ovh.com/gb/en/publiccloud/databases). */ engine: pulumi.Input; /** * Authorized IP. */ ip: pulumi.Input; /** * The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. */ serviceName?: pulumi.Input; }