title: How to configure S3 as backend storage for hashicorp vault
body: <p>I have a running EKS cluster I want to deploy Vault on that cluster using Terraform, my code is working fine while deploying. This is my main.tf</p>
  <pre><code>data &quot;aws_eks_cluster&quot; &quot;default&quot; {
    name = var.eks_cluster_name
  }
  
  data &quot;aws_eks_cluster_auth&quot; &quot;default&quot; {
    name = var.eks_cluster_name
  }
  
  resource &quot;kubernetes_namespace&quot; &quot;vault&quot; {
    metadata {
          name = &quot;vault&quot;
    }
  }
  
  resource &quot;helm_release&quot; &quot;vault&quot; {
    name      = &quot;vault&quot;
    repository = &quot;https://helm.releases.hashicorp.com/&quot;
    chart     = &quot;vault&quot;
    namespace = kubernetes_namespace.vault.metadata.0.name
  
  values = [
      &quot;${file(&quot;values.json&quot;)}&quot;
    ]
  }
  
  
  
  provider &quot;kubernetes&quot; {
    host                   = data.aws_eks_cluster.default.endpoint
    cluster_ca_certificate = base64decode(data.aws_eks_cluster.default.certificate_authority.0.data)
    token                  = data.aws_eks_cluster_auth.default.token
    load_config_file       = false
  }
  
  provider &quot;helm&quot; {
    kubernetes {
      host                   = data.aws_eks_cluster.default.endpoint
      cluster_ca_certificate = base64decode(data.aws_eks_cluster.default.certificate_authority.0.data)
      token                  = data.aws_eks_cluster_auth.default.token
      load_config_file       = false
    }
  }
  
  </code></pre>
  <p>And this is values.json</p>
  <pre><code>server:
    image:
      repository: vault
      tag: latest
    dataStorage:
      enabled: true
    auditStorage:
      enabled: true
    ha:
      enabled: true
      replicas: 1
  
          listener &quot;tcp&quot; {
            address         = &quot;[::]:8200&quot;
            cluster_address = &quot;[::]:8201&quot;
          }
  
          storage &quot;s3&quot; {
           access_key = &quot;xxxxxxxxx&quot;
           secret_key = &quot;xxxxxxxxxx&quot;
           bucket     = &quot;xxxx-vault&quot;
           region     = &quot;xxxx-xxxx-x&quot;
          }
  
          service_registration &quot;kubernetes&quot; {}
    extraVolumes:
      - type: secret
        name: tls
    extraEnvironmentVars:
      VAULT_ADDR: https://127.0.0.1:8200
      VAULT_SKIP_VERIFY: true
  ui:
    enabled: true
    serviceType: LoadBalancer
  
  </code></pre>
  <p>but it is not taking my S3 bucket as storage after deploy every time it is taking file system as storage not given S3 bucket. Whats wrong here?</p>