Code Monkey home page Code Monkey logo

acre-terraform's Introduction

Contributors Forks Stargazers Issues MIT License

ACRE-TERRAFORM

This is a template to get started with the 'azurerm_redis_enterprise_cluster' resource available in the 'azurerm' provider with Terraform.

  • Tenant
    • Subscription
      • Resource Group
        • Storage Account
          • Storage Container
        • VNET
          • Subnet
        • Redis Enterprise Cluster
        • Private Link connecting subnet and cluster

The RediSearch module will be included. A private link, vnet and subnet connect to the instance. The public endpoint will be disabled.

Getting Started

Prerequisites

  1. Terraform CLI
  2. Azure CLI

Step 1. Getting Started

Login to Azure using the Azure CLI

az login

Login with a Service Principal will also work

Login using an Azure Service Principal

az login --service-principal --username APP_ID --tenant TENANT_ID --password [password || /path/to/cert]

Step 2: Clone the repository

git clone https://github.com/redis-developer/acre-terraform

Step 3: Initialize the repository

cd acre-terraform
terraform init

The output should include: Terraform has been successfully initialized

Step 4: Optionally, modify the variables

The default variables deploy the smallest 'E10' instance into the 'East US' region. Changes can be made by updating the variables.tf file.

Step 5: Verify the plan

The 'plan' output will show you everything being created by the template.

terraform plan

The plan step does not make any changes in Azure

Step 6: Apply the plan

When the plan looks good, 'apply' the template.

terraform apply

Step 7: Connect using generated output

Connecting to this instance will have to be done from within the subnet that was created. Only clients within the subnet can access the instance via the private link. The access key is sensitive, so viewing the outputs must be requested specifically.

terraform output redisgeek_config

Example output:

{
"hostname" = "redis-developer-8jy4.eastus.redisenterprise.cache.azure.net"
"access_key" = "DQYABC3uRMyDguE1236Xkvv3TprUcqBWTRkfgOPjs82Y="
"port" = "10000"
}

Step 8: Optionally, Cleanup

Remove the resources that were created.

terraform destroy

About The Project

The cluster, deployed across 3-AZs, will have a 99.99 SLA that is financially backed by Azure. There are no "preview" features or modules included in this template. Deployment using a private endpoint is typical for production workloads. The storage account and storage container are there for exporting/importing RDB files.

See Also

Built With

Contributing

Pull-requests are welcomed!

License

Distributed under the MIT License. See LICENSE for more information.

acre-terraform's People

Contributors

dashaun avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

acre-terraform's Issues

Persistence

How would I add persistence properties? We have an ARM template in Azure for creating the Redis Enterprise cluster and database. I have pasted the database portion below:

{ "type": "Microsoft.Cache/redisEnterprise/databases", "apiVersion": "2022-01-01", "name": "[concat(parameters('redisEnterprise_eus2cusdev02rc_name'), '/default')]", "dependsOn": [ "[resourceId('Microsoft.Cache/redisEnterprise', parameters('redisEnterprise_eus2cusdev02rc_name'))]" ], "properties": { "clientProtocol": "Encrypted", "port": 10000, "clusteringPolicy": "OSSCluster", "evictionPolicy": "NoEviction", "modules": [ { "name": "RedisTimeSeries" }, { "name": "RedisBloom" }, { "name": "RediSearch" } ], "persistence": { "aofEnabled": true, "rdbEnabled": false, "aofFrequency": "1s", "rdbFrequency": "1h" } } },
This looks good but no persistence options?
`
resource "azurerm_redis_enterprise_database" "redisdatabase" {
name = "default"
resource_group_name = var.resource_group_name

cluster_id = azurerm_redis_enterprise_cluster.rediscluster.id
client_protocol = "Encrypted"
port = 10000
clustering_policy = "OSSCluster"
eviction_policy = "NoEviction"

module {
name = "RedisTimeSeries, RedisBloom, RedisSearch"
}
}
`

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.