Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build assets before running terraform plan so the source code hash ma… #87

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

rahearn
Copy link
Collaborator

@rahearn rahearn commented Jan 2, 2025

…tches

Copy link

github-actions bot commented Jan 2, 2025

Terraform plan in terraform
With var files: terraform/staging.tfvars

Plan: 3 to add, 4 to change, 3 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-/+ destroy and then create replacement
 <= read (data resources)

Terraform will perform the following actions:

  # data.external.set-app-space-egress will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "external" "set-app-space-egress" {
+       id          = (known after apply)
+       program     = [
+           "/bin/sh",
+           "set_space_egress.sh",
+           "-t",
+           "-s",
+           "capoc-stage",
+           "-o",
+           "gsa-tts-devtools-prototyping",
        ]
+       result      = (known after apply)
+       working_dir = "."
    }

  # cloudfoundry_app.app will be updated in-place
!~  resource "cloudfoundry_app" "app" {
+       command                     = "./bin/rake cf:on_first_instance db:migrate && exec env HTTP_PORT=$PORT ./bin/thrust ./bin/rails server"
!~      created_at                  = "2024-12-26T21:38:47Z" -> (known after apply)
+       disk_quota                  = (known after apply)
+       health_check_http_endpoint  = "/up"
+       health_check_type           = "http"
!~      id                          = "************************************" -> (known after apply)
+       instances                   = 1
+       log_rate_limit_per_second   = (known after apply)
+       memory                      = "256M"
        name                        = "continuous_monitoring-staging"
-       processes                   = [
-           {
-               command                     = "bundle exec rake cf:on_first_instance db:migrate && exec env HTTP_PORT=$PORT ./bin/thrust ./bin/rails server" -> null
-               disk_quota                  = "2048M" -> null
-               health_check_type           = "port" -> null
-               instances                   = 1 -> null
-               log_rate_limit_per_second   = "-1" -> null
-               memory                      = "256M" -> null
-               readiness_health_check_type = "process" -> null
-               type                        = "web" -> null
            },
        ] -> null
+       readiness_health_check_type = (known after apply)
!~      source_code_hash            = "mdntaAL1crxW59b4GwOged0cYDE9zQcV8/cChDtpXq0=" -> "Bz7XF13B5maLOP4JvOICOcSJQCsXKoW0HfGnwn4Oz2w="
!~      stack                       = "cflinuxfs4" -> (known after apply)
!~      strategy                    = "blue-green" -> "rolling"
!~      updated_at                  = "2024-12-26T21:50:56Z" -> (known after apply)
#        (7 unchanged attributes hidden)
    }

  # cloudfoundry_network_policy.egress_routing will be updated in-place
!~  resource "cloudfoundry_network_policy" "egress_routing" {
        id = "05a74ebf-eccc-3593-abce-90c94c007b39"

-       policy {
-           destination_app = "b7becb44-b1cd-412a-8d0a-ff01e55044b5" -> null
-           port            = "61443" -> null
-           protocol        = "tcp" -> null
-           source_app      = "99121ff6-67ff-485d-bf03-d92ed152bf51" -> null
        }
-       policy {
-           destination_app = "b7becb44-b1cd-412a-8d0a-ff01e55044b5" -> null
-           port            = "8080" -> null
-           protocol        = "tcp" -> null
-           source_app      = "99121ff6-67ff-485d-bf03-d92ed152bf51" -> null
        }
+       policy {
+           destination_app = (known after apply)
+           port            = "61443"
+           protocol        = "tcp"
+           source_app      = (known after apply)
        }
+       policy {
+           destination_app = (known after apply)
+           port            = "8080"
+           protocol        = "tcp"
+           source_app      = (known after apply)
        }
    }

  # module.app_space.cloudfoundry_space_role.developers["a6885c8a-c011-4d34-b988-abc8033d138f"] must be replaced
-/+ resource "cloudfoundry_space_role" "developers" {
!~      created_at = "2024-12-26T21:32:40Z" -> (known after apply)
!~      id         = "************************************" -> (known after apply)
!~      updated_at = "2024-12-26T21:32:40Z" -> (known after apply)
-       username   = "a6885c8a-c011-4d34-b988-abc8033d138f" -> null # forces replacement
#        (3 unchanged attributes hidden)
    }

  # module.app_space.cloudfoundry_space_role.developers["[email protected]"] must be replaced
-/+ resource "cloudfoundry_space_role" "developers" {
!~      created_at = "2024-12-26T21:32:40Z" -> (known after apply)
!~      id         = "************************************" -> (known after apply)
!~      updated_at = "2024-12-26T21:32:40Z" -> (known after apply)
-       username   = "[email protected]" -> null # forces replacement
#        (3 unchanged attributes hidden)
    }

  # module.app_space.cloudfoundry_space_role.managers["a6885c8a-c011-4d34-b988-abc8033d138f"] must be replaced
-/+ resource "cloudfoundry_space_role" "managers" {
!~      created_at = "2024-12-26T21:32:40Z" -> (known after apply)
!~      id         = "************************************" -> (known after apply)
!~      updated_at = "2024-12-26T21:32:40Z" -> (known after apply)
-       username   = "a6885c8a-c011-4d34-b988-abc8033d138f" -> null # forces replacement
#        (3 unchanged attributes hidden)
    }

  # module.database.data.cloudfoundry_service_plans.rds will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "cloudfoundry_service_plans" "rds" {
+       name                  = "micro-psql"
+       service_offering_name = "aws-rds"
+       service_plans         = (known after apply)
    }

  # module.database.cloudfoundry_service_instance.rds will be updated in-place
!~  resource "cloudfoundry_service_instance" "rds" {
+       dashboard_url     = (known after apply)
        id                = "e304aaca-938d-4955-92c0-3013ba4196f4"
!~      last_operation    = {
!~          created_at  = "2024-12-26T21:38:45Z" -> (known after apply)
!~          description = "The service instance status is succeeded" -> (known after apply)
!~          state       = "succeeded" -> (known after apply)
!~          type        = "create" -> (known after apply)
!~          updated_at  = "2024-12-26T21:38:45Z" -> (known after apply)
        } -> (known after apply)
!~      maintenance_info  = {
+           description = (known after apply)
+           version     = (known after apply)
        } -> (known after apply)
        name              = "continuous_monitoring-rds-staging"
!~      service_plan      = "5ed9f319-4c75-4851-9885-598a96b7febc" -> (known after apply)
        tags              = [
            "terraform-cloudgov-managed",
        ]
!~      updated_at        = "2024-12-26T21:32:43Z" -> (known after apply)
!~      upgrade_available = false -> (known after apply)
#        (3 unchanged attributes hidden)
    }

  # module.egress_proxy.data.external.proxyzip will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "external" "proxyzip" {
+       id          = (known after apply)
+       program     = [
+           "/bin/sh",
+           "prepare-proxy.sh",
        ]
+       query       = {
+           "gitref" = "refs/heads/main"
        }
+       result      = (known after apply)
+       working_dir = "/tmp/terraform-data-dir/modules/egress_proxy/egress_proxy"
    }

  # module.egress_proxy.cloudfoundry_app.egress_app will be updated in-place
!~  resource "cloudfoundry_app" "egress_app" {
!~      created_at                  = "2024-12-26T21:32:43Z" -> (known after apply)
!~      disk_quota                  = "2048M" -> (known after apply)
!~      health_check_type           = "port" -> (known after apply)
!~      id                          = "************************************" -> (known after apply)
!~      log_rate_limit_per_second   = "-1" -> (known after apply)
        name                        = "egress-proxy-staging"
!~      path                        = "/tmp/terraform-data-dir/modules/egress_proxy/egress_proxy/proxy.zip" -> (known after apply)
!~      readiness_health_check_type = "process" -> (known after apply)
!~      source_code_hash            = "af51150cd35106926b9402cb72da8002e1490af5362db1f5c8f799acd2f0daaf" -> (known after apply)
!~      stack                       = "cflinuxfs4" -> (known after apply)
!~      updated_at                  = "2024-12-26T21:33:03Z" -> (known after apply)
#        (9 unchanged attributes hidden)
    }

Plan: 3 to add, 4 to change, 3 to destroy.

📝 Plan generated in Run Terraform plan in staging #123

@rahearn rahearn merged commit 4ee87c2 into main Jan 2, 2025
11 checks passed
@rahearn rahearn deleted the compile-assets-before-plan branch January 2, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant