worried-city-86458
03/25/2022, 10:58 PMKubeConfig = Output.Tuple(cluster.Name, clusterEndpoint, cluster.CertificateAuthority.Apply(ca => ca.Data!))
.Apply(((string ClusterName, string ClusterEndpoint, string ClusterCa) tuple) =>
RenderTemplate("KubeConfig.yaml", ReadResource, new { tuple.ClusterName, tuple.ClusterEndpoint, tuple.ClusterCa, EnvName, AwsConfig.Iam.DeployerRoleArn }))
.Apply(Output.CreateSecret);
To:
KubeConfig = Output.Tuple(cluster.Name, clusterEndpoint, cluster.CertificateAuthorities.Apply(authorities => authorities[0].Data!))
.Apply(((string ClusterName, string ClusterEndpoint, string ClusterCa) tuple) =>
RenderTemplate("KubeConfig.yaml", ReadResource, new { tuple.ClusterName, tuple.ClusterEndpoint, tuple.ClusterCa, EnvName, AwsConfig.Iam.DeployerRoleArn }))
.Apply(Output.CreateSecret);
Diagnostics:
pulumi:pulumi:Stack (aws-eks-alpha):
error: Running program '' failed with an unhandled exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at T System.Collections.Immutable.ImmutableArray<T>.get_Item(int index)
at Pharos.Gemini.Aws.EksStack(IOptions<Config> options, ILogger<EksStack> logger)+(ImmutableArray<ClusterCertificateAuthority> cas) => { }
at Output<U> Pulumi.Output<T>.Apply<U>(Func<T, U> func)+(T t) => { }
at async Task<OutputData<U>> Pulumi.Output<T>.ApplyHelperAsync<U>(Task<OutputData<T>> dataTask, Func<T, Output<U>> func)
CertificateAuthorities
is nullcertificateAuthority
not certificateAuthorities
so is there something else I need to do to upgrade to v5?Identities
is handled which works fine and makes me think pulumi needs to do something else to map the certificate authorities