fix: add random name to project (#65)

Signed-off-by: matttrach <matt.trachier@suse.com>
This commit is contained in:
Matt Trachier 2024-05-03 14:43:21 -05:00 committed by GitHub
parent 560f073362
commit 08163c2fc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 35 additions and 33 deletions

View File

@ -8,6 +8,7 @@ on:
env:
AWS_REGION: us-west-1
AWS_ROLE: arn:aws:iam::270074865685:role/terraform-module-ci-test
ZONE: ${{secrets.ZONE}}
permissions: write-all
@ -66,7 +67,8 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_OWNER: rancher
IDENTIFIER: ${{github.job}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}
IDENTIFIER: ${{github.run_id}}
ZONE: ${{env.ZONE}}
- name: 'ImageCheck'
run: ./validate-image.sh
if: steps.release-please.outputs.pr

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "basic"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "directnetworkdomain"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "directnetworkonly"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "directssheip"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "directsshsubnet"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "indirectdomain"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "indirect"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "basic"
example = "basic"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28" # must be within the vpc cidr range, AWS reserves .225-.229 and .238

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "liberty7"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "liberty-7"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "rhel8"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "rhel-8"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "rhel8cis"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "rhel-8-cis"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "rhel9"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "rhel-9"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "rocky8"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "rocky-8"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "slemicro55byos"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sle-micro-55-byos" # BYOS = Bring Your Own Subscription, only use this if you have a subscription with SUSE or plan to get one directly rather than going through AWS
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "slemicro55llc"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sle-micro-55-llc" # llc refers to SUSE subsidiary incorporation type, in general the LLC images are used in the US and Asia-Pacific
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "slemicro55ltd"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sle-micro-55-ltd" # ltd refers to SUSE subsidiary incorporation type, in general the LTD images are used in the Europe, the Middle East, and Africa (EMEA)
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "sles15"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "sles15byos"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sles-15-byos" # BYOS = Bring Your Own Subscription, only use this if you have a subscription with SUSE or plan to get one directly rather than going through AWS
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "sles15cis"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "sles-15-cis"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "ubuntu20"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "ubuntu-20"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -12,7 +12,7 @@ locals {
category = "os"
example = "ubuntu22"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
username = "tf-${local.identifier}"
image = "ubuntu-22"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254

View File

@ -13,7 +13,7 @@ locals {
category = "region"
example = "useast1"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -13,7 +13,7 @@ locals {
category = "region"
example = "useast2"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -13,7 +13,7 @@ locals {
category = "region"
example = "uswest1"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -13,7 +13,7 @@ locals {
category = "region"
example = "uswest2"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "select"
example = "server"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"
}

View File

@ -12,7 +12,7 @@ locals {
category = "select"
example = "server"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "size"
example = "large"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "size"
example = "medium"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "size"
example = "small"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "size"
example = "xl"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"

View File

@ -12,7 +12,7 @@ locals {
category = "size"
example = "xxl"
email = "terraform-ci@suse.com"
project_name = "tf-${substr(md5(join("-", [local.category, local.example])), 0, 5)}-${local.identifier}"
project_name = "tf-${substr(md5(join("-", [local.category, local.example, random_pet.server.id])), 0, 5)}-${local.identifier}"
image = "sles-15"
vpc_cidr = "10.0.255.0/24" # gives 256 usable addresses from .1 to .254, but AWS reserves .1 to .4 and .255, leaving .5 to .254
subnet_cidr = "10.0.255.224/28"