Skip to content

Commit

Permalink
Fix project name replacement in subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
jgainerdewar committed Nov 14, 2024
1 parent a9ee99e commit a6301f0
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ final case class VpcAndSubnetworkProjectLabelValues(vpcName: String, subnetNameO
}

/**
* Replaces the string `\${projectId}` in the subnet name if found. Replace wildcard character used in terra configuration for subnetworks with appropriate region
* Replaces the string `\${projectId}` in the subnet name if found.
* Replace wildcard character used in terra configuration for subnetworks with appropriate region
*/
def subnetNameOption(projectId: String, region: String): Option[String] = {
subnetNameOpt map { _.replace(ProjectIdToken, projectId) }
subnetNameOpt map { _.replace(regionWildcard, "regions/"+ region) }
}
def subnetNameOption(projectId: String, region: String): Option[String] =
subnetNameOpt map { _.replace(ProjectIdToken, projectId) } map { _.replace(regionWildcard, "regions/" + region) }
}

object VpcAndSubnetworkProjectLabelValues {
Expand Down

0 comments on commit a6301f0

Please sign in to comment.