-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_container_app_environment
: fix infrastructure_resource_group_name
behavior with workload_profile
set to Consumption
#27502
base: main
Are you sure you want to change the base?
Conversation
…name behavior with consumption workload profile
workload_profile_type = "Consumption" | ||
} | ||
|
||
zone_redundancy_enabled = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When here the intention is to test the configuration with infrastructure_subnet_id and workload_profile only I think zone_redundancy_enabled
should be not be part of this test resource as it may have other implications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
@@ -103,13 +103,9 @@ func (r ContainerAppEnvironmentResource) Arguments() map[string]*pluginsdk.Schem | |||
RequiredWith: []string{"workload_profile"}, | |||
ValidateFunc: resourcegroups.ValidateName, | |||
DiffSuppressOnRefresh: true, | |||
DiffSuppressFunc: func(k, oldValue, newValue string, d *pluginsdk.ResourceData) bool { // If this is omitted, and there is a non-consumption profile, then the service generates a value for the required manage resource group. | |||
DiffSuppressFunc: func(k, oldValue, newValue string, d *pluginsdk.ResourceData) bool { // If this is omitted, then the service generates a value for the required manage resource group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DiffSuppressFunc: func(k, oldValue, newValue string, d *pluginsdk.ResourceData) bool { // If this is omitted, then the service generates a value for the required manage resource group. | |
DiffSuppressFunc: func(k, oldValue, newValue string, d *pluginsdk.ResourceData) bool { // If this is omitted and workload_profile is set, then the service generates a value for the required manage resource group. |
Maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, will add this line.
return true | ||
} | ||
} | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
Community Note
Description
infrastructure_resource_group_name
will be generated by the service even withworkload_profile
set toConsumption
, this will cause unexpected changes in the state file.PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_container_app_environment
: fixinfrastructure_resource_group_name
behavior withworkload_profile
set toConsumption
[azurerm_container_app_environment with infrastructure_subnet_id set is not idempotent #27481]This is a (please select all that apply):
Related Issue(s)
Fixes #27481
Note
If this PR changes meaningfully during the course of review please update the title and description as required.