Terraofrm module to deploy cloudwatch_exporter on kubernetes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
4.1KB

  1. #####
  2. # Global
  3. #####
  4. output "selector_labels" {
  5. description = "Map of the labels that are used as selectors."
  6. value = element(concat(kubernetes_service.this.*.spec.0.selector, [{}]), 0)
  7. }
  8. output "image_name" {
  9. description = "Name of the docker image used for the cloudwatch-exporter container."
  10. value = var.enabled ? var.image_name : ""
  11. }
  12. output "image_version" {
  13. description = "Tag of the docker image used for the cloudwatch-exporter container."
  14. value = var.enabled ? var.image_version : ""
  15. }
  16. output "image_pull_policy" {
  17. description = "Image pull policy defined on the cloudwatch-exporter container."
  18. value = var.enabled ? var.image_pull_policy : ""
  19. }
  20. output "prometheus_alert_groups" {
  21. description = "List of object representing prometheus alert groups you can import in prometheus to alert you in case of problems."
  22. value = var.enabled ? local.prometheus_alert_groups : []
  23. }
  24. #####
  25. # Deployment
  26. #####
  27. output "deployment_name" {
  28. description = "Name of the deployment created by the module."
  29. value = element(concat(kubernetes_deployment.this.*.metadata.0.name, [""]), 0)
  30. }
  31. output "deployment_annotations" {
  32. description = "Map of annotations that are configured on the deployment."
  33. value = element(concat(kubernetes_deployment.this.*.metadata.0.annotations, [{}]), 0)
  34. }
  35. output "deployment_labels" {
  36. description = "Map of labels that are configured on the deployment."
  37. value = element(concat(kubernetes_deployment.this.*.metadata.0.labels, [{}]), 0)
  38. }
  39. output "deployment_template_annotations" {
  40. description = "Map of annotations that are configured on the deployment."
  41. value = element(concat(kubernetes_deployment.this.*.spec.0.template.0.metadata.0.annotations, [{}]), 0)
  42. }
  43. output "deployment_template_labels" {
  44. description = "Map of labels that are configured on the deployment."
  45. value = element(concat(kubernetes_deployment.this.*.spec.0.template.0.metadata.0.labels, [{}]), 0)
  46. }
  47. #####
  48. # Sercret
  49. #####
  50. output "secret_name" {
  51. description = "Name of the secret created by the module."
  52. value = element(concat(kubernetes_secret.this.*.metadata.0.name, [""]), 0)
  53. }
  54. output "secret_annotations" {
  55. description = "Map of annotations that are configured on the secret."
  56. value = element(concat(kubernetes_secret.this.*.metadata.0.annotations, [{}]), 0)
  57. }
  58. output "secret_labels" {
  59. description = "Map of labels that are configured on the secret."
  60. value = element(concat(kubernetes_secret.this.*.metadata.0.labels, [{}]), 0)
  61. }
  62. #####
  63. # Service
  64. #####
  65. output "service_name" {
  66. description = "Name of the service created by the module."
  67. value = element(concat(kubernetes_service.this.*.metadata.0.name, [""]), 0)
  68. }
  69. output "service_port" {
  70. description = "Port number of the service port."
  71. value = var.enabled ? local.service_port : ""
  72. }
  73. output "service_port_name" {
  74. description = "Name of the service port."
  75. value = var.enabled ? "http" : ""
  76. }
  77. output "service_annotations" {
  78. description = "Map of annotations that are configured on the service."
  79. value = element(concat(kubernetes_service.this.*.metadata.0.annotations, [{}]), 0)
  80. }
  81. output "service_labels" {
  82. description = "Map of labels that are configured on the service."
  83. value = element(concat(kubernetes_service.this.*.metadata.0.labels, [{}]), 0)
  84. }
  85. #####
  86. # Configmap
  87. #####
  88. output "config_map_name" {
  89. description = "Name of the config_map created by the module."
  90. value = element(concat(kubernetes_config_map.this.*.metadata.0.name, [""]), 0)
  91. }
  92. output "config_map_annotations" {
  93. description = "Map of annotations that are configured on the config_map."
  94. value = element(concat(kubernetes_config_map.this.*.metadata.0.annotations, [{}]), 0)
  95. }
  96. output "config_map_labels" {
  97. description = "Map of labels that are configured on the config_map."
  98. value = element(concat(kubernetes_config_map.this.*.metadata.0.labels, [{}]), 0)
  99. }
  100. #####
  101. # Namespace
  102. #####
  103. output "namespace" {
  104. description = "Name of the namespace in which the resources have been deployed."
  105. value = element(concat(kubernetes_deployment.this.*.metadata.0.namespace, [""]), 0)
  106. }