File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ resource "random_password" "payload_user_password" {
1515 length = 32
1616}
1717
18+ data "gitlab_project_variable" "ga_measurement_id" {
19+ project = " code0-tech/secret-manager"
20+ key = " SCULPTOR_NEXT_PUBLIC_GA_MEASUREMENT_ID"
21+ }
22+
1823locals {
1924 cygnus_env = [
2025 # Cygnus
@@ -23,6 +28,7 @@ locals {
2328 " PAYLOAD_USER_PASS=${ random_password . payload_user_password . result } " ,
2429 " DATABASE_URL=postgresql://cygnus:${ random_password . db . result } @${ docker_container . postgres . hostname } :5432/payload" ,
2530 " HOSTNAME=0.0.0.0" ,
31+ " NEXT_PUBLIC_GA_MEASUREMENT_ID=${ sensitive (data. gitlab_project_variable . ga_measurement_id . value )} " ,
2632
2733 # Proxy
2834 " VIRTUAL_HOST=${ var . web_url } "
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ resource "docker_image" "postgres" {
99
1010resource "docker_volume" "pgdata" {
1111 name = " cygnus_pgdata"
12+
13+ lifecycle {
14+ replace_triggered_by = [
15+ docker_image . cygnus . image_id ,
16+ docker_image . postgres . image_id
17+ ]
18+ }
1219}
1320
1421resource "random_password" "db" {
@@ -43,4 +50,10 @@ resource "docker_container" "postgres" {
4350 networks_advanced {
4451 name = docker_network. cygnus . name
4552 }
53+
54+ lifecycle {
55+ replace_triggered_by = [
56+ docker_volume . pgdata . id
57+ ]
58+ }
4659}
You can’t perform that action at this time.
0 commit comments