diff --git a/internal/services/containers/container_registry_task_resource.go b/internal/services/containers/container_registry_task_resource.go index fc6474b75cac..3c56e416e673 100644 --- a/internal/services/containers/container_registry_task_resource.go +++ b/internal/services/containers/container_registry_task_resource.go @@ -574,16 +574,19 @@ func (r ContainerRegistryTaskResource) Arguments() map[string]*pluginsdk.Schema Elem: &pluginsdk.Resource{ Schema: map[string]*schema.Schema{ "cpu": { - Type: pluginsdk.TypeInt, - Required: true, + Type: pluginsdk.TypeInt, + Required: true, + ValidateFunc: validation.IntInSlice([]int{2}), }, }, }, + ConflictsWith: []string{"agent_pool_name"}, }, "agent_pool_name": { - Type: pluginsdk.TypeString, - Optional: true, - ValidateFunc: validation.StringIsNotEmpty, + Type: pluginsdk.TypeString, + Optional: true, + ValidateFunc: validation.StringIsNotEmpty, + ConflictsWith: []string{"agent_setting"}, }, "enabled": { Type: pluginsdk.TypeBool, diff --git a/website/docs/r/container_registry_task.html.markdown b/website/docs/r/container_registry_task.html.markdown index 18d262f3d757..58e396428e0e 100644 --- a/website/docs/r/container_registry_task.html.markdown +++ b/website/docs/r/container_registry_task.html.markdown @@ -55,6 +55,8 @@ The following arguments are supported: * `agent_setting` - (Optional) A `agent_setting` block as defined below. +~> **NOTE:** Only one of `agent_pool_name` and `agent_setting` can be specified. + * `enabled` - (Optional) Should this Container Registry Task be enabled? Defaults to `true`. * `identity` - (Optional) An `identity` block as defined below. @@ -93,7 +95,7 @@ The following arguments are supported: A `agent_setting` block supports the following: -* `cpu` - (Required) The number of cores required for the Container Registry Task. +* `cpu` - (Required) The number of cores required for the Container Registry Task. Possible value is `2`. ---