Home›Resources›Tools Center›Developer Tools›Terraform Provider

XcellDev|Terraform Provider

Your XcellCloud infrastructure, written as code — plan it, review it, apply it.

The official OpenStack provider, on XcellHost's Mumbai cloud.

Official OpenStack provider
Application-credential auth
VMs, networks, volumes, LBs
Remote state on XcellHost S3
Plan on every pull request
Data stays in the Mumbai region
✦Ask AI About Terraform on XcellCloud
Powered by
HashiCorp Terraform
Free with XcellCloud · pay only for resources
main.tfHCL · 9 resources
XcellCloud APIKeystone v3 · mumbai-1
Remote stateS3 bucket · versioned
CI pipelineplan on pull request
terraform · web-prodLIVE
XCELLCLOUD · MUMBAI-1 · init
0 / 9RESOURCES
3.4.xPROVIDER
mumbai-1REGION
unlockedSTATE · S3
PLAN0%
APPLY0%
LIVE APPLY ACTIVITYSAMPLE RUN
    ISO 27001 & 20000-1 certifiedMicrosoft Gold Partner10,000+ customersSince 199999.95% uptime SLA24×7 NOC + SOC
    Overview

    Terraform lets you describe servers, networks, firewalls and load balancers in plain text files, then creates them for you — the same way every time. Because XcellCloud is built on OpenStack, you don't need a special plug-in: the official, open-source terraform-provider-openstack talks to XcellCloud's standard APIs (Keystone, Nova, Neutron, Cinder, Glance and Octavia) in the Mumbai region. You write .tf files, run terraform plan to see exactly what will change, and terraform apply to make it so. State can live in XcellHost's S3-compatible object storage, your pipeline can plan on every pull request, and an application credential keeps the access narrow. The provider and the APIs are free with your XcellCloud account — you pay only for what you build.

    Your exact endpoints are shown in the XcellCloud console → API Access. Endpoints, region and names on this page are examples.

    Your cloud, declared in code — reviewed like code

    For developers, DevOps teams and IT partners building on XcellCloud in India.

    Plan · Apply · Repeat
    Free with XcellCloudData in Mumbai
    Works with Terraform CLI OpenTofu GitHub Actions GitLab CI Jenkins VS Code
    .tf filesyour code in Git
    terraform plan
    OpenStack providerterraform-provider-openstack
    HTTPS · token
    Keystone v3application credential
    service catalog
    XcellCloud APIsNova · Neutron · Cinder · Octavia
    Access for every team size

    What you get with XcellCloud

    No licence and no extra charge for the provider or the APIs. Pick how you run Terraform — the rows show what that looks like on XcellCloud.

    Application credentialsPer project, per pipeline · expiry & roles you chooseFree
    S3-compatible state bucketBilled as normal object storage · versioning onAs used
    Cloud engineer reviewModules, network layout, security groups · on requestTalk to us

    No charge for the provider, the APIs or API access. Resources Terraform creates (VMs, volumes, floating IPs, load balancers, storage) are billed at your XcellCloud rates. Endpoints, region and quotas shown are placeholders — your exact values are in the XcellCloud console → API Access; project quotas are set per project.

    Why to choose XcellCloud for Terraform

    Official provider, no lock-in

    Standard OpenStack APIs and the community provider — the same code runs on any OpenStack cloud.

    Mumbai region

    VMs, volumes and state stay in XcellHost's Indian data centres, close to your users.

    Application credentials

    Give each pipeline its own expiring, project-scoped key instead of a person's password.

    State on S3-compatible storage

    Keep terraform.tfstate in a private, versioned bucket on the same cloud.

    Full network control

    Private networks, routers, security groups and floating IPs — all declared, all reviewable.

    Octavia load balancers

    Listeners, pools, members and health monitors from the same .tf files.

    24×7 NOC from Mumbai

    Phone, WhatsApp and email support when an apply fails at 2 a.m.

    INR billing with GST

    Resources on one rupee invoice with GST input credit — no dollar card payments.

    Why teams adopt TerraformSee changes before they happenSame result every timeCode review for infrastructureClone dev into stagingDetect driftClean teardownSelf-documenting

    Console Clicks VS Terraform on XcellCloud

    What changes when your cloud is described in code instead of built by hand.

    • ✕Steps live in someone's memory
    • ✕Staging never quite matches production
    • ✕No preview before a change
    • ✕Firewall rules added and forgotten
    • ✕Hard to rebuild after a mistake
    • ✕Changes made without review
    • ✕Orphaned volumes and IPs keep billing
    • ✕Shared admin passwords in scripts
    • ✓Every resource written down in Git
    • ✓One module, sized per environment
    • ✓terraform plan shows the exact diff
    • ✓Security groups reviewed in pull requests
    • ✓Rebuild the stack with one apply
    • ✓Approve the plan, then apply
    • ✓terraform destroy removes everything it made
    • ✓Expiring application credentials per pipeline

    Terraform on XcellCloud In 5 Easy Steps

    From a new account to a running stack — usually in under an hour.

    01Create your XcellCloud accountconsole
    02Create an application credentialrole: member
    03Write the provider blockversions.tf
    04Run terraform planreview the diff
    05Run terraform applystack is live

    Tools That Work With It

    Terraform CLIOpenTofuGitHub ActionsGitLab CIJenkinsAtlantisTerragruntVS CodetflintCheckovOpenStack CLIAWS CLI (S3)

    Generic tool names only; any tool that drives the OpenStack provider or OpenStack APIs works the same way.

    Included with XcellCloud API access
    Keystone v3 identity
    Nova compute
    Neutron networking
    Cinder block volumes
    Octavia load balancers
    S3-compatible storage
    Provider setup

    Point the provider at XcellCloud — three ways to authenticate.

    All three use an application credential. Pick the one that fits where Terraform runs; the resources you write afterwards are identical.

    versions.tf
    terraform {
      required_version = ">= 1.6.3"
    
      required_providers {
        openstack = {
          source  = "terraform-provider-openstack/openstack"
          version = "~> 3.4"
        }
      }
    }
    
    # Placeholder endpoint: copy yours from XcellCloud console → API Access
    provider "openstack" {
      auth_url                      = "https://api.xcellhost.cloud:5000/v3"
      region                        = "mumbai-1"
      application_credential_id     = var.app_cred_id
      application_credential_secret = var.app_cred_secret
    }
    
    variable "app_cred_id" {
      type      = string
      sensitive = true
    }
    
    variable "app_cred_secret" {
      type      = string
      sensitive = true
    }
    # ~/.config/openstack/clouds.yaml
    clouds:
      xcellhost:
        auth_type: v3applicationcredential
        auth:
          auth_url: https://api.xcellhost.cloud:5000/v3
          application_credential_id: "<APP_CRED_ID>"
          application_credential_secret: "<APP_CRED_SECRET>"
        region_name: mumbai-1
        interface: public
        identity_api_version: 3
    # provider.tf — reads the "xcellhost" entry from clouds.yaml
    provider "openstack" {
      cloud = "xcellhost"
    }
    # The provider reads standard OS_* variables when its block is empty:
    #   provider "openstack" {}
    export OS_AUTH_TYPE=v3applicationcredential
    export OS_AUTH_URL=https://api.xcellhost.cloud:5000/v3
    export OS_REGION_NAME=mumbai-1
    export OS_INTERFACE=public
    export OS_IDENTITY_API_VERSION=3
    export OS_APPLICATION_CREDENTIAL_ID="<APP_CRED_ID>"
    export OS_APPLICATION_CREDENTIAL_SECRET="<APP_CRED_SECRET>"
    
    terraform init
    terraform plan
    Terraform config builder

    Choose your stack. Get working main.tf and variables.tf.

    Pick VM count and size, network, firewall rules and a load balancer. The files update as you type and download straight from your browser — nothing is sent anywhere.

    VMs 2 VMs
    Firewall — inbound
    Use a CIDR like 203.0.113.10/32
    Authentication
    State
    0 to add0 data sources0 filesHCL generated
    main.tf

    Generated for terraform-provider-openstack 3.x and Terraform ≥ 1.6.3. Flavor, image and external-network names are examples — check yours with openstack flavor list, openstack image list and openstack network list --external. The key pair must already exist. .gitignore may download as gitignore.txt — rename it.

    Plan → apply, animated

    Watch the dependency graph build itself.

    Terraform works out the order from references in your code: the network before the subnet, the subnet before the ports, the ports before the VMs. This runs the stack from the builder above — change it there and run again.

    0 add0 change0 destroy
    plannedcreatingcreateddestroying
    terminalready
      "terraform plan" diff viewer

      Read a plan like a reviewer — before you type yes.

      Six everyday changes on XcellCloud and the plan output each one produces. The symbols tell you whether Terraform will create, update in place, replace or destroy.

      Code changemain.tf
      terraform plan+ create~ update-/+ replace- destroy
      Resource reference

      The resources you'll use most — copy, paste, adjust.

      Each snippet uses current 3.x resource names. Swap the example names for the ones in your project.

      Networkingnetwork_v2 · subnet_v2 · router_v2 · router_interface_v2
      Security groupssecgroup_v2 · secgroup_rule_v2
      Compute & floating IPscompute_instance_v2 · port_v2 · floatingip_v2 · floatingip_associate_v2
      Block storageblockstorage_volume_v3 · compute_volume_attach_v2
      Load balancinglb_loadbalancer_v2 · listener · pool · member · monitor
      Data sourcesimages_image_v2 · compute_flavor_v2 · networking_network_v2
      network.tf
      resource "openstack_networking_network_v2" "app" {
        name           = "app-net"
        admin_state_up = true
      }
      
      resource "openstack_networking_subnet_v2" "app" {
        name            = "app-subnet"
        network_id      = openstack_networking_network_v2.app.id
        cidr            = "10.10.0.0/24"
        ip_version      = 4
        dns_nameservers = ["1.1.1.1", "8.8.8.8"]
      }
      
      data "openstack_networking_network_v2" "external" {
        name     = "public" # placeholder: your external network name
        external = true
      }
      
      resource "openstack_networking_router_v2" "app" {
        name                = "app-router"
        admin_state_up      = true
        external_network_id = data.openstack_networking_network_v2.external.id
      }
      
      resource "openstack_networking_router_interface_v2" "app" {
        router_id = openstack_networking_router_v2.app.id
        subnet_id = openstack_networking_subnet_v2.app.id
      }
      resource "openstack_networking_secgroup_v2" "web" {
        name        = "web-sg"
        description = "HTTPS from anywhere, SSH from the office only"
      }
      
      resource "openstack_networking_secgroup_rule_v2" "https" {
        direction         = "ingress"
        ethertype         = "IPv4"
        protocol          = "tcp"
        port_range_min    = 443
        port_range_max    = 443
        remote_ip_prefix  = "0.0.0.0/0"
        security_group_id = openstack_networking_secgroup_v2.web.id
      }
      
      resource "openstack_networking_secgroup_rule_v2" "ssh" {
        direction         = "ingress"
        ethertype         = "IPv4"
        protocol          = "tcp"
        port_range_min    = 22
        port_range_max    = 22
        remote_ip_prefix  = "203.0.113.10/32" # your office IP
        security_group_id = openstack_networking_secgroup_v2.web.id
      }
      data "openstack_images_image_v2" "ubuntu" {
        name        = "Ubuntu 24.04" # example name: run `openstack image list`
        most_recent = true
      }
      
      data "openstack_compute_flavor_v2" "medium" {
        name = "xc.g1.medium" # example name: run `openstack flavor list`
      }
      
      resource "openstack_networking_port_v2" "web" {
        name               = "web-1-port"
        network_id         = openstack_networking_network_v2.app.id
        security_group_ids = [openstack_networking_secgroup_v2.web.id]
      
        fixed_ip {
          subnet_id = openstack_networking_subnet_v2.app.id
        }
      }
      
      resource "openstack_compute_instance_v2" "web" {
        name      = "web-1"
        image_id  = data.openstack_images_image_v2.ubuntu.id
        flavor_id = data.openstack_compute_flavor_v2.medium.id
        key_pair  = "deploy-key"
      
        network {
          port = openstack_networking_port_v2.web.id
        }
      }
      
      resource "openstack_networking_floatingip_v2" "web" {
        pool = "public"
      }
      
      resource "openstack_networking_floatingip_associate_v2" "web" {
        floating_ip = openstack_networking_floatingip_v2.web.address
        port_id     = openstack_networking_port_v2.web.id
      }
      resource "openstack_blockstorage_volume_v3" "data" {
        name        = "web-1-data"
        size        = 100 # GB
        description = "Tally / database data disk"
      }
      
      resource "openstack_compute_volume_attach_v2" "data" {
        instance_id = openstack_compute_instance_v2.web.id
        volume_id   = openstack_blockstorage_volume_v3.data.id
      }
      resource "openstack_lb_loadbalancer_v2" "web" {
        name          = "web-lb"
        vip_subnet_id = openstack_networking_subnet_v2.app.id
      }
      
      resource "openstack_lb_listener_v2" "http" {
        name            = "web-http"
        protocol        = "HTTP"
        protocol_port   = 80
        loadbalancer_id = openstack_lb_loadbalancer_v2.web.id
      }
      
      resource "openstack_lb_pool_v2" "web" {
        name        = "web-pool"
        protocol    = "HTTP"
        lb_method   = "ROUND_ROBIN"
        listener_id = openstack_lb_listener_v2.http.id
      }
      
      resource "openstack_lb_member_v2" "web" {
        pool_id       = openstack_lb_pool_v2.web.id
        address       = openstack_compute_instance_v2.web.access_ip_v4
        protocol_port = 80
        subnet_id     = openstack_networking_subnet_v2.app.id
      }
      
      resource "openstack_lb_monitor_v2" "http" {
        pool_id     = openstack_lb_pool_v2.web.id
        type        = "HTTP"
        delay       = 10
        timeout     = 5
        max_retries = 3
        url_path    = "/"
      }
      # Look things up instead of hard-coding IDs
      data "openstack_images_image_v2" "rocky" {
        name        = "Rocky Linux 9" # example image name
        most_recent = true
      }
      
      data "openstack_compute_flavor_v2" "by_size" {
        vcpus = 4
        ram   = 8192
      }
      
      data "openstack_networking_network_v2" "external" {
        name     = "public" # example external network name
        external = true
      }
      
      output "image_id" {
        value = data.openstack_images_image_v2.rocky.id
      }
      State, modules & everyday commands

      Keep state safe, reuse modules, catch drift early.

      State maps your code to real resource IDs — and can contain sensitive values. Keep it in a private, versioned bucket, not on a laptop or in Git.

      backend.tf
      terraform {
        # EXAMPLE — S3-compatible remote state on XcellHost object storage.
        # Backend blocks cannot use variables; credentials come from
        # AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (EC2-style credentials).
        backend "s3" {
          bucket = "acme-tfstate"
          key    = "web/prod/terraform.tfstate"
          region = "mumbai-1" # any string; region validation is skipped
      
          endpoints = {
            s3 = "https://s3.mumbai.xcellhost.cloud"
          }
      
          use_path_style              = true
          skip_credentials_validation = true
          skip_region_validation      = true
          skip_requesting_account_id  = true
          skip_metadata_api_check     = true
          skip_s3_checksum            = true
      
          # Terraform >= 1.10: S3-native lock file, where the endpoint
          # supports conditional writes — confirm before enabling.
          # use_lockfile = true
        }
      }
      # One-time: create a private, versioned bucket for state
      aws s3api create-bucket --bucket acme-tfstate \
        --endpoint-url https://s3.mumbai.xcellhost.cloud
      aws s3api put-bucket-versioning --bucket acme-tfstate \
        --versioning-configuration Status=Enabled \
        --endpoint-url https://s3.mumbai.xcellhost.cloud
      
      # Point Terraform at it (moves any local state across)
      export AWS_ACCESS_KEY_ID="<EC2_ACCESS_KEY>"
      export AWS_SECRET_ACCESS_KEY="<EC2_SECRET_KEY>"
      terraform init -migrate-state

      Example only. Endpoint and bucket are placeholders; confirm S3 feature support for your account.

      environments/prod/main.tf
      # environments/prod/main.tf — the same module, sized per environment
      module "web" {
        source = "../../modules/web-stack"
      
        name           = "prod-web"
        instance_count = 3
        flavor_name    = "xc.g1.large" # example flavor
        network_cidr   = "10.20.0.0/24"
        admin_cidr     = "203.0.113.10/32"
        enable_lb      = true
      }
      
      output "lb_ip" {
        value = module.web.lb_public_ip
      }
      CI/CD

      Plan on every pull request, apply on merge.

      Store the application credential and the state-bucket key as masked pipeline secrets. The pipeline formats, validates and plans; a human approves; the main branch applies.

      .github/workflows/terraform.yml
      # .github/workflows/terraform.yml
      name: terraform
      on:
        pull_request:
          paths: ["infra/**"]
        push:
          branches: [main]
          paths: ["infra/**"]
      
      permissions:
        contents: read
        pull-requests: write
      
      jobs:
        plan-apply:
          runs-on: ubuntu-latest
          defaults:
            run:
              working-directory: infra
          env:
            OS_AUTH_TYPE: v3applicationcredential
            OS_AUTH_URL: https://api.xcellhost.cloud:5000/v3
            OS_REGION_NAME: mumbai-1
            OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
            OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
            AWS_ACCESS_KEY_ID: ${{ secrets.STATE_ACCESS_KEY }}
            AWS_SECRET_ACCESS_KEY: ${{ secrets.STATE_SECRET_KEY }}
          steps:
            - uses: actions/checkout@v4
            - uses: hashicorp/setup-terraform@v3
              with:
                terraform_version: 1.9.8
            - run: terraform fmt -check -recursive
            - run: terraform init -input=false
            - run: terraform validate
            - run: terraform plan -input=false -out=tfplan
            - if: github.ref == 'refs/heads/main' && github.event_name == 'push'
              run: terraform apply -input=false tfplan
      # .gitlab-ci.yml — set OS_* and AWS_* as masked, protected CI/CD variables
      image:
        name: hashicorp/terraform:1.9.8
        entrypoint: [""]
      
      variables:
        TF_IN_AUTOMATION: "true"
        OS_AUTH_TYPE: v3applicationcredential
        OS_AUTH_URL: https://api.xcellhost.cloud:5000/v3
        OS_REGION_NAME: mumbai-1
      
      stages: [validate, plan, apply]
      
      validate:
        stage: validate
        script:
          - cd infra
          - terraform fmt -check -recursive
          - terraform init -input=false
          - terraform validate
      
      plan:
        stage: plan
        script:
          - cd infra
          - terraform init -input=false
          - terraform plan -input=false -out=tfplan
        artifacts:
          paths: [infra/tfplan]
          expire_in: 1 week
      
      apply:
        stage: apply
        script:
          - cd infra
          - terraform init -input=false
          - terraform apply -input=false tfplan
        rules:
          - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
            when: manual
      Security & India

      Least privilege by default — and your data stays in Mumbai.

      Infrastructure code holds the keys to your cloud. These are the habits we recommend to every XcellCloud customer.

      Least privilege

      Application credentials with only the member role (or reader for plan-only jobs), scoped to one project.

      Rotate keys

      Set an expiry, create the new credential, update the secret, then delete the old one.

      Never commit secrets

      .gitignore state, plans, *.tfvars and clouds.yaml; mark variables sensitive.

      MFA on the console

      People log in with MFA; pipelines use credentials. No shared admin passwords.

      IP allow-lists

      SSH and RDP rules limited to your office or VPN CIDR — reviewed in every pull request.

      Protect state

      State can hold IPs and secrets. Private, versioned bucket; least-privilege S3 keys.

      Data in India

      Resources in mumbai-1 stay in Indian data centres — helpful for DPDP Act obligations.

      Leaked a key?

      Delete the credential at once, check the project's activity, then issue a new one. Leak steps →

      .gitignore
      # .gitignore — never commit state, plans or secrets
      .terraform/
      *.tfstate
      *.tfstate.*
      *.tfplan
      tfplan
      crash.log
      *.tfvars
      !example.tfvars
      clouds.yaml
      secure.yaml
      *-openrc.sh
      # DO commit .terraform.lock.hcl (pins provider checksums)

      Frequently Asked Questions

      No — and you don't need one. XcellCloud runs on OpenStack, so you use the official, open-source terraform-provider-openstack/openstack provider from the Terraform Registry. Point it at XcellCloud's Keystone endpoint and the mumbai-1 region and every standard OpenStack resource works.

      No. The provider, the OpenStack APIs and API access are free with your XcellCloud account. You pay only for the resources Terraform creates — VMs, volumes, floating IPs, load balancers and storage — at your normal XcellCloud rates.

      Terraform 1.6.3 or later (or OpenTofu 1.6+) with provider version 3.x. Version 3.0 removed several old resources such as openstack_compute_floatingip_associate_v2 and openstack_blockstorage_volume_v2; use openstack_networking_floatingip_associate_v2 and openstack_blockstorage_volume_v3 instead.

      Use an application credential with the member role, scoped to one project, ideally one per pipeline or environment. Pass it through clouds.yaml (cloud = "xcellhost"), environment variables (OS_APPLICATION_CREDENTIAL_ID / _SECRET) or sensitive variables — never hard-code it in .tf files. See OpenStack Credentials.

      In the XcellCloud console under API Access. The values on this page — https://api.xcellhost.cloud:5000/v3, mumbai-1, public and the flavor and image names — are examples. You can also run openstack catalog list, openstack network list --external, openstack flavor list and openstack image list.

      Yes, with Terraform's s3 backend pointed at the S3-compatible endpoint, path-style addressing and the skip_* checks turned on, as in the example above. Use a private bucket with versioning on, and EC2-style credentials for access. Confirm with us whether S3 conditional writes are enabled before you rely on use_lockfile.

      That is drift. The next terraform plan refreshes state, reports the objects that changed outside Terraform and proposes changes to bring them back in line with your code. Run terraform plan -refresh-only on a schedule to spot drift early, then either fix the code or let Terraform revert the change.

      Yes. Write the resource block, then add an import block (Terraform 1.5+) or run terraform import with the resource's OpenStack ID. Run terraform plan until it shows no changes, so the code matches what is running.

      Changing flavor_id or flavor_name resizes the instance in place (it reboots). Changing the image forces a replacement, which destroys and recreates the VM, so keep data on a separate Cinder volume and read the plan before you apply.

      Yes. Octavia load balancers use the openstack_lb_*_v2 resources (load balancer, listener, pool, member, monitor). Security groups use openstack_networking_secgroup_v2 and openstack_networking_secgroup_rule_v2. Perimeter appliances on Virtual Firewalls are configured with their own tools.

      Resources you create in the mumbai-1 region, and state you keep in the Mumbai object store, stay in XcellHost's Indian data centres. That helps with DPDP Act obligations, but you still decide what personal data goes into the systems you build.

      Yes. A cloud engineer can review your modules, network layout, security group rules and credential set-up, or help you import an existing environment. Use "Talk to us" and we will call you back.