getServiceComponent
# Service Component Data Source
The Service Component data source provides information about the existing Aiven service Component.
Service components can be defined to get the connection info for specific service. Services may support multiple different access routes (VPC peering and public access), have additional components or support various authentication methods. Each of these may be represented by different DNS name or TCP port and the specific component to match can be selected by specifying appropriate filters as shown below.
Example Usage
using Pulumi;
using Aiven = Pulumi.Aiven;
class MyStack : Stack
{
public MyStack()
{
var sc1 = Output.Create(Aiven.GetServiceComponent.InvokeAsync(new Aiven.GetServiceComponentArgs
{
Project = aiven_kafka.Project1.Project,
ServiceName = aiven_kafka.Service1.Service_name,
Component = "kafka",
Route = "dynamic",
KafkaAuthenticationMethod = "certificate",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v3/go/aiven"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := aiven_kafka.Service1.Service_name
opt1 := "dynamic"
opt2 := "certificate"
_, err := aiven.GetServiceComponent(ctx, &aiven.GetServiceComponentArgs{
Project: aiven_kafka.Project1.Project,
ServiceName: &opt0,
Component: "kafka",
Route: &opt1,
KafkaAuthenticationMethod: &opt2,
}, nil)
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_aiven as aiven
sc1 = aiven.get_service_component(project=aiven_kafka["project1"]["project"],
service_name=aiven_kafka["service1"]["service_name"],
component="kafka",
route="dynamic",
kafka_authentication_method="certificate")
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const sc1 = aiven.getServiceComponent({
project: aiven_kafka.project1.project,
serviceName: aiven_kafka.service1.service_name,
component: "kafka",
route: "dynamic",
kafkaAuthenticationMethod: "certificate",
});
Using getServiceComponent
function getServiceComponent(args: GetServiceComponentArgs, opts?: InvokeOptions): Promise<GetServiceComponentResult>
def get_service_component(component: Optional[str] = None, kafka_authentication_method: Optional[str] = None, project: Optional[str] = None, route: Optional[str] = None, service_name: Optional[str] = None, ssl: Optional[bool] = None, usage: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetServiceComponentResult
func GetServiceComponent(ctx *Context, args *GetServiceComponentArgs, opts ...InvokeOption) (*GetServiceComponentResult, error)
Note: This function is named
GetServiceComponent
in the Go SDK.
public static class GetServiceComponent {
public static Task<GetServiceComponentResult> InvokeAsync(GetServiceComponentArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- Component string
is a service component name. Component may match the name of the service (
cassandra
,elasticsearch
,grafana
,influxdb
,kafka
,kafka_connect
,mysql
,pg
andredis
), in which case the connection info of the service itself is returned. Some service types support additional service specific components likekibana
for Elasticsearch,kafka_connect
,kafka_rest
andschema_registry
for Kafka, andpgbouncer
for PostgreSQL. Most service types also supportprometheus
.- Project string
and
service_name
- (Required) define the project and service the service component belongs to.- Kafka
Authentication stringMethod is Kafka authentication method. This is a value specific to the ‘kafka’ service components. And has the following available options:
certificate
andsasl
. If not set by the user only entries with emptykafka_authentication_method
will be selected.- Route string
is network access route. The route may be one of
dynamic
,public
, andprivate
. Usually, you’ll want to usedynamic
, which for services that are not in a private network identifies the regular public DNS name of the service and for services in a private network the private DNS name. If the service is in a private network but has also public access enabled thepublic
route type can be used to get the public DNS name of the service. Theprivate
option should typically not be used.- Service
Name string - Ssl bool
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- Usage string
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
- Component string
is a service component name. Component may match the name of the service (
cassandra
,elasticsearch
,grafana
,influxdb
,kafka
,kafka_connect
,mysql
,pg
andredis
), in which case the connection info of the service itself is returned. Some service types support additional service specific components likekibana
for Elasticsearch,kafka_connect
,kafka_rest
andschema_registry
for Kafka, andpgbouncer
for PostgreSQL. Most service types also supportprometheus
.- Project string
and
service_name
- (Required) define the project and service the service component belongs to.- Kafka
Authentication stringMethod is Kafka authentication method. This is a value specific to the ‘kafka’ service components. And has the following available options:
certificate
andsasl
. If not set by the user only entries with emptykafka_authentication_method
will be selected.- Route string
is network access route. The route may be one of
dynamic
,public
, andprivate
. Usually, you’ll want to usedynamic
, which for services that are not in a private network identifies the regular public DNS name of the service and for services in a private network the private DNS name. If the service is in a private network but has also public access enabled thepublic
route type can be used to get the public DNS name of the service. Theprivate
option should typically not be used.- Service
Name string - Ssl bool
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- Usage string
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
- component string
is a service component name. Component may match the name of the service (
cassandra
,elasticsearch
,grafana
,influxdb
,kafka
,kafka_connect
,mysql
,pg
andredis
), in which case the connection info of the service itself is returned. Some service types support additional service specific components likekibana
for Elasticsearch,kafka_connect
,kafka_rest
andschema_registry
for Kafka, andpgbouncer
for PostgreSQL. Most service types also supportprometheus
.- project string
and
service_name
- (Required) define the project and service the service component belongs to.- kafka
Authentication stringMethod is Kafka authentication method. This is a value specific to the ‘kafka’ service components. And has the following available options:
certificate
andsasl
. If not set by the user only entries with emptykafka_authentication_method
will be selected.- route string
is network access route. The route may be one of
dynamic
,public
, andprivate
. Usually, you’ll want to usedynamic
, which for services that are not in a private network identifies the regular public DNS name of the service and for services in a private network the private DNS name. If the service is in a private network but has also public access enabled thepublic
route type can be used to get the public DNS name of the service. Theprivate
option should typically not be used.- service
Name string - ssl boolean
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- usage string
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
- component str
is a service component name. Component may match the name of the service (
cassandra
,elasticsearch
,grafana
,influxdb
,kafka
,kafka_connect
,mysql
,pg
andredis
), in which case the connection info of the service itself is returned. Some service types support additional service specific components likekibana
for Elasticsearch,kafka_connect
,kafka_rest
andschema_registry
for Kafka, andpgbouncer
for PostgreSQL. Most service types also supportprometheus
.- project str
and
service_name
- (Required) define the project and service the service component belongs to.- kafka_
authentication_ strmethod is Kafka authentication method. This is a value specific to the ‘kafka’ service components. And has the following available options:
certificate
andsasl
. If not set by the user only entries with emptykafka_authentication_method
will be selected.- route str
is network access route. The route may be one of
dynamic
,public
, andprivate
. Usually, you’ll want to usedynamic
, which for services that are not in a private network identifies the regular public DNS name of the service and for services in a private network the private DNS name. If the service is in a private network but has also public access enabled thepublic
route type can be used to get the public DNS name of the service. Theprivate
option should typically not be used.- service_
name str - ssl bool
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- usage str
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
getServiceComponent Result
The following output properties are available:
- Component string
- Host string
is DNS name for connecting to the service component.
- Id string
The provider-assigned unique ID for this managed resource.
- Port int
is port number for connecting to the service component.
- Project string
- Kafka
Authentication stringMethod - Route string
- Service
Name string - Ssl bool
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- Usage string
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
- Component string
- Host string
is DNS name for connecting to the service component.
- Id string
The provider-assigned unique ID for this managed resource.
- Port int
is port number for connecting to the service component.
- Project string
- Kafka
Authentication stringMethod - Route string
- Service
Name string - Ssl bool
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- Usage string
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
- component string
- host string
is DNS name for connecting to the service component.
- id string
The provider-assigned unique ID for this managed resource.
- port number
is port number for connecting to the service component.
- project string
- kafka
Authentication stringMethod - route string
- service
Name string - ssl boolean
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- usage string
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
- component str
- host str
is DNS name for connecting to the service component.
- id str
The provider-assigned unique ID for this managed resource.
- port int
is port number for connecting to the service component.
- project str
- kafka_
authentication_ strmethod - route str
- service_
name str - ssl bool
whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components they may disable encryption. If not set by the user only entries with empty
ssl
orssl
set to true will be selected.- usage str
is DNS usage name, and can be one of
primary
,replica
orsyncing
.replica
is used by services that have separate master and standby roles for which it identifies thereplica
DNS name.syncing
is used by limited set of services to expose nodes before they have finished restoring state but may already be partially available, for example a PostgreSQL node that is streaming WAL segments from backup or current master but hasn’t yet fully caught up.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aiven
Terraform Provider.