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 publicNetworkAccess property on resource azurerm_redis_cache #9307

Closed
robin-sf opened this issue Nov 13, 2020 · 3 comments
Closed

Comments

@robin-sf
Copy link

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

This optional property allows setting the Redis server to block public connections and only allow connections over private links.

As per https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-private-link the non-TF way to do it is to issue the following patch request to the resource:

PATCH  https://management.azure.com/subscriptions/{subscription}/resourceGroups/{resourcegroup}/providers/Microsoft.Cache/Redis/{cache}?api-version=2020-06-01
{    "properties": {
       "publicNetworkAccess":"Disabled"
   }
}

This feature was in public preview at the time of writing

New or Affected Resource(s)

  • azurerm_redis_cache

Potential Terraform Configuration

resource "azurerm_redis_cache" "example" {
  name                  = "example-cache"
  location              = azurerm_resource_group.example.location
  resource_group_name   = azurerm_resource_group.example.name
  capacity              = 2
  family                = "C"
  sku_name              = "Standard"
  enable_non_ssl_port   = false
  minimum_tls_version   = "1.2"
  public_network_access = false
  redis_configuration {
  }
}
katbyte pushed a commit that referenced this issue Feb 2, 2021
To address issue #9307. Marking this as [WIP] for I'm still running regression acctest under Redis. Once things could pass I would remove the [WIP]. Below paste the run pass result for the newly added test case.

=== RUN   TestAccRedisCache_PublicNetworkAccessDisabledEnabled
=== PAUSE TestAccRedisCache_PublicNetworkAccessDisabledEnabled
=== CONT  TestAccRedisCache_PublicNetworkAccessDisabledEnabled
--- PASS: TestAccRedisCache_PublicNetworkAccessDisabledEnabled (1965.03s)
PASS

Process finished with exit code 0
@katbyte katbyte added this to the v2.46.0 milestone Feb 2, 2021
@tombuildsstuff
Copy link
Contributor

Fixed via #10410

@ghost
Copy link

ghost commented Feb 5, 2021

This has been released in version 2.46.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.46.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 6, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants