Skip to content

Commit

Permalink
Add matching of wildcard to within region.
Browse files Browse the repository at this point in the history
  • Loading branch information
dspeck1 committed Nov 13, 2024
1 parent c528fe7 commit dba8b08
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ final case class VpcAndSubnetworkProjectLabelValues(vpcName: String, subnetNameO
def subnetNameOption(projectId: String, region: String): Option[String] = {
subnetNameOpt map { _.replace(ProjectIdToken, projectId) }
//replace wildcard character used in terra configuration for subnetworks with appropriate region
subnetNameOpt map { _.replace("*", region) }
subnetNameOpt map { _.replace(regionWildcard, "regions/"+ region) }
}
}

object VpcAndSubnetworkProjectLabelValues {
private val ProjectIdToken = s"$${projectId}"
private val regionWildcard = s"regions/*"
}

0 comments on commit dba8b08

Please sign in to comment.