pulumi / pulumi-gcp

A Google Cloud Platform (GCP) Pulumi resource package, providing multi-language access to GCP
Apache License 2.0
183 stars 52 forks source link

Multiple Conflicting Configuration Errors When Importing Existing GKE Cluster #1176

Closed hecomp closed 1 year ago

hecomp commented 1 year ago

What happened?

I am encountering multiple conflicting configuration errors when attempting to import an existing GKE cluster into Pulumi using the pulumi { import: "zone/clusterName" } flag on Typescript class wrapper. The error message is as follows:

$pulumi version
v3.80.0
"@pulumi/gcp": "^6.62.0",

Expected Behavior

I would expect Pulumi to handle the import without these conflicts, particularly since the cluster configuration is valid and preexistent in GCP.

Steps to reproduce

this.cluster = new gcp.container.Cluster("resourceName", {
            //  Settings
}, { parent: this, import: opts?.import  });

Output of pulumi about

Diagnostics:
  gcp:container:Cluster (resourceNameQA):
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "logging_service": conflicts with cluster_telemetry. Examine values at 'resourceNameQA.loggingService'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "node_pool": conflicts with enable_autopilot. Examine values at 'resourceNameQA.nodePools'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "ip_allocation_policy": conflicts with cluster_ipv4_cidr. Examine values at 'resourceNameQA.ipAllocationPolicy'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "default_max_pods_per_node": conflicts with enable_autopilot. Examine values at 'resourceNameQA.defaultMaxPodsPerNode'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "network_policy": conflicts with enable_autopilot. Examine values at 'resourceNameQA.networkPolicy'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "cluster_autoscaling.0.enabled": conflicts with enable_autopilot. Examine values at 'resourceNameQA.clusterAutoscaling.0.enabled'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "cluster_autoscaling.0.resource_limits": conflicts with enable_autopilot. Examine values at 'resourceNameQA.clusterAutoscaling.0.resourceLimits'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: expected cluster_autoscaling.0.auto_provisioning_defaults.0.disk_size to be at least (10), got 0. Examine values at 'resourceNameQA.clusterAutoscaling.autoProvisioningDefaults.diskSize'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: expected cluster_autoscaling.0.auto_provisioning_defaults.0.disk_type to be one of [pd-standard pd-ssd pd-balanced], got . Examine values at 'resourceNameQA.clusterAutoscaling.autoProvisioningDefaults.diskType'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "cluster_ipv4_cidr": conflicts with ip_allocation_policy. Examine values at 'resourceNameQA.clusterIpv4Cidr'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "enable_intranode_visibility": conflicts with enable_autopilot. Examine values at 'resourceNameQA.enableIntranodeVisibility'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "monitoring_service": conflicts with cluster_telemetry. Examine values at 'resourceNameQA.monitoringService'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "workload_identity_config": conflicts with enable_autopilot. Examine values at 'resourceNameQA.workloadIdentityConfig'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "addons_config.0.network_policy_config": conflicts with enable_autopilot. Examine values at 'resourceNameQA.addonsConfig.0.networkPolicyConfig'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "addons_config.0.gcs_fuse_csi_driver_config": conflicts with enable_autopilot. Examine values at 'resourceNameQA.addonsConfig.0.gcsFuseCsiDriverConfig'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "addons_config.0.gcp_filestore_csi_driver_config": conflicts with enable_autopilot. Examine values at 'resourceNameQA.addonsConfig.0.gcpFilestoreCsiDriverConfig'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Conflicting configuration arguments: "addons_config.0.dns_cache_config": conflicts with enable_autopilot. Examine values at 'resourceNameQA.addonsConfig.0.dnsCacheConfig'.
    error: gcp:container/cluster:Cluster resource 'resourceNameQA' has a problem: Invalid or unknown key. Examine values at 'resourceNameQA.monitoringConfig.advancedDatapathObservabilityConfigs'.
    error: Preview failed: one or more inputs failed to validate

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

hecomp commented 1 year ago

Duplicate issue.