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

Allow creating both mgmt/svc cluster idempotently #115

Merged
merged 1 commit into from
May 8, 2024

Conversation

mjlshen
Copy link
Contributor

@mjlshen mjlshen commented May 8, 2024

What this PR does

Before this PR:

  • Unable to create a mgmt and a svc cluster due to naming conflicts
  • Unable to idempotently make mgmt-cluster/make svc-cluster

After this PR:

  • Able to create a mgmt and svc cluster
  • Able to idempotently make mgmt-cluster/make svc-cluster, making iterating on changes easier.

Applying the mgmt-cluster/svc-cluster targets again now results in:

Resource changes: 4 to modify, 10 no change.

Jira: ARO-6158

LOCATION?=eastus
RESOURCEGROUP=aro-hcp-${AKSCONFIG}-$(USER)
DEPLOYMENTNAME=$(RESOURCEGROUP)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEPLOYMENTNAME needed to be unique between the mgmt/svc cluster

@@ -1,5 +1,5 @@
// Constants
param aksClusterName string = 'aro-hcp-cluster-001'
param aksClusterName string = take('aro-hcp-${clusterType}-${uniqueString(clusterType)}', 63)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows for a unique cluster name between mgmt/svc clusters

@@ -125,7 +138,7 @@ resource aks_keyvault_crypto_user 'Microsoft.Authorization/roleAssignments@2022-
}
}

resource vnet 'Microsoft.Network/virtualNetworks@2023-09-01' = {
resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows vnet/subnet to behave idempotently now from Azure/azure-quickstart-templates#2786

Comment on lines +116 to +127
rotationPolicy: {
lifetimeActions: [
{
action: {
type: 'notify'
}
trigger: {
timeBeforeExpiry: 'P30D'
}
}
]
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default values that are being imported into the module

@mjlshen mjlshen merged commit f9531a6 into Azure:main May 8, 2024
4 checks passed
@mjlshen mjlshen deleted the ARO-6158 branch May 8, 2024 21:45
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.

2 participants