Git Product home page Git Product logo

Comments (3)

ggtisc avatar ggtisc commented on September 13, 2024

Hi @ttruong-actian!

To replicate this issue we need the full name of the terraform resource, I found the service google_service_account in terraform registry, but it don't contain any argument or attribute called disk_type

Also please share the full code of the resource, because we can't replicate the issue with information that only you know. For sensitive information you could change it with examples like:

project = "my-project"
org_id = "1234567890"
email = "[email protected]"

from terraform-provider-google.

ttruong-actian avatar ttruong-actian commented on September 13, 2024

hi @ggtisc ,

my bad about the missing details. Here's my sample code for the cluster_autoscaling block with auto_provisioning_defaults. I wanted to use this block to define the ServiceAccount and KMSEncryptionKey for all node pools. In this block, the disk_type and disk_size are indicated as optional but they're set with a Default Value of 100Gb and pd-standard.

    enabled = var.cluster_autoscaling.enabled
    dynamic "auto_provisioning_defaults" {
      for_each = var.cluster_autoscaling.enabled ? [1] : []
      content {
        service_account   = google_service_account.main_cluster.email
        oauth_scopes      = local.node_oauth_scopes
        boot_disk_kms_key = var.cluster_autoscaling.manual_updated_nap ? var.kms_encryption_key : null
        management {
          auto_repair  = lookup(var.cluster_autoscaling, "auto_repair", false)
          auto_upgrade = lookup(var.cluster_autoscaling, "auto_upgrade", false)
        }
        upgrade_settings {
          strategy        = "SURGE"
          max_surge       = 1
          max_unavailable = 0
        }
      }
    }

When I tried to enable node-autoprovisioning via gcloud cli with a config file, the disk_type and disk_size are not required. my sample nap-config file below

autoprovisioningLocations:
  - us-central1-a
  - us-central1-c
  bootDiskKmsKey: projects/<name>/locations/us-central1/keyRings/<ring>/cryptoKeys/<key>
  imageType: COS_CONTAINERD
  serviceAccount: <name>@<project>.iam.gserviceaccount.com
  scopes:
    - https://www.googleapis.com/auth/logging.write
    - https://www.googleapis.com/auth/monitoring
  resourceLimits:
    - resourceType: 'cpu'
      maximum: 100
    - resourceType: 'memory'
      maximum: 100

from terraform-provider-google.

ggtisc avatar ggtisc commented on September 13, 2024

Thanks!

As you can see in Google Cloud documentation looking for the diskType field you'll notice that the default disk type is pd-standard if you don't set a value for this optional field.

If you're looking to use a hyperdisk-balanced you need to define it. If you need help on how to use it you could check the documentation here, and the different disk types here.

If after this you continue with issues please share a full code of your google_container_cluster like this.

from terraform-provider-google.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.