terraform-provider-kubectl
terraform-provider-kubectl copied to clipboard
Ability to use data from status fields
I'm using this provider to create a Flux2 Receiver CR, which, once created, generates a URL path which it exposes under status.URL.
I would like to pass this into the gitlab_project_hook to automate setting up that webhook.
However, it appears like this provider only stores the fields that were provided in order to create the resource, but doesn't update any part of the statefile with e.g. the status fields.
I would like to be able to access such fields. It could also be explicit using e.g. a extra_tracked_fields variable, which in my case could be set to [ "status.URL" ]
An alternative could be to have a data source for fetching the entire object separately, similar to https://github.com/hashicorp/terraform-provider-kubernetes-alpha/issues/25
I like the idea about a new datasource - would make the most sense since adding another attribute to kubectl_manifest resource would cause lots of warnings from Terraform v1.x series saying that it had been updated outside of Terraform.