Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit ce675714 authored by Nicolas's avatar Nicolas
Browse files

refactoring: Add new variable for PSC connection

parent 69910ce0
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,8 @@ check-magento:
TF_VAR_ec_apikey: $EC_API_KEY
TF_VAR_project_id: $GCP_PROJECT_ID
GCP_SA_GITLAB: $GCP_SA_GITLAB
GCP_REGION: $GCP_REGION
GCP_SUBNETWORK_NAME: $GCP_SUBNETWORK_NAME
script: |-
cd $TF_ROOT_MAGENTO
echo $GCP_SA_GITLAB > gcp-sa.json
......@@ -96,6 +98,8 @@ apply-magento:
TF_VAR_ec_apikey: $EC_API_KEY
TF_VAR_project_id: $GCP_PROJECT_ID
GCP_SA_GITLAB: $GCP_SA_GITLAB
GCP_REGION: $GCP_REGION
GCP_SUBNETWORK_NAME: $GCP_SUBNETWORK_NAME
script: |-
cd $TF_ROOT_MAGENTO
echo $GCP_SA_GITLAB > gcp-sa.json
......@@ -103,7 +107,7 @@ apply-magento:
gitlab-terraform apply -auto-approve
gcloud-psc:
stage: deploy
stage: test
needs:
- apply-elastic
- apply-magento
......@@ -115,10 +119,12 @@ gcloud-psc:
variables:
GCP_PROJECT_ID: $GCP_PROJECT_ID
GCP_SA_GITLAB: $GCP_SA_GITLAB
GCP_REGION: $GCP_REGION
GCP_SUBNETWORK_NAME: $GCP_SUBNETWORK_NAME
script: |-
echo $GCP_SA_GITLAB > gcp-sa.json
gcloud auth activate-service-account --key-file gcp-sa.json
echo "Activate Service Account: OK"
gcloud config set project $GCP_PROJECT_ID
echo "Set Project: OK"
gcloud projects list
\ No newline at end of file
echo "Private IP Google Access is enabled on subnet: $(gcloud compute networks subnets describe $GCP_SUBNETWORK_NAME --region=$GCP_REGION --format="get(privateIpGoogleAccess)")"
\ No newline at end of file
......@@ -4,7 +4,6 @@ variable "project_id" {
variable "region" {
type = string
default = "europe-west1"
}
### Network & Subnetwork
......@@ -14,7 +13,6 @@ variable "vpc_network_name" {
}
variable "vpc_subnetwork_name" {
type = string
default = "vpc-sb-magento"
}
variable "vpc_private_ip_address_name" {
type = string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment