bored-car-38257
04/27/2021, 3:23 PMGKE
- auto-pilot.
- i created a autopilot cluster manually - then imported it with pulumi import
command - got the below suggested code .
package main
import (
"<http://github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/container|github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/container>"
"<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := container.NewCluster(ctx, "name", &container.ClusterArgs{
EnableAutopilot: pulumi.Bool(true),
EnableBinaryAuthorization: pulumi.Bool(false),
EnableKubernetesAlpha: pulumi.Bool(false),
EnableL4IlbSubsetting: pulumi.Bool(false),
EnableLegacyAbac: pulumi.Bool(false),
EnableTpu: pulumi.Bool(false),
Name: pulumi.String("cluster-name"),
Network: pulumi.String("default"),
VerticalPodAutoscaling: &container.ClusterVerticalPodAutoscalingArgs{
Enabled: pulumi.Bool(true),
},
}, pulumi.Protect(true))
if err != nil {
return err
}
return nil
})
}
But when i tried using the above code as sample to create another auto-pilot
cluster . Got below error
error: gcp:container/cluster:Cluster resource 'name' has a problem: ConflictsWith: "enable_binary_authorization": conflicts with enable_autopilot. Examine values at 'Cluster.EnableBinaryAuthorization'.
billowy-army-68599
04/27/2021, 3:31 PMEnableBinaryAuthorization: pulumi.Bool(false)
bored-car-38257
04/28/2021, 2:11 AMConflictsWith:
in this code - githubbillowy-army-68599
04/28/2021, 2:40 PMbored-car-38257
04/29/2021, 1:26 AMEnableAutopilot: pulumi.Bool(true),
still got the error