Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for getting access keys from redisenterprise resources #11691

Closed
dashaun opened this issue May 13, 2021 · 2 comments · Fixed by #11734
Closed

Support for getting access keys from redisenterprise resources #11691

dashaun opened this issue May 13, 2021 · 2 comments · Fixed by #11734

Comments

@dashaun
Copy link

dashaun commented May 13, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

When developing automation pipelines (CI/CD) we would like to be able to deliver the credentials (access keys) to the rest of the integrated apps and services in our deployment.

The REST API provides support for this, and the other tiers of Azure Cache for Redis also support this in the Terraform provider.

Azure Cache for Redis - RedisEnterprise API

New or Affected Resource(s)

  • azurerm_redis_enterprise_database

Potential Terraform Configuration

#No changes needed in resource creation
resource "azurerm_redis_enterprise_database" "redisgeek" {
  name = "default"
  resource_group_name = azurerm_resource_group.redisgeek.name
  cluster_id = azurerm_redis_enterprise_cluster.redisgeek.id
  clustering_policy = var.azure_redis_enterprise_database_clustering_policy
  module {
    name = "RediSearch"
  }
}

## Expect to have the keys available in the outputs
data "azurerm_redis_enterprise_database" "redisgeek" {
  name         = "default"
  cluster_id = azurerm_redis_enterprise_cluster.redisgeek.id
  resource_group_name = azurerm_resource_group.redisgeek.name
}

output "instance_primary_key" {
  value       = data.azurerm_redis_enterprise_database.redisgeek.primary_access_key
  sensitive   = true
  description = "The Default DB primary key."
}
output "instance_secondary_key" {
  value       = azurerm_redis_enterprise_database.redisgeek.secondary_access_key
  sensitive   = true
  description = "The Default DB secondary key."
}

References

  • #0000
@WodansSon WodansSon self-assigned this May 16, 2021
@WodansSon WodansSon added this to the v2.60.0 milestone May 17, 2021
WodansSon added a commit that referenced this issue May 17, 2021
* Add redis enterprise database datasource

* Update documentation

* Add datasource test case
@ghost
Copy link

ghost commented May 21, 2021

This has been released in version 2.60.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.60.0"
}
# ... other configuration ...

favoretti pushed a commit to gro1m/terraform-provider-azurerm that referenced this issue May 26, 2021
* Add redis enterprise database datasource

* Update documentation

* Add datasource test case
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.