ovh.CloudProjectDatabase.Integration
Explore with Pulumi AI
Creates an integration for a database cluster associated with a public cloud project.
With this resource you can create an integration for all engine exept mongodb
.
Please take a look at the list of available types
in the Argument references
section in order to know the list of avaulable integrations. For example, thanks to the integration feature you can have your PostgreSQL logs in your OpenSearch Database.
Example Usage
Push PostgreSQL logs in an OpenSearch DB:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
import * as ovh from "@pulumi/ovh";
const dbPostgresql = ovh.CloudProjectDatabase.getDatabase({
serviceName: "XXXX",
engine: "postgresql",
id: "ZZZZ",
});
const dbOpensearch = ovh.CloudProjectDatabase.getDatabase({
serviceName: "XXXX",
engine: "opensearch",
id: "ZZZZ",
});
const integration = new ovh.cloudprojectdatabase.Integration("integration", {
serviceName: dbPostgresql.then(dbPostgresql => dbPostgresql.serviceName),
engine: dbPostgresql.then(dbPostgresql => dbPostgresql.engine),
clusterId: dbPostgresql.then(dbPostgresql => dbPostgresql.id),
sourceServiceId: dbPostgresql.then(dbPostgresql => dbPostgresql.id),
destinationServiceId: dbOpensearch.then(dbOpensearch => dbOpensearch.id),
type: "opensearchLogs",
});
import pulumi
import pulumi_ovh as ovh
db_postgresql = ovh.CloudProjectDatabase.get_database(service_name="XXXX",
engine="postgresql",
id="ZZZZ")
db_opensearch = ovh.CloudProjectDatabase.get_database(service_name="XXXX",
engine="opensearch",
id="ZZZZ")
integration = ovh.cloud_project_database.Integration("integration",
service_name=db_postgresql.service_name,
engine=db_postgresql.engine,
cluster_id=db_postgresql.id,
source_service_id=db_postgresql.id,
destination_service_id=db_opensearch.id,
type="opensearchLogs")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudprojectdatabase"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
dbPostgresql, err := cloudprojectdatabase.GetDatabase(ctx, &cloudprojectdatabase.GetDatabaseArgs{
ServiceName: "XXXX",
Engine: "postgresql",
Id: "ZZZZ",
}, nil)
if err != nil {
return err
}
dbOpensearch, err := cloudprojectdatabase.GetDatabase(ctx, &cloudprojectdatabase.GetDatabaseArgs{
ServiceName: "XXXX",
Engine: "opensearch",
Id: "ZZZZ",
}, nil)
if err != nil {
return err
}
_, err = cloudprojectdatabase.NewIntegration(ctx, "integration", &cloudprojectdatabase.IntegrationArgs{
ServiceName: pulumi.String(dbPostgresql.ServiceName),
Engine: pulumi.String(dbPostgresql.Engine),
ClusterId: pulumi.String(dbPostgresql.Id),
SourceServiceId: pulumi.String(dbPostgresql.Id),
DestinationServiceId: pulumi.String(dbOpensearch.Id),
Type: pulumi.String("opensearchLogs"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var dbPostgresql = Ovh.CloudProjectDatabase.GetDatabase.Invoke(new()
{
ServiceName = "XXXX",
Engine = "postgresql",
Id = "ZZZZ",
});
var dbOpensearch = Ovh.CloudProjectDatabase.GetDatabase.Invoke(new()
{
ServiceName = "XXXX",
Engine = "opensearch",
Id = "ZZZZ",
});
var integration = new Ovh.CloudProjectDatabase.Integration("integration", new()
{
ServiceName = dbPostgresql.Apply(getDatabaseResult => getDatabaseResult.ServiceName),
Engine = dbPostgresql.Apply(getDatabaseResult => getDatabaseResult.Engine),
ClusterId = dbPostgresql.Apply(getDatabaseResult => getDatabaseResult.Id),
SourceServiceId = dbPostgresql.Apply(getDatabaseResult => getDatabaseResult.Id),
DestinationServiceId = dbOpensearch.Apply(getDatabaseResult => getDatabaseResult.Id),
Type = "opensearchLogs",
});
});
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.GetDatabaseArgs;
import com.pulumi.ovh.CloudProjectDatabase.Integration;
import com.pulumi.ovh.CloudProjectDatabase.IntegrationArgs;
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 dbPostgresql = CloudProjectDatabaseFunctions.getDatabase(GetDatabaseArgs.builder()
.serviceName("XXXX")
.engine("postgresql")
.id("ZZZZ")
.build());
final var dbOpensearch = CloudProjectDatabaseFunctions.getDatabase(GetDatabaseArgs.builder()
.serviceName("XXXX")
.engine("opensearch")
.id("ZZZZ")
.build());
var integration = new Integration("integration", IntegrationArgs.builder()
.serviceName(dbPostgresql.applyValue(getDatabaseResult -> getDatabaseResult.serviceName()))
.engine(dbPostgresql.applyValue(getDatabaseResult -> getDatabaseResult.engine()))
.clusterId(dbPostgresql.applyValue(getDatabaseResult -> getDatabaseResult.id()))
.sourceServiceId(dbPostgresql.applyValue(getDatabaseResult -> getDatabaseResult.id()))
.destinationServiceId(dbOpensearch.applyValue(getDatabaseResult -> getDatabaseResult.id()))
.type("opensearchLogs")
.build());
}
}
resources:
integration:
type: ovh:CloudProjectDatabase:Integration
properties:
serviceName: ${dbPostgresql.serviceName}
engine: ${dbPostgresql.engine}
clusterId: ${dbPostgresql.id}
sourceServiceId: ${dbPostgresql.id}
destinationServiceId: ${dbOpensearch.id}
type: opensearchLogs
variables:
dbPostgresql:
fn::invoke:
function: ovh:CloudProjectDatabase:getDatabase
arguments:
serviceName: XXXX
engine: postgresql
id: ZZZZ
dbOpensearch:
fn::invoke:
function: ovh:CloudProjectDatabase:getDatabase
arguments:
serviceName: XXXX
engine: opensearch
id: ZZZZ
Create Integration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Integration(name: string, args: IntegrationArgs, opts?: CustomResourceOptions);
@overload
def Integration(resource_name: str,
args: IntegrationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Integration(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
destination_service_id: Optional[str] = None,
engine: Optional[str] = None,
service_name: Optional[str] = None,
source_service_id: Optional[str] = None,
parameters: Optional[Mapping[str, str]] = None,
type: Optional[str] = None)
func NewIntegration(ctx *Context, name string, args IntegrationArgs, opts ...ResourceOption) (*Integration, error)
public Integration(string name, IntegrationArgs args, CustomResourceOptions? opts = null)
public Integration(String name, IntegrationArgs args)
public Integration(String name, IntegrationArgs args, CustomResourceOptions options)
type: ovh:CloudProjectDatabase:Integration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. IntegrationArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. IntegrationArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. IntegrationArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. IntegrationArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. IntegrationArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var integrationResource = new Ovh.CloudProjectDatabase.Integration("integrationResource", new()
{
ClusterId = "string",
DestinationServiceId = "string",
Engine = "string",
ServiceName = "string",
SourceServiceId = "string",
Parameters =
{
{ "string", "string" },
},
Type = "string",
});
example, err := CloudProjectDatabase.NewIntegration(ctx, "integrationResource", &CloudProjectDatabase.IntegrationArgs{
ClusterId: pulumi.String("string"),
DestinationServiceId: pulumi.String("string"),
Engine: pulumi.String("string"),
ServiceName: pulumi.String("string"),
SourceServiceId: pulumi.String("string"),
Parameters: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
})
var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
.clusterId("string")
.destinationServiceId("string")
.engine("string")
.serviceName("string")
.sourceServiceId("string")
.parameters(Map.of("string", "string"))
.type("string")
.build());
integration_resource = ovh.cloud_project_database.Integration("integrationResource",
cluster_id="string",
destination_service_id="string",
engine="string",
service_name="string",
source_service_id="string",
parameters={
"string": "string",
},
type="string")
const integrationResource = new ovh.cloudprojectdatabase.Integration("integrationResource", {
clusterId: "string",
destinationServiceId: "string",
engine: "string",
serviceName: "string",
sourceServiceId: "string",
parameters: {
string: "string",
},
type: "string",
});
type: ovh:CloudProjectDatabase:Integration
properties:
clusterId: string
destinationServiceId: string
engine: string
parameters:
string: string
serviceName: string
sourceServiceId: string
type: string
Integration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Integration resource accepts the following input properties:
- Cluster
Id This property is required. Changes to this property will trigger replacement.
- Cluster ID.
- Destination
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the destination service.
- Engine
This property is required. Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - Service
Name This property is required. Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Source
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the source service.
- Parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- Type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- Cluster
Id This property is required. Changes to this property will trigger replacement.
- Cluster ID.
- Destination
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the destination service.
- Engine
This property is required. Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - Service
Name This property is required. Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Source
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the source service.
- Parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- Type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster
Id This property is required. Changes to this property will trigger replacement.
- Cluster ID.
- destination
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the destination service.
- engine
This property is required. Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - service
Name This property is required. Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the source service.
- parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster
Id This property is required. Changes to this property will trigger replacement.
- Cluster ID.
- destination
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the destination service.
- engine
This property is required. Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - service
Name This property is required. Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the source service.
- parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster_
id This property is required. Changes to this property will trigger replacement.
- Cluster ID.
- destination_
service_ id This property is required. Changes to this property will trigger replacement.
- ID of the destination service.
- engine
This property is required. Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - service_
name This property is required. Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source_
service_ id This property is required. Changes to this property will trigger replacement.
- ID of the source service.
- parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster
Id This property is required. Changes to this property will trigger replacement.
- Cluster ID.
- destination
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the destination service.
- engine
This property is required. Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - service
Name This property is required. Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source
Service Id This property is required. Changes to this property will trigger replacement.
- ID of the source service.
- parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
Outputs
All input properties are implicitly available as output properties. Additionally, the Integration resource produces the following output properties:
Look up Existing Integration Resource
Get an existing Integration 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?: IntegrationState, opts?: CustomResourceOptions): Integration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
destination_service_id: Optional[str] = None,
engine: Optional[str] = None,
parameters: Optional[Mapping[str, str]] = None,
service_name: Optional[str] = None,
source_service_id: Optional[str] = None,
status: Optional[str] = None,
type: Optional[str] = None) -> Integration
func GetIntegration(ctx *Context, name string, id IDInput, state *IntegrationState, opts ...ResourceOption) (*Integration, error)
public static Integration Get(string name, Input<string> id, IntegrationState? state, CustomResourceOptions? opts = null)
public static Integration get(String name, Output<String> id, IntegrationState state, CustomResourceOptions options)
resources: _: type: ovh:CloudProjectDatabase:Integration get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Cluster
Id Changes to this property will trigger replacement.
- Cluster ID.
- Destination
Service Id Changes to this property will trigger replacement.
- ID of the destination service.
- Engine
Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - Parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- Service
Name Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Source
Service Id Changes to this property will trigger replacement.
- ID of the source service.
- Status string
- Current status of the integration.
- Type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- Cluster
Id Changes to this property will trigger replacement.
- Cluster ID.
- Destination
Service Id Changes to this property will trigger replacement.
- ID of the destination service.
- Engine
Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - Parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- Service
Name Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - Source
Service Id Changes to this property will trigger replacement.
- ID of the source service.
- Status string
- Current status of the integration.
- Type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster
Id Changes to this property will trigger replacement.
- Cluster ID.
- destination
Service Id Changes to this property will trigger replacement.
- ID of the destination service.
- engine
Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- service
Name Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source
Service Id Changes to this property will trigger replacement.
- ID of the source service.
- status String
- Current status of the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster
Id Changes to this property will trigger replacement.
- Cluster ID.
- destination
Service Id Changes to this property will trigger replacement.
- ID of the destination service.
- engine
Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- service
Name Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source
Service Id Changes to this property will trigger replacement.
- ID of the source service.
- status string
- Current status of the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster_
id Changes to this property will trigger replacement.
- Cluster ID.
- destination_
service_ id Changes to this property will trigger replacement.
- ID of the destination service.
- engine
Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- service_
name Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source_
service_ id Changes to this property will trigger replacement.
- ID of the source service.
- status str
- Current status of the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
- cluster
Id Changes to this property will trigger replacement.
- Cluster ID.
- destination
Service Id Changes to this property will trigger replacement.
- ID of the destination service.
- engine
Changes to this property will trigger replacement.
- The engine of the database cluster you want to add. You can find the complete list of available engine in the public documentation.
All engines available exept
mongodb
. - parameters
Changes to this property will trigger replacement.
- Parameters for the integration.
- service
Name Changes to this property will trigger replacement.
- The id of the public cloud project. If omitted,
the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used. - source
Service Id Changes to this property will trigger replacement.
- ID of the source service.
- status String
- Current status of the integration.
- type
Changes to this property will trigger replacement.
- Type of the integration.
Available types:
grafanaDashboard
grafanaDatasource
kafkaConnect
kafkaLogs
kafkaMirrorMaker
Import
OVHcloud Managed database clusters users can be imported using the service_name
, engine
, cluster_id
and id
of the user, separated by “/” E.g.,
bash
$ pulumi import ovh:CloudProjectDatabase/integration:Integration my_user service_name/engine/cluster_id/id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.