-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add service attribute that would return name of a NEG #668
Comments
That annotation looks like a JSON string, maybe you could use the jsondecode function. |
@JordanP Sure I can. It's not about being able to transform it, it's about being able to read it. Basically flow I'd like to achieve is:
Now I cannot do it, as there is no way to read (well I found a 80% of time working hacky way but that is bad) that status annotation at the same run when service is created. |
Would it help to re-read the service using a kubernetes_service data-source? See here for details: https://www.terraform.io/docs/providers/kubernetes/d/service.html |
#830 should improve the situation. After the create completes you should see the annotation on the service. |
@alexsomesan re-reading with data source requires either second run of TF or some workaround - as I understand normally resources are read prior to creation... |
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
0.12.12
Affected Resource(s)
kubernetes_service
Expected Behavior
After defining a service and adding annotation that creates a standalone NEG (or in-fact a ingress NEG):
cloud.google.com/neg: '{"exposed_ports": {"80":{}}}'
I'd like to able to fetch name of created NEG as an attribute.
I mean something similar to attribute: kubernetes_service.some_name.load_balancer_ingress.0.ip
This would enable using standalone NEGs as a backend for HTTP(S) Load balancers.
Nam of created NEG is available as annotation right after creation (and is port specific):
So it's 'k8s1-71f753e6-default-example-80-9b3d0709' in above example.
The text was updated successfully, but these errors were encountered: