Skip to content
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

Instance.AccessIpV6 format isn't very useful #130

Open
schmidtw opened this issue Nov 17, 2020 · 1 comment
Open

Instance.AccessIpV6 format isn't very useful #130

schmidtw opened this issue Nov 17, 2020 · 1 comment
Labels
kind/enhancement Improvements or new features

Comments

@schmidtw
Copy link

The Instance.AccessIpV6 format in go isn't very useful because it is wrapped with [ and ] values. This means I can't easily drop that value into route53 or other DNS providers without needing to add a fair bit of code to strip them.

Example of what it is today:

[2001:558:fffff:ffff:ffff:ffff:8951]

Instead the AccessIpV6 value would be more useful as:

2001:558:fffff:ffff:ffff:ffff:8951
@schmidtw
Copy link
Author

In go here is some code that solves the issue - I'm not sure where to insert it since most of the code in the pulumi-openstack library appears to be generated from something.

// This fixes an issue where the IPv6 address is wrapped with [] that Route53
// doesn't like or want.
func fixIpv6Address(in pulumi.StringOutput) pulumi.StringOutput {
	return in.ApplyString(func(s string) string {
		s = strings.TrimPrefix(s, "[")
		s = strings.TrimRight(s, "]")
		return s
	})
}

@infin8x infin8x added kind/enhancement Improvements or new features and removed enhancement labels Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

3 participants