You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Terraform Version
1.4.0
AzureRM Provider Version
3.47.0
Affected Resource(s)/Data Source(s)
azurerm_private_endpoint
Terraform Configuration Files
provider"azurerm" {
features {}
}
resource"azurerm_resource_group""first_redis_cache_rg" {
name="first_redis_cache_rg"location="westeurope"
}
resource"azurerm_resource_group""second_redis_cache_rg" {
name="second_redis_cache_rg"location="northeurope"
}
# NOTE: the Name used for Redis needs to be globally uniqueresource"azurerm_redis_cache""first" {
name="first-redis-cache"location=azurerm_resource_group.first_redis_cache_rg.locationresource_group_name=azurerm_resource_group.first_redis_cache_rg.namecapacity=1family="P"sku_name="Premium"enable_non_ssl_port=falseshard_count=3redis_configuration {
maxmemory_reserved=2maxmemory_delta=2maxmemory_policy="allkeys-lru"
}
}
resource"azurerm_redis_cache""second" {
name="second-redis-cache"location=azurerm_resource_group.second_redis_cache_rg.locationresource_group_name=azurerm_resource_group.second_redis_cache_rg.namecapacity=1family="P"sku_name="Premium"enable_non_ssl_port=falseshard_count=3redis_configuration {
maxmemory_reserved=2maxmemory_delta=2maxmemory_policy="allkeys-lru"
}
}
resource"azurerm_redis_linked_server""this" {
target_redis_cache_name=azurerm_redis_cache.first.nameresource_group_name=azurerm_resource_group.first_redis_cache_rg.namelinked_redis_cache_id=azurerm_redis_cache.second.idlinked_redis_cache_location=azurerm_resource_group.second_redis_cache_rg.locationserver_role="Secondary"depends_on=[azurerm_private_endpoint.this]
}
resource"azurerm_private_endpoint""this" {
name="first-redis-cache-private-endpoint"location=azurerm_resource_group.first_redis_cache_rg.locationresource_group_name=azurerm_resource_group.first_redis_cache_rg.namesubnet_id=var.private_endpoint_subnet_idprivate_service_connection {
name="first-redis-cache-private-endpoint"private_connection_resource_id=azurerm_redis_cache.first.idsubresource_names=["redisCache"]
is_manual_connection=false
}
private_dns_zone_group {
name="privatelink.documents.azure.com"private_dns_zone_ids=tolist([var.private_dns_zone_id])
}
tags=var.tags
}
variableprivate_endpoint_subnet_id {
type=stringdefault="/subscriptions/***/resourceGroups/***/providers/Microsoft.Network/virtualNetworks/***/subnets/***"description="The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint."
}
variableprivate_dns_zone_id {
type=stringdefault="/subscriptions/***/resourceGroups/***/providers/Microsoft.Network/privateDnsZones/privatelink.redis.cache.windows.net"description="Id of privatelink.documents.azure.com private dns zone"
}
variabletags {
type=mapdefault={
tag1 ="value1"
tag2 ="value3"
}
description="description"
}
Debug Output/Panic Output
dsurovets@*** terraform_bug_report $ terraform apply
azurerm_resource_group.first_redis_cache_rg: Refreshing state... [id=/subscriptions/***/resourceGroups/first_redis_cache_rg]
azurerm_resource_group.second_redis_cache_rg: Refreshing state... [id=/subscriptions/***/resourceGroups/second_redis_cache_rg]
azurerm_redis_cache.second: Refreshing state... [id=/subscriptions/***/resourceGroups/second_redis_cache_rg/providers/Microsoft.Cache/redis/second-redis-cache]
azurerm_redis_cache.first: Refreshing state... [id=/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Cache/redis/first-redis-cache]
azurerm_private_endpoint.this: Refreshing state... [id=/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Network/privateEndpoints/first-redis-cache-private-endpoint]
azurerm_redis_linked_server.this: Refreshing state... [id=/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Cache/redis/first-redis-cache/linkedServers/second-redis-cache]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# azurerm_private_endpoint.this will be updated in-place~ resource "azurerm_private_endpoint""this" {
id = "/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Network/privateEndpoints/first-redis-cache-private-endpoint"
name = "first-redis-cache-private-endpoint"~ tags = {
"tag1" = "value1"~"tag2" = "value2" ->"value3"
}
# (6 unchanged attributes hidden)# (2 unchanged blocks hidden)
}
# azurerm_redis_cache.first will be updated in-place~ resource "azurerm_redis_cache""first" {
id = "/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Cache/redis/first-redis-cache"
name = "first-redis-cache"~ public_network_access_enabled = false ->true
tags = {}
# (20 unchanged attributes hidden)~ redis_configuration {
~ maxmemory_delta = 642 -> 2
~ maxmemory_reserved = 642 -> 2
# (8 unchanged attributes hidden)
}
}
# azurerm_redis_cache.second will be updated in-place~ resource "azurerm_redis_cache""second" {
id = "/subscriptions/***/resourceGroups/second_redis_cache_rg/providers/Microsoft.Cache/redis/second-redis-cache"
name = "second-redis-cache"
tags = {}
# (21 unchanged attributes hidden)~ redis_configuration {
~ maxmemory_delta = 642 -> 2
~ maxmemory_reserved = 642 -> 2
# (8 unchanged attributes hidden)
}
}
Plan: 0 to add, 3 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
azurerm_redis_cache.first: Modifying... [id=/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Cache/redis/first-redis-cache]
azurerm_redis_cache.second: Modifying... [id=/subscriptions/***/resourceGroups/second_redis_cache_rg/providers/Microsoft.Cache/redis/second-redis-cache]
azurerm_redis_cache.second: Modifications complete after 4s [id=/subscriptions/***/resourceGroups/second_redis_cache_rg/providers/Microsoft.Cache/redis/second-redis-cache]
azurerm_redis_cache.first: Still modifying... [id=/subscriptions/***-...icrosoft.Cache/redis/first-redis-cache, 10s elapsed]
azurerm_redis_cache.first: Modifications complete after 19s [id=/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Cache/redis/first-redis-cache]
azurerm_private_endpoint.this: Modifying... [id=/subscriptions/***/resourceGroups/first_redis_cache_rg/providers/Microsoft.Network/privateEndpoints/first-redis-cache-private-endpoint]
╷
│ Error: updating Private Endpoint "first-redis-cache-private-endpoint" (Resource Group "first_redis_cache_rg"): network.PrivateEndpointsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Call to Microsoft.Cache/redis failed. Error message: This cache is geo replicated and cannot be the target of a private endpoint.\r\nRequestID=83e2bf92-e864-4ef3-b753-67efab282272" Details=[]
│
│ with azurerm_private_endpoint.this,
│ on main.tf line 61, in resource "azurerm_private_endpoint""this":
│ 61: resource "azurerm_private_endpoint""this" {
│
╵
Expected Behaviour
Tags on private endpoint should be updated.
Actual Behaviour
│ Error: updating Private Endpoint "first-redis-cache-private-endpoint" (Resource Group "first_redis_cache_rg"): network.PrivateEndpointsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Call to Microsoft.Cache/redis failed. Error message: This cache is geo replicated and cannot be the target of a private endpoint.\r\nRequestID=83e2bf92-e864-4ef3-b753-67efab282272" Details=[]
│
│ with azurerm_private_endpoint.this,
│ on main.tf line 61, in resource "azurerm_private_endpoint" "this":
│ 61: resource "azurerm_private_endpoint" "this" {
│
╵
Steps to Reproduce
Create "privatelink.documents.azure.com" private dns zone.
Specify following variables:
private_dns_zone_id
private_endpoint_subnet_id
Run "terraform apply"
Change values in tags variable
Run "terraform apply"
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
@xuzhang3 Yes, that's right, but I am finding the solution how to update private endpoint tags without removing the linked server.
I can update tags on private endpoint with azure cli or with ARM template, but I can't update with terraform.
Is there an existing issue for this?
Community Note
Terraform Version
1.4.0
AzureRM Provider Version
3.47.0
Affected Resource(s)/Data Source(s)
azurerm_private_endpoint
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Tags on private endpoint should be updated.
Actual Behaviour
│ Error: updating Private Endpoint "first-redis-cache-private-endpoint" (Resource Group "first_redis_cache_rg"): network.PrivateEndpointsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Call to Microsoft.Cache/redis failed. Error message: This cache is geo replicated and cannot be the target of a private endpoint.\r\nRequestID=83e2bf92-e864-4ef3-b753-67efab282272" Details=[]
│
│ with azurerm_private_endpoint.this,
│ on main.tf line 61, in resource "azurerm_private_endpoint" "this":
│ 61: resource "azurerm_private_endpoint" "this" {
│
╵
Steps to Reproduce
Create "privatelink.documents.azure.com" private dns zone.
Specify following variables:
private_dns_zone_id
private_endpoint_subnet_id
Run "terraform apply"
Change values in tags variable
Run "terraform apply"
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: