Has anyone done AWS ACM cert validation in Golang?...
# golang
g
Has anyone done AWS ACM cert validation in Golang? There isn't an example in the docs, I'm scratching my head as to how to iterate over DomainValidationOptions: https://www.pulumi.com/docs/reference/pkg/aws/acm/certificatevalidation/
My understanding is that we should not create resources inside an
ApplyT()
, so it's not clear how one might create multiple route53 records from this array output object
Looks like the
.Index()
+
.Elem()
combo is the way to go here -- and then also to determine the number of validation options without relying on the output value
g
I have an example for you. It's definitely a little tricky given the types in Go. Let me find it...
g
but I'm certainly open to learning a better way 🙂
g
Yep, that looks close to mine. Sorry, it took a while to dig it up.
Note: there are two ways to do it in that example - one if the number of records is known beforehand, and a second if that is not true.
g
Thank you! That's a great gist 🙂
Are the docs strictly auto-generated, or could I open a PR to add a Golang example for the cert validation?
g
A PR at https://github.com/pulumi/examples would be more than welcome!
The examples in-line in the docs are all auto-generated I believe.