def __init__()

in google_cloud_automlops/provisioning/pulumi.py [0:0]


    def __init__(self,
                 provision_credentials_key: str):
        """Initializes Pulumi infrastructure object.

        Args:
            provision_credentials_key (str): Either a path to or the contents of a service account
                key file in JSON format.
        """
        super().__init__(provision_credentials_key)
        self.pipeline_model_name = self.naming_prefix
        self.region = self.storage_bucket_location
        self.cloudtasks_queue_name = self.naming_prefix
        self.pulumi_runtime = PulumiRuntime.PYTHON

        # Define the model name for the IaC configurations
        # remove special characters and spaces
        self.pipeline_model_name = ''.join(
            ['_' if c in ['.', '-', '/', ' '] else c for c in self.pipeline_model_name]).lower()

        self.storage_bucket_name = ''.join(
            ['_' if c in ['.', '/', ' '] else c for c in self.storage_bucket_name]).lower()

        self.artifact_repo_name = ''.join(
            ['-' if c in ['.', '_', '/', ' '] else c for c in self.artifact_repo_name]).lower()

        self.source_repo_name = ''.join(
            ['-' if c in ['.', '_', '/', ' '] else c for c in self.source_repo_name]).lower()

        self.cloudtasks_queue_name = ''.join(
            ['-' if c in ['.', '_', '/', ' '] else c for c in self.cloudtasks_queue_name]).lower()

        self.build_trigger_name = ''.join(
            ['-' if c in ['.', '_', '/', ' '] else c for c in self.build_trigger_name]).lower()