Skip to content

Commit

Permalink
Make default instance type configurable for provider sample
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Weiße <[email protected]>
  • Loading branch information
daniel-weisse committed Feb 5, 2024
1 parent f21252c commit 15649e6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/e2e-test-provider-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,18 @@ jobs:
EOF
cat _override.tf
- name: Create Azure TDX Terraform overrides
if: inputs.attestationVariant == 'azure-tdx'
working-directory: ${{ github.workspace }}/cluster
shell: bash
run: |
cat >> _override.tf <<EOF
locals {
instance_type = "Standard_DC4es_v5"
}
EOF
cat _override.tf
- name: Copy example Terraform file
working-directory: ${{ github.workspace }}
shell: bash
Expand Down
5 changes: 3 additions & 2 deletions terraform-provider-constellation/examples/full/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ locals {
zone = "us-east-2c"
control_plane_count = 3
worker_count = 2
instance_type = "m6a.xlarge"

master_secret = random_bytes.master_secret.hex
master_secret_salt = random_bytes.master_secret_salt.hex
Expand Down Expand Up @@ -54,15 +55,15 @@ module "aws_infrastructure" {
node_groups = {
control_plane_default = {
role = "control-plane"
instance_type = "m6a.xlarge"
instance_type = local.instance_type
disk_size = 30
disk_type = "gp3"
initial_count = local.control_plane_count
zone = local.zone
},
worker_default = {
role = "worker"
instance_type = "m6a.xlarge"
instance_type = local.instance_type
disk_size = 30
disk_type = "gp3"
initial_count = local.worker_count
Expand Down
5 changes: 3 additions & 2 deletions terraform-provider-constellation/examples/full/azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ locals {
location = "northeurope"
control_plane_count = 3
worker_count = 2
instance_type = "Standard_DC4as_v5"

master_secret = random_bytes.master_secret.hex
master_secret_salt = random_bytes.master_secret_salt.hex
Expand Down Expand Up @@ -55,14 +56,14 @@ module "azure_infrastructure" {
node_groups = {
control_plane_default = {
role = "control-plane"
instance_type = "Standard_DC4as_v5"
instance_type = local.instance_type
disk_size = 30
disk_type = "Premium_LRS"
initial_count = local.control_plane_count
},
worker_default = {
role = "worker"
instance_type = "Standard_DC4as_v5"
instance_type = local.instance_type
disk_size = 30
disk_type = "Premium_LRS"
initial_count = local.worker_count
Expand Down
5 changes: 3 additions & 2 deletions terraform-provider-constellation/examples/full/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ locals {
project_id = "constellation-331613"
control_plane_count = 3
worker_count = 2
instance_type = "n2d-standard-4"

master_secret = random_bytes.master_secret.hex
master_secret_salt = random_bytes.master_secret_salt.hex
Expand Down Expand Up @@ -57,15 +58,15 @@ module "gcp_infrastructure" {
node_groups = {
control_plane_default = {
role = "control-plane"
instance_type = "n2d-standard-4"
instance_type = local.instance_type
disk_size = 30
disk_type = "pd-ssd"
initial_count = local.control_plane_count
zone = local.zone
},
worker_default = {
role = "worker"
instance_type = "n2d-standard-4"
instance_type = local.instance_type
disk_size = 30
disk_type = "pd-ssd"
initial_count = local.worker_count
Expand Down

0 comments on commit 15649e6

Please sign in to comment.