You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Grafana Crossplane provider should POST to the Grafana API, having a payload which includes the token.
In Terraform, this token is a simple (required) string under the slack schema.
In Crossplane, the token is sourced from a K8s secret, specified by tokenSecretRef.
Actual Behavior
The API post is rejected as invalid due to the token being missing:
Warning CannotCreateExternalResource 1s (x15 over 8m19s) managed/alerting.grafana.crossplane.io/v1alpha1, kind=contactpoint failed to create the resource: [{0 [POST /v1/provisioning/contact-points][400] postContactpointsBadRequest {"message":"invalid object specification: failed to validate integration \"Crossplane IaC: Slack: #devops-alerts-testing\" (UID ) of type \"slack\": token must be specified when using the Slack chat API"} []}]
Upon configuring the Grafana provider to run with a debug configuration, the debug logs include this clue, suggesting the token is completely missing/blank:
Provision Grafana with a Service Account + Token (having admin rights)
Provision Crossplane using this provider, configured to auth with the SA-Token
Attempt to provision the above ContactPoint, using the established ProviderConfig.
Important Factoids
Grafana is running as an OSS install (helm installed), in the same Kubernetes cluster as Crossplane, but in a different namespace. The Grafana API url is http://grafana.monitoring.svc.cluster.local in the ProviderConfig.
I did duplicate the secret containing the slack token to the crossplane-system namespace, but that had change in the condition versus using the monitoring namespace.
Crossplane Version
v1.16.0
Crossplane Grafana Provider Version
v0.22.0
Affected Resource(s)
(May affect other resources with
tokenSecretRefs
?)YAML resources
Expected Behavior
The Grafana Crossplane provider should POST to the Grafana API, having a payload which includes the
token
.In Terraform, this
token
is a simple (required) string under theslack
schema.In Crossplane, the
token
is sourced from a K8s secret, specified bytokenSecretRef
.Actual Behavior
The API post is rejected as invalid due to the token being missing:
Warning CannotCreateExternalResource 1s (x15 over 8m19s) managed/alerting.grafana.crossplane.io/v1alpha1, kind=contactpoint failed to create the resource: [{0 [POST /v1/provisioning/contact-points][400] postContactpointsBadRequest {"message":"invalid object specification: failed to validate integration \"Crossplane IaC: Slack: #devops-alerts-testing\" (UID ) of type \"slack\": token must be specified when using the Slack chat API"} []}]
Upon configuring the Grafana provider to run with a debug configuration, the debug logs include this clue, suggesting the token is completely missing/blank:
\"slack.1515124646.token\":*terraform.ResourceAttrDiff{Old:\"\", New:\"\", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:true, Type:0x0},
Excepted from the full logs:
Steps to Reproduce
admin
rights)ContactPoint
, using the establishedProviderConfig
.Important Factoids
Grafana is running as an OSS install (helm installed), in the same Kubernetes cluster as Crossplane, but in a different namespace. The Grafana API url is
http://grafana.monitoring.svc.cluster.local
in theProviderConfig
.I did duplicate the secret containing the slack token to the
crossplane-system
namespace, but that had change in the condition versus using themonitoring
namespace.A brief search in the Terraform provider issues show no related issues.
References
No response
The text was updated successfully, but these errors were encountered: