OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud
ovh.CloudProjectDatabase.getIpRestrictions
Explore with Pulumi AI
Deprecated: Use ip_restrictions field in cloud_project_database datasource instead.
Use this data source to get the list of IP restrictions associated with a public cloud project.
Example Usage
To get the list of IP restriction on a database cluster service:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const iprestrictions = ovh.CloudProjectDatabase.getIpRestrictions({
    serviceName: "XXXXXX",
    engine: "YYYY",
    clusterId: "ZZZZ",
});
export const ips = iprestrictions.then(iprestrictions => iprestrictions.ips);
import pulumi
import pulumi_ovh as ovh
iprestrictions = ovh.CloudProjectDatabase.get_ip_restrictions(service_name="XXXXXX",
    engine="YYYY",
    cluster_id="ZZZZ")
pulumi.export("ips", iprestrictions.ips)
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProjectDatabase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		iprestrictions, err := CloudProjectDatabase.GetIpRestrictions(ctx, &cloudprojectdatabase.GetIpRestrictionsArgs{
			ServiceName: "XXXXXX",
			Engine:      "YYYY",
			ClusterId:   "ZZZZ",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("ips", iprestrictions.Ips)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() => 
{
    var iprestrictions = Ovh.CloudProjectDatabase.GetIpRestrictions.Invoke(new()
    {
        ServiceName = "XXXXXX",
        Engine = "YYYY",
        ClusterId = "ZZZZ",
    });
    return new Dictionary<string, object?>
    {
        ["ips"] = iprestrictions.Apply(getIpRestrictionsResult => getIpRestrictionsResult.Ips),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
import com.pulumi.ovh.CloudProjectDatabase.inputs.GetIpRestrictionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var iprestrictions = CloudProjectDatabaseFunctions.getIpRestrictions(GetIpRestrictionsArgs.builder()
            .serviceName("XXXXXX")
            .engine("YYYY")
            .clusterId("ZZZZ")
            .build());
        ctx.export("ips", iprestrictions.applyValue(getIpRestrictionsResult -> getIpRestrictionsResult.ips()));
    }
}
variables:
  iprestrictions:
    fn::invoke:
      Function: ovh:CloudProjectDatabase:getIpRestrictions
      Arguments:
        serviceName: XXXXXX
        engine: YYYY
        clusterId: ZZZZ
outputs:
  ips: ${iprestrictions.ips}
Using getIpRestrictions
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getIpRestrictions(args: GetIpRestrictionsArgs, opts?: InvokeOptions): Promise<GetIpRestrictionsResult>
function getIpRestrictionsOutput(args: GetIpRestrictionsOutputArgs, opts?: InvokeOptions): Output<GetIpRestrictionsResult>def get_ip_restrictions(cluster_id: Optional[str] = None,
                        engine: Optional[str] = None,
                        service_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetIpRestrictionsResult
def get_ip_restrictions_output(cluster_id: Optional[pulumi.Input[str]] = None,
                        engine: Optional[pulumi.Input[str]] = None,
                        service_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetIpRestrictionsResult]func GetIpRestrictions(ctx *Context, args *GetIpRestrictionsArgs, opts ...InvokeOption) (*GetIpRestrictionsResult, error)
func GetIpRestrictionsOutput(ctx *Context, args *GetIpRestrictionsOutputArgs, opts ...InvokeOption) GetIpRestrictionsResultOutput> Note: This function is named GetIpRestrictions in the Go SDK.
public static class GetIpRestrictions 
{
    public static Task<GetIpRestrictionsResult> InvokeAsync(GetIpRestrictionsArgs args, InvokeOptions? opts = null)
    public static Output<GetIpRestrictionsResult> Invoke(GetIpRestrictionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIpRestrictionsResult> getIpRestrictions(GetIpRestrictionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: ovh:CloudProjectDatabase/getIpRestrictions:getIpRestrictions
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Cluster
Id string - Cluster ID
 - Engine string
 - The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit: public documentation.
 - Service
Name string - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- Cluster
Id string - Cluster ID
 - Engine string
 - The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit: public documentation.
 - Service
Name string - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- cluster
Id String - Cluster ID
 - engine String
 - The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit: public documentation.
 - service
Name String - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- cluster
Id string - Cluster ID
 - engine string
 - The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit: public documentation.
 - service
Name string - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- cluster_
id str - Cluster ID
 - engine str
 - The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit: public documentation.
 - service_
name str - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- cluster
Id String - Cluster ID
 - engine String
 - The engine of the database cluster you want to list IP restrictions. To get a full list of available engine visit: public documentation.
 - service
Name String - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
getIpRestrictions Result
The following output properties are available:
- Cluster
Id string - See Argument Reference above.
 - Engine string
 - See Argument Reference above.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Ips List<string>
 - The list of IP restriction of the database associated with the project.
 - Service
Name string - See Argument Reference above.
 
- Cluster
Id string - See Argument Reference above.
 - Engine string
 - See Argument Reference above.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Ips []string
 - The list of IP restriction of the database associated with the project.
 - Service
Name string - See Argument Reference above.
 
- cluster
Id String - See Argument Reference above.
 - engine String
 - See Argument Reference above.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - ips List<String>
 - The list of IP restriction of the database associated with the project.
 - service
Name String - See Argument Reference above.
 
- cluster
Id string - See Argument Reference above.
 - engine string
 - See Argument Reference above.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - ips string[]
 - The list of IP restriction of the database associated with the project.
 - service
Name string - See Argument Reference above.
 
- cluster_
id str - See Argument Reference above.
 - engine str
 - See Argument Reference above.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - ips Sequence[str]
 - The list of IP restriction of the database associated with the project.
 - service_
name str - See Argument Reference above.
 
- cluster
Id String - See Argument Reference above.
 - engine String
 - See Argument Reference above.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - ips List<String>
 - The list of IP restriction of the database associated with the project.
 - service
Name String - See Argument Reference above.
 
Package Details
- Repository
 - ovh ovh/pulumi-ovh
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ovhTerraform Provider.