-
Notifications
You must be signed in to change notification settings - Fork 0
/
acr.py
27 lines (23 loc) · 965 Bytes
/
acr.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pulumi
import pulumi_azure as azure
from genetic import Genetics
class ACR(Genetics):
def __init__(self, resource_count, resource_group_name, location, project, environment, tags):
self.resorce_count = resource_count
self.registry_names = []
super().__init__(resource_group_name, location, project, environment, tags)
def create_registry(self):
for i in range(self.resorce_count):
acr_name = f'pulumiacr{self.environment}{i}'
acr = azure.containerservice.Registry(acr_name,
name=acr_name,
resource_group_name=self.resource_group_name,
location=self.location,
sku="Basic",
admin_enabled=False,
georeplication_locations=[
self.location
],
tags=self.tags
)
self.registry_names.append(acr_name)