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

Terraform Container App Data Source missing property "ingress.client_certificate_mode" #28800

Closed
1 task done
rlachic opened this issue Feb 18, 2025 · 2 comments · Fixed by #28793
Closed
1 task done

Comments

@rlachic
Copy link

rlachic commented Feb 18, 2025

Is there an existing issue for this?

  • I have searched the existing issues

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

There is a mismatch configuration between resource data and data source.

By default, Terraform Azure provider version 4.19 is adding in the ingress block, the client_certificate_mode property.

However, after an apply, if you try to read the container app as data source, fails, because cannot map a missing property:

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: setting "ingress": Invalid address to set: []string{"ingress", "0", "client_certificate_mode"}
│ 
│   with data.azurerm_container_app.container_app_backend,
│   on main.tf line 1, in data "azurerm_container_app" "container_app_backend":
│    1: data "azurerm_container_app" "container_app_backend" {
│ 
│ setting "ingress": Invalid address to set: []string{"ingress", "0", "client_certificate_mode"}
```

This is my actual configuration:


```
data "azurerm_container_app" "container_app_backend" {
  name                = "${var.alias}-app-backend-${local.environment}"
  resource_group_name = local.resource_group_name

 provider = azurerm
}
```


### Terraform Version

1.10.15

### AzureRM Provider Version

4.19

### Affected Resource(s)/Data Source(s)

data azurerm_container_app

### Terraform Configuration Files

```hcl
data "azurerm_container_app" "container_app_backend" {
  name                = "${var.alias}-app-backend-${local.environment}"
  resource_group_name = local.resource_group_name

 provider = azurerm
}
```

### Debug Output/Panic Output

```shell
data.azurerm_container_app.container_app_backend: Reading...

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: setting "ingress": Invalid address to set: []string{"ingress", "0", "client_certificate_mode"}
│ 
│   with data.azurerm_container_app.container_app_backend,
│   on main.tf line 1, in data "azurerm_container_app" "container_app_backend":
│    1: data "azurerm_container_app" "container_app_backend" {
│ 
│ setting "ingress": Invalid address to set: []string{"ingress", "0", "client_certificate_mode"}
╵
```

### Expected Behaviour

_No response_

### Actual Behaviour

_No response_

### Steps to Reproduce

_No response_

### Important Factoids

_No response_

### References

_No response_
@jiaweitao001
Copy link
Contributor

#28793

@rlachic
Copy link
Author

rlachic commented Feb 20, 2025

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants