-
Notifications
You must be signed in to change notification settings - Fork 0
/
genetic.py
24 lines (20 loc) · 947 Bytes
/
genetic.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
import pulumi
import pulumi_azure as azure
class Genetics:
def __init__(self, resource_group_name, location, project, environment, tags):
self.resource_group_name = resource_group_name
self.location = location
self.project = project
self.environment = environment
self.tags = tags
if self.environment == "prod":
self.tags["Environment"] = "prod"
self.tags["Project"] = self.project
else:
self.tags["Environment"] = "dev"
self.tags["Project"] = self.project
def create_rg(self):
pulumi_poc_rg = azure.core.ResourceGroup(self.resource_group_name, name=self.resource_group_name, location=self.location)
return pulumi_poc_rg
def show_genetics(self):
print(f'resource_group_name => {self.resource_group_name} \nlocation => {self.location} \nproject => {self.project} \nenvironment => {self.environment}')