Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Virtual Private Cloud
  • Getting started
    • All tutorials
      • Architecture and protection of a basic web service
      • DHCP settings for interfacing with a corporate DNS server
      • Setting up networking between resources from different folders
      • Implementing fault-tolerant scenarios for NAT VMs
      • Configuring a network for Yandex Data Processing
      • Network connection switching during Yandex Data Processing cluster recreation
      • Migrating an HDFS Yandex Data Processing cluster to a different availability zone
      • Deploying an Always On availability group with an internal network load balancer
  • DDoS Protection
  • Access management
  • Pricing policy
  • Terraform reference
  • Metrics Monitoring
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Getting started
  • Required paid resources
  • Create resources
  • Delete the resources you created
  1. Tutorials
  2. Configuring network resources and interaction between them
  3. Configuring a network for Yandex Data Processing

Configuring a network for Yandex Data Processing

Written by
Yandex Cloud
Updated at July 16, 2026
View in Markdown
  • Getting started
    • Required paid resources
  • Create resources
  • Delete the resources you created

In this tutorial, you will learn how to create a Yandex Data Processing cluster and set up subnets and a NAT gateway.

Getting startedGetting started

Sign up for Yandex Cloud and create a billing account:

  1. Navigate to the management console and log in to Yandex Cloud or create a new account.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and it has the ACTIVE or TRIAL_ACTIVE status. If you do not have a billing account, create one and link a cloud to it.

If you have an active billing account, you can create or select a folder for your infrastructure on the cloud page.

Learn more about clouds and folders here.

Required paid resourcesRequired paid resources

  • Yandex Data Processing cluster: use of computing resources with a Yandex Data Processing markup, use of network drives, retrieval and storage of logs, amount of outgoing traffic (see Yandex Data Processing pricing).
  • Public IP addresses if public access is enabled for cluster hosts (see Yandex Virtual Private Cloud pricing).
  • NAT gateway: hourly use of the gateway and its outgoing traffic (see Virtual Private Cloud pricing).
  • Yandex Object Storage bucket: use of storage, data operations (see Object Storage pricing).

Create resourcesCreate resources

Manually
Terraform
  1. Create a network named data-proc-network with the Create subnets option disabled.

  2. In data-proc-network, create a subnet with the following settings:

    • Name: data-proc-subnet-a
    • Availability zone: ru-central1-a
    • CIDR: 192.168.1.0/24
  3. Create a NAT gateway and a route table named data-proc-route-table in data-proc-network. Associate the table with data-proc-subnet-a.

  4. In data-proc-network, create a security group named data-proc-security-group with the following rules:

    • One rule for incoming and another one for outgoing service traffic:

      • Port range: 0-65535
      • Protocol: Any
      • Source/Destination name: Security group
      • Security group: Current
    • Rule for outgoing HTTPS traffic:

      • Port range: 443
      • Protocol: TCP
      • Destination name: Address range
      • IPv4 CIDR: 0.0.0.0/0
    • Rule that allows access to NTP servers for time syncing:

      • Port range: 123
      • Protocol: UDP
      • Destination name: Address range
      • IPv4 CIDR: 0.0.0.0/0

    Note

    You can configure additional security group rules to connect to cluster hosts.

  5. Create a service account named data-proc-sa with the following roles:

    • dataproc.agent
    • dataproc.provisioner
    • storage.uploader
    • storage.viewer
  6. Create a Yandex Object Storage bucket with restricted access.

  7. Create a Yandex Data Processing cluster in any suitable configuration with the following settings:

    • Service account: data-proc-sa.
    • Bucket ID format: List.
    • Bucket name: Select the bucket you created earlier.
    • Network: data-proc-network.
    • Security groups: data-proc-security-group.
  1. If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

    To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.

  2. Get the authentication credentials and specify the Yandex Cloud provider installation source (see Configure your provider, Step 1).

  3. Download the cluster configuration file to the same working directory.

    This file describes:

    • Network.
    • Subnet.
    • NAT gateway and route table.
    • Security group.
    • Service account to work with cluster resources.
    • Service account for bucket management.
    • Static access key required to grant the service account permissions for the bucket.
    • Bucket to store job dependencies and results.
    • Yandex Data Processing cluster.

    Note

    You can configure additional security group rules to connect to cluster hosts.

  4. In the configuration file, specify all the relevant parameters.

  5. Run the terraform init command in the working directory with the configuration files. This command initializes the provider specified in the configuration files and enables you to use its resources and data sources.

  6. Make sure the Terraform configuration files are correct using this command:

    terraform validate
    

    Terraform will display any configuration errors detected in your files.

  7. Create the required infrastructure:

    1. Run this command to view the intended changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

All the resources you need will be created in the specified folder. You can check the new resources and their settings using the management console.

Delete the resources you createdDelete the resources you created

Some resources are not free of charge. Delete the resources you no longer need to avoid paying for them:

Manually
Terraform
  1. Delete the Yandex Data Processing cluster.
  2. If you reserved public static IP addresses, release and delete them.
  3. Delete the Object Storage bucket. Before deleting the bucket, delete all its objects.
  4. Delete the subnet.
  5. Delete the route table.
  6. Delete the NAT gateway.
  7. Delete the network.
  1. In the terminal window, go to the directory containing the infrastructure plan.

    Warning

    Make sure the directory has no Terraform manifests with the resources you want to keep. Terraform deletes all resources that were created using the manifests in the current directory.

  2. Delete resources:

    1. Run this command:

      terraform destroy
      
    2. Confirm deleting the resources and wait for the operation to complete.

    All the resources described in the Terraform manifests will be deleted.

Was the article helpful?

Previous
Implementing fault-tolerant scenarios for NAT VMs
Next
Network connection switching during Yandex Data Processing cluster recreation
© 2026 Direct Cursus Technology L.L.C.