most-lighter-95902
11/23/2021, 11:37 PMthis.clusterOidcProviderId = cluster.core.oidcProvider?.id
little-cartoon-10569
11/24/2021, 12:00 AMundefined
forever, won't it? It's resolved immediately.this.clusterOidcProviderId = cluster.core.oidcProvider.id
most-lighter-95902
11/24/2021, 4:25 AMnew eks.Cluster({})
, Typescript is throwing an error. So I tried const clusterOidcProvider = cluster.core.oidcProvider as any
and then this.eksHash = clusterOidcProvider.id.apply((oidcProviderId: any) => oidcProviderId.split('/').slice(-1)[0])
but it’s still undefined.oidcProvider
is optional, wouldn’t the apply run as a callback when the oidcProvider
value is eventually resolved? If that’s the case, this.eksHash
should resolve to the right value, no?little-cartoon-10569
11/24/2021, 7:37 PMif (cluster.core.oidcProvider != undefined) { this.eksHash = this.clusterOidcProviderId?.apply(oidcProviderId => oidcProviderId.split('/').slice(-1)[0]); }