File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
templates/terraform/constants
third_party/terraform/services/compute Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,14 @@ func diskImageFamilyEquals(imageName, familyName string) bool {
187187 return true
188188 }
189189
190+ if suppressFedoraFamilyDiff(imageName, familyName) {
191+ return true
192+ }
193+
194+ if suppressSuseFamilyDiff(imageName, familyName) {
195+ return true
196+ }
197+
190198 if suppressCosFamilyDiff(imageName, familyName) {
191199 return true
192200 }
@@ -220,6 +228,26 @@ func suppressCanonicalFamilyDiff(imageName, familyName string) bool {
220228 return false
221229}
222230
231+ func suppressFedoraFamilyDiff(imageName, familyName string) bool {
232+ parts := fedoraImage.FindStringSubmatch (imageName)
233+ if len (parts) == 6 {
234+ if strings.HasPrefix (familyName, " fedora-" ) {
235+ return true
236+ }
237+ }
238+ return false
239+ }
240+
241+ func suppressSuseFamilyDiff(imageName, familyName string) bool {
242+ parts := suseImage.FindStringSubmatch (imageName)
243+ if len (parts) == 4 {
244+ if strings.HasPrefix (familyName, " sles-" ) {
245+ return true
246+ }
247+ }
248+ return false
249+ }
250+
223251// e.g. image: cos-NN-*, family: cos-NN-lts
224252func suppressCosFamilyDiff(imageName, familyName string) bool {
225253 parts := cosLtsImage.FindStringSubmatch (imageName)
Original file line number Diff line number Diff line change 3333
3434 windowsSqlImage = regexp .MustCompile ("^sql-(?:server-)?([0-9]{4})-([a-z]+)-windows-(?:server-)?([0-9]{4})(?:-r([0-9]+))?-dc-v[0-9]+$" )
3535 canonicalUbuntuLtsImage = regexp .MustCompile ("^ubuntu-(minimal-)?([0-9]+)(?:.*(arm64|amd64))?.*$" )
36+ fedoraImage = regexp .MustCompile ("^fedora-coreos-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-gcp-(x86-64|aarch64)$" )
37+ suseImage = regexp .MustCompile ("^sles-([0-9]+)-([0-9]+)-(v[0-9]+)-x86-64$" )
3638 cosLtsImage = regexp .MustCompile ("^cos-([0-9]+)-" )
3739)
3840
You can’t perform that action at this time.
0 commit comments