Describe the bug
I got below error when running my script, please provide what command i should using now since it's no longer work.
Script
provider_registration() {
#Need to refresh the provider to apply the feature changes
while true; do
is_feature_registered=$(az feature show \
--namespace "Microsoft.ContainerService" \
--name "TrustedAccessPreview" \
-o yaml|grep state|awk '{print $2}'|tr '[:upper:]' '[:lower:]')
# Check if the process is still running
if [[ "$is_feature_registered" == "registering" ]]; then
echo "TrustedAccessPreview Feature registration is still in progress..."
sleep 60 # Sleep for 60 seconds
else
echo "Registration is complete."
az provider register \
--namespace Microsoft.ContainerService
break
fi
done
}
feature_registration() {
is_feature_registered=$(az feature show \
--namespace "Microsoft.ContainerService" \
--name "TrustedAccessPreview" \
-o yaml|grep state|awk '{print $2}'|tr '[:upper:]' '[:lower:]')
if [[ "$is_feature_registered" == "registered" ]]; then
echo "The TrustedAccessPreview feature is already registered"
else
az feature register \
--namespace "Microsoft.ContainerService" \
--name "TrustedAccessPreview"
provider_registration
fi
}
Related command
az feature show --namespace "Microsoft.ContainerService" --name "TrustedAccessPreview"
az feature register --namespace "Microsoft.ContainerService" --name "TrustedAccessPreview" provider_registration
Errors
EnvironmentName HomeTenantId IsDefault Name
State TenantId
----------------- ------------------------------------ -----------
--------------- ------- ------------------------------------
AzureCloud <XXXX> True
product-nprd-uat Enabled <XXXX>
ERROR: (FeatureNotFound) The feature 'TrustedAccessPreview' could not be
found.
Code: FeatureNotFound
Message: The feature 'TrustedAccessPreview' could not be found.
Issue script & Debug output
N/A
Expected behavior
Register TrustedAccessPreview feature
Environment Summary
N/A
Additional context
No response
Describe the bug
I got below error when running my script, please provide what command i should using now since it's no longer work.
Script
Related command
Errors
Issue script & Debug output
N/A
Expected behavior
Register TrustedAccessPreview feature
Environment Summary
N/A
Additional context
No response