diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b65e230..80197acca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ nav_order: 1 - Add `emit_backward_heartbeats_enabled` field support in Mirrormaker replication flow - Add validation for email fields in `account_team_member`, `organization_user` and `project_user` resources to check if email is lowercase and valid +- Add `connection_info` field to components of all services. This field contains connection information for the + component, and is a combination of the `host` and `port` fields ## [4.9.3] - 2023-10-27 diff --git a/docs/data-sources/cassandra.md b/docs/data-sources/cassandra.md index 2442962ab..0c7117643 100644 --- a/docs/data-sources/cassandra.md +++ b/docs/data-sources/cassandra.md @@ -126,6 +126,7 @@ Read-Only: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/clickhouse.md b/docs/data-sources/clickhouse.md index 7b6e08d20..fe884d39d 100644 --- a/docs/data-sources/clickhouse.md +++ b/docs/data-sources/clickhouse.md @@ -128,6 +128,7 @@ Read-Only: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/flink.md b/docs/data-sources/flink.md index 3cfb9e5d0..88f5c8d47 100644 --- a/docs/data-sources/flink.md +++ b/docs/data-sources/flink.md @@ -62,6 +62,7 @@ data "aiven_flink" "flink" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/grafana.md b/docs/data-sources/grafana.md index 6e41e05d5..ebfa89112 100644 --- a/docs/data-sources/grafana.md +++ b/docs/data-sources/grafana.md @@ -62,6 +62,7 @@ data "aiven_grafana" "gr1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/influxdb.md b/docs/data-sources/influxdb.md index 7c198c34f..f6537d1cc 100644 --- a/docs/data-sources/influxdb.md +++ b/docs/data-sources/influxdb.md @@ -62,6 +62,7 @@ data "aiven_influxdb" "inf1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/kafka.md b/docs/data-sources/kafka.md index f652b8a5b..d8a4774fe 100644 --- a/docs/data-sources/kafka.md +++ b/docs/data-sources/kafka.md @@ -64,6 +64,7 @@ data "aiven_kafka" "kafka1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/kafka_connect.md b/docs/data-sources/kafka_connect.md index 2d774a226..9715f8de2 100644 --- a/docs/data-sources/kafka_connect.md +++ b/docs/data-sources/kafka_connect.md @@ -62,6 +62,7 @@ data "aiven_kafka_connect" "kc1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/kafka_mirrormaker.md b/docs/data-sources/kafka_mirrormaker.md index 23fa4440f..4d0883ef0 100644 --- a/docs/data-sources/kafka_mirrormaker.md +++ b/docs/data-sources/kafka_mirrormaker.md @@ -62,6 +62,7 @@ data "aiven_kafka_mirrormaker" "mm1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/m3aggregator.md b/docs/data-sources/m3aggregator.md index 24e58377a..3ef290a37 100644 --- a/docs/data-sources/m3aggregator.md +++ b/docs/data-sources/m3aggregator.md @@ -62,6 +62,7 @@ data "aiven_m3aggregator" "m3a" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/m3db.md b/docs/data-sources/m3db.md index 2af4137fb..c1a1b4ac5 100644 --- a/docs/data-sources/m3db.md +++ b/docs/data-sources/m3db.md @@ -62,6 +62,7 @@ data "aiven_m3db" "m3" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/mysql.md b/docs/data-sources/mysql.md index 7bd9111ed..4ac7912dd 100644 --- a/docs/data-sources/mysql.md +++ b/docs/data-sources/mysql.md @@ -62,6 +62,7 @@ data "aiven_mysql" "mysql1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/opensearch.md b/docs/data-sources/opensearch.md index 56d87a57a..951dd77d1 100644 --- a/docs/data-sources/opensearch.md +++ b/docs/data-sources/opensearch.md @@ -62,6 +62,7 @@ data "aiven_opensearch" "os1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/pg.md b/docs/data-sources/pg.md index c0dfeadd1..cc355f43c 100644 --- a/docs/data-sources/pg.md +++ b/docs/data-sources/pg.md @@ -62,6 +62,7 @@ data "aiven_pg" "pg" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/data-sources/redis.md b/docs/data-sources/redis.md index 79b7b3bc5..475636188 100644 --- a/docs/data-sources/redis.md +++ b/docs/data-sources/redis.md @@ -62,6 +62,7 @@ data "aiven_redis" "redis1" { Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/cassandra.md b/docs/resources/cassandra.md index 8e2bff40d..8d233a249 100644 --- a/docs/resources/cassandra.md +++ b/docs/resources/cassandra.md @@ -175,6 +175,7 @@ Read-Only: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/clickhouse.md b/docs/resources/clickhouse.md index fad489322..d213c2bc0 100644 --- a/docs/resources/clickhouse.md +++ b/docs/resources/clickhouse.md @@ -169,6 +169,7 @@ Read-Only: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/flink.md b/docs/resources/flink.md index b0bf76415..be50f982a 100644 --- a/docs/resources/flink.md +++ b/docs/resources/flink.md @@ -148,6 +148,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/grafana.md b/docs/resources/grafana.md index 53a6a2d77..9a776a75a 100644 --- a/docs/resources/grafana.md +++ b/docs/resources/grafana.md @@ -320,6 +320,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/influxdb.md b/docs/resources/influxdb.md index acb8072cb..db2fd1248 100644 --- a/docs/resources/influxdb.md +++ b/docs/resources/influxdb.md @@ -176,6 +176,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/kafka.md b/docs/resources/kafka.md index 9ffd767d1..c14594276 100644 --- a/docs/resources/kafka.md +++ b/docs/resources/kafka.md @@ -321,6 +321,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/kafka_connect.md b/docs/resources/kafka_connect.md index f1181fc5d..84daa34c6 100644 --- a/docs/resources/kafka_connect.md +++ b/docs/resources/kafka_connect.md @@ -189,6 +189,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/kafka_mirrormaker.md b/docs/resources/kafka_mirrormaker.md index 70be653a0..2dc4c8e89 100644 --- a/docs/resources/kafka_mirrormaker.md +++ b/docs/resources/kafka_mirrormaker.md @@ -150,6 +150,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/m3aggregator.md b/docs/resources/m3aggregator.md index 79c0cffc4..94b55c627 100644 --- a/docs/resources/m3aggregator.md +++ b/docs/resources/m3aggregator.md @@ -130,6 +130,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/m3db.md b/docs/resources/m3db.md index 7f2c1ff40..b2bd7ee59 100644 --- a/docs/resources/m3db.md +++ b/docs/resources/m3db.md @@ -271,6 +271,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/mysql.md b/docs/resources/mysql.md index 0a9c11907..e181970be 100644 --- a/docs/resources/mysql.md +++ b/docs/resources/mysql.md @@ -236,6 +236,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/opensearch.md b/docs/resources/opensearch.md index 2c518fbb6..b0c31eeee 100644 --- a/docs/resources/opensearch.md +++ b/docs/resources/opensearch.md @@ -340,6 +340,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/pg.md b/docs/resources/pg.md index 709b56ea9..6ebb074e4 100644 --- a/docs/resources/pg.md +++ b/docs/resources/pg.md @@ -330,6 +330,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/docs/resources/redis.md b/docs/resources/redis.md index 9f4a7e879..2f28b63c0 100644 --- a/docs/resources/redis.md +++ b/docs/resources/redis.md @@ -195,6 +195,7 @@ Optional: Read-Only: - `component` (String) +- `connection_info` (String) - `host` (String) - `kafka_authentication_method` (String) - `port` (Number) diff --git a/internal/schemautil/service.go b/internal/schemautil/service.go index 785785011..39733d4f6 100644 --- a/internal/schemautil/service.go +++ b/internal/schemautil/service.go @@ -210,18 +210,24 @@ func ServiceCommonSchema() map[string]*schema.Schema { "host": { Type: schema.TypeString, Computed: true, - Description: "DNS name for connecting to the service component", - }, - "kafka_authentication_method": { - Type: schema.TypeString, - Computed: true, - Description: "Kafka authentication method. This is a value specific to the 'kafka' service component", + Description: "Host name for connecting to the service component", }, "port": { Type: schema.TypeInt, Computed: true, Description: "Port number for connecting to the service component", }, + "connection_info": { + Type: schema.TypeString, + Computed: true, + Description: "Connection info for connecting to the service component." + + " This is a combination of host and port.", + }, + "kafka_authentication_method": { + Type: schema.TypeString, + Computed: true, + Description: "Kafka authentication method. This is a value specific to the 'kafka' service component", + }, "route": { Type: schema.TypeString, Computed: true, @@ -744,12 +750,13 @@ func FlattenServiceComponents(r *aiven.Service) []map[string]interface{} { "component": c.Component, "host": c.Host, "port": c.Port, - "route": c.Route, - "usage": c.Usage, + "connection_info": fmt.Sprintf("%s:%d", c.Host, c.Port), "kafka_authentication_method": c.KafkaAuthenticationMethod, + "route": c.Route, // By default, endpoints are always encrypted and // this property is only included for service components that may disable encryption. - "ssl": PointerValueOrDefault(c.Ssl, true), + "ssl": PointerValueOrDefault(c.Ssl, true), + "usage": c.Usage, } components = append(components, component) }