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

add rg and name clash validation #56

Closed
wants to merge 1 commit into from

Conversation

mjudeikis
Copy link
Contributor

If resourceGroup exists and it is the same name as a cluster - the provider fails.

We should fail early.

@jim-minter
Copy link
Owner

The problem is valid but I'm not sure about the fix, so don't want to merge this yet. I actually think there are two options here:
1- end user decides the resource group name and we validate that it doesn't exist on create
2- we create a randomly named resource group.

For user experience I'm hoping we go for 1.

@mjudeikis
Copy link
Contributor Author

End-user currently decides the resource group already and passes it in (CLI help and created it for the user). But if the user creates RG with name mycluster runs it with:
`az aro create -n mycluster -g mycluster, API will accept it and will fail, as
RP will try to create RG for the cluster. I think we would be better to do:

Allow customer to chose resource group name (and create it if it does not exist),
Create a cluster resource group with random post-fix

This would create these scenarios:

  1. As a user, I have to create JUST VNET resource group: cluster-vnet
    RP creates me a resource group from -n flag or resourceName to host cluster object
    RP creates me a resource group clusterName-{random_5} and deploys the cluster.

  2. As a user I have created VNET RG and cluster RG. cluster-rg, cluster-vnetRP creates cluster object insidecluster-rgresource group. RP creates cluster RG groupcluster-{random_5}`

I think we should add random postfix to the cluster ResourceGroup either way as it would solve these conflicts and would allow the user to use -n and -g with the same values

@jim-minter
Copy link
Owner

Create a cluster resource group with random post-fix

No - plan A is to allow the end user to specify the name of the cluster resource group. January.

Will merge a fix like this for now.

@jim-minter jim-minter closed this Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants