Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Dec 20, 2023
1 parent 6b54972 commit 9b20978
Show file tree
Hide file tree
Showing 10 changed files with 276 additions and 1 deletion.
45 changes: 44 additions & 1 deletion .github/workflows/e2e-test-provider-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,49 @@ jobs:
last_three="${run_id: -3}"
echo "prefix=e2e-${last_three}-${{ github.run_attempt }}" | tee -a "$GITHUB_OUTPUT"
- name: Common CSP Terraform overrides
working-directory: ${{ github.workspace }}
shell: bash
run: |
mkdir cluster
cd cluster
if [[ "${{ inputs.providerVersion }}" == "" ]]; then
vversion="v2.14.0-pre.0.20231214193540-2c50abcc919b"
else
vversion="${{ inputs.providerVersion }}"
fi
version=${vversion#v} # remove v prefix
if [[ "${{ inputs.providerVersion }}" == "" ]]; then
iam_src="../terraform-module/iam/${{ inputs.cloudProvider }}"
infra_src="../terraform-module/${{ inputs.cloudProvider }}"
else
iam_src="https://github.com/edgelesssys/constellation/releases/download/${{ inputs.providerVersion }}/terraform-module.zip//terraform-module/iam/${{ inputs.cloudProvider }}"
infra_src="https://github.com/edgelesssys/constellation/releases/download/${{ inputs.providerVersion }}/terraform-module.zip//terraform-module/${{ inputs.cloudProvider }}"
fi
cat > _override.tf <<EOF
terraform {
required_providers {
constellation = {
source = "edgelesssys/constellation"
version = "${version}"
}
}
}
locals {
name = "${{ steps.create-prefix.outputs.prefix }}"
version = "${vversion}"
}
module "${{ inputs.cloudProvider }}_iam" {
source = "${iam_src}"
}
module "${{ inputs.cloudProvider }}_infrastructure" {
source = "${infra_src}"
}
EOF
cat _override.tf
- name: Install dependencies (Terraform)
shell: bash
run: |
Expand Down Expand Up @@ -200,7 +243,7 @@ jobs:
source = "${infra_src}"
}
EOF
echo "common_override=$(cat _override.tf)" | tee -a "$GITHUB_OUTPUT"
cat _override.tf
- name: Create GCP Terraform overrides
if: inputs.cloudProvider == 'gcp'
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions terraform-provider-constellation/examples/full/azure/_override.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
terraform {
required_providers {
constellation = {
source = "edgelesssys/constellation"
version = "2.14.0-pre.0.20231219164226-b2a3d4590f4a"
}
}
}
locals {
name = "e2e-107"
version = "ref/main/stream/nightly/v2.14.0-pre.0.20231214193540-2c50abcc919b"
}
module "azure_iam" {
# source = "terraform-module/iam/azure"
source = "../../../../terraform/infrastructure/iam/azure"
}

module "azure_infrastructure" {
# source = "../terraform-module/azure"
source = "../../../../terraform/infrastructure/azure"
}

#locals {
# version = "v2.14.0"
#}
1 change: 1 addition & 0 deletions terraform-provider-constellation/examples/full/azure/cdbg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions terraform-provider-constellation/examples/full/gcp/_override.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
terraform {
required_providers {
constellation = {
source = "edgelesssys/constellation"
version = "2.14.0-pre.0.20231219164226-b2a3d4590f4a"
}
}
}
locals {
name = "e2e-521-2" # try -1
version = "ref/main/stream/nightly/v2.14.0-pre.0.20231214193540-2c50abcc919b"
}
module "gcp_iam" {
# source = "../terraform-module/iam/gcp"
source = "../../../../terraform/infrastructure/iam/gcp"
}
module "gcp_infrastructure" {
# source = "../terraform-module/gcp"
source = "../../../../terraform/infrastructure/gcp"
}
locals {
region = "europe-west3"
zone = "europe-west3-b"
}

0 comments on commit 9b20978

Please sign in to comment.