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

Creating ssm parameters #180

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Creating ssm parameters #180

wants to merge 16 commits into from

Conversation

sylviamclaughlin
Copy link
Collaborator

Summary | Résumé

I realized that I had previously not created the SSM parameters the best way (thanks @patheard for the help!) and I am now modifying them to create them the right way.

@sylviamclaughlin sylviamclaughlin self-assigned this Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Jul 1, 2023

Staging: ssm

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 27 to add, 0 to change, 0 to destroy
Show summary
CHANGE NAME
add aws_ssm_parameter.approval_request_template_id
aws_ssm_parameter.approved_request_template_id
aws_ssm_parameter.approver_delete_template_id
aws_ssm_parameter.db_host
aws_ssm_parameter.delete_saas_request_template_id
aws_ssm_parameter.denied_request_template_id
aws_ssm_parameter.django_secret_key
aws_ssm_parameter.edit_request_template_id
aws_ssm_parameter.environment
aws_ssm_parameter.internal_ops_request_more_info_template_id
aws_ssm_parameter.notify_api_key
aws_ssm_parameter.notify_url
aws_ssm_parameter.postgres_db
aws_ssm_parameter.postgres_password
aws_ssm_parameter.postgres_user
aws_ssm_parameter.request_s32_approved_internal_ops_template_id
aws_ssm_parameter.request_s32_approved_template_id
aws_ssm_parameter.request_s32_denied_internal_ops_template_id
aws_ssm_parameter.request_s32_denied_template_id
aws_ssm_parameter.requestor_s32approval_pending_review_template_id
aws_ssm_parameter.s32_approval_requested_template_id
aws_ssm_parameter.saas_submission_edit_template_id
aws_ssm_parameter.saas_submission_template_id
aws_ssm_parameter.site_id
aws_ssm_parameter.social_application_client_id
aws_ssm_parameter.social_application_secret_key
aws_ssm_parameter.testing_feature_flag
Show plan
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_ssm_parameter.approval_request_template_id will be created
  + resource "aws_ssm_parameter" "approval_request_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "approval_request_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.approved_request_template_id will be created
  + resource "aws_ssm_parameter" "approved_request_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "approved_request_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.approver_delete_template_id will be created
  + resource "aws_ssm_parameter" "approver_delete_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "approver_delete_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.db_host will be created
  + resource "aws_ssm_parameter" "db_host" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "db_host"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.delete_saas_request_template_id will be created
  + resource "aws_ssm_parameter" "delete_saas_request_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "delete_saas_request_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.denied_request_template_id will be created
  + resource "aws_ssm_parameter" "denied_request_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "denied_request_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.django_secret_key will be created
  + resource "aws_ssm_parameter" "django_secret_key" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "django_secret_key"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.edit_request_template_id will be created
  + resource "aws_ssm_parameter" "edit_request_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "edit_request_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.environment will be created
  + resource "aws_ssm_parameter" "environment" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "environment"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.internal_ops_request_more_info_template_id will be created
  + resource "aws_ssm_parameter" "internal_ops_request_more_info_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "internal_ops_request_more_info_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.notify_api_key will be created
  + resource "aws_ssm_parameter" "notify_api_key" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "notify_api_key"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.notify_url will be created
  + resource "aws_ssm_parameter" "notify_url" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "notify_url"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.postgres_db will be created
  + resource "aws_ssm_parameter" "postgres_db" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "postgres_db"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.postgres_password will be created
  + resource "aws_ssm_parameter" "postgres_password" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "postgres_password"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.postgres_user will be created
  + resource "aws_ssm_parameter" "postgres_user" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "postgres_user"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.request_s32_approved_internal_ops_template_id will be created
  + resource "aws_ssm_parameter" "request_s32_approved_internal_ops_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "request_s32_approved_internal_ops_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.request_s32_approved_template_id will be created
  + resource "aws_ssm_parameter" "request_s32_approved_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "request_s32_approved_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.request_s32_denied_internal_ops_template_id will be created
  + resource "aws_ssm_parameter" "request_s32_denied_internal_ops_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "request_s32_denied_internal_ops_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.request_s32_denied_template_id will be created
  + resource "aws_ssm_parameter" "request_s32_denied_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "request_s32_denied_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.requestor_s32approval_pending_review_template_id will be created
  + resource "aws_ssm_parameter" "requestor_s32approval_pending_review_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "requestor_s32approval_pending_review_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.s32_approval_requested_template_id will be created
  + resource "aws_ssm_parameter" "s32_approval_requested_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "s32_approval_requested_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.saas_submission_edit_template_id will be created
  + resource "aws_ssm_parameter" "saas_submission_edit_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "saas_submission_edit_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.saas_submission_template_id will be created
  + resource "aws_ssm_parameter" "saas_submission_template_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "saas_submission_template_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.site_id will be created
  + resource "aws_ssm_parameter" "site_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "site_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.social_application_client_id will be created
  + resource "aws_ssm_parameter" "social_application_client_id" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "social_application_client_id"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.social_application_secret_key will be created
  + resource "aws_ssm_parameter" "social_application_secret_key" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "social_application_secret_key"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

  # aws_ssm_parameter.testing_feature_flag will be created
  + resource "aws_ssm_parameter" "testing_feature_flag" {
      + arn            = (known after apply)
      + data_type      = (known after apply)
      + id             = (known after apply)
      + insecure_value = (known after apply)
      + key_id         = (known after apply)
      + name           = "testing_feature_flag"
      + tags           = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tags_all       = {
          + "CostCentre" = "saas-procurement"
          + "Terraform"  = "true"
        }
      + tier           = (known after apply)
      + type           = "SecureString"
      + value          = (sensitive value)
      + version        = (known after apply)
    }

Plan: 27 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + approval_request_template_id_arn                     = (known after apply)
  + approved_request_template_id_arn                     = (known after apply)
  + approver_delete_template_id_arn                      = (known after apply)
  + db_host_arn                                          = (known after apply)
  + delete_saas_request_template_id_arn                  = (known after apply)
  + denied_request_template_id_arn                       = (known after apply)
  + edit_request_template_id_arn                         = (known after apply)
  + environment_arn                                      = (known after apply)
  + internal_ops_request_more_info_template_id_arn       = (known after apply)
  + notify_api_key_arn                                   = (known after apply)
  + notify_url_arn                                       = (known after apply)
  + postgres_db_arn                                      = (known after apply)
  + postgres_password_arn                                = (known after apply)
  + postgres_user_arn                                    = (known after apply)
  + request_s32_approved_internal_ops_template_id_arn    = (known after apply)
  + request_s32_approved_template_id_arn                 = (known after apply)
  + request_s32_denied_internal_ops_template_id_arn      = (known after apply)
  + request_s32_denied_template_id_arn                   = (known after apply)
  + requestor_s32approval_pending_review_template_id_arn = (known after apply)
  + s32_approval_requested_template_id_arn               = (known after apply)
  # Warning: this attribute value will be marked as sensitive and will not
  # display in UI output after applying this change.
  ~ saas_app_config_value                                = (sensitive value)
  + saas_submission_edit_template_id_arn                 = (known after apply)
  + saas_submission_template_id_arn                      = (known after apply)
  + sdjango_secret_key_arn                               = (known after apply)
  + site_id_arn                                          = (known after apply)
  + social_application_client_id_arn                     = (known after apply)
  + social_application_secret_key_arn                    = (known after apply)
  + testing_feature_flag_arn                             = (known after apply)

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
18 tests, 18 passed, 0 warnings, 0 failures, 0 exceptions

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

Staging: rds

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 0 to add, 1 to change, 0 to destroy
Show summary
CHANGE NAME
update module.rds_cluster.aws_security_group.rds_proxy
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.rds_cluster.aws_security_group.rds_proxy will be updated in-place
  ~ resource "aws_security_group" "rds_proxy" {
        id                     = "sg-051638cd60aef88c3"
      ~ ingress                = [
          + {
              + cidr_blocks      = []
              + description      = ""
              + from_port        = 5432
              + ipv6_cidr_blocks = []
              + prefix_list_ids  = []
              + protocol         = "tcp"
              + security_groups  = []
              + self             = true
              + to_port          = 5432
            },
          - {
              - cidr_blocks      = []
              - description      = "Allow RDS cluster to receive requests from ECS"
              - from_port        = 5432
              - ipv6_cidr_blocks = []
              - prefix_list_ids  = []
              - protocol         = "tcp"
              - security_groups  = [
                  - "sg-0d1ca7e7e561a219f",
                ]
              - self             = false
              - to_port          = 5432
            },
        ]
        name                   = "saas-procurement-database_rds_proxy_sg"
        tags                   = {
            "CostCentre" = "saas-procurement"
            "Name"       = "saas-procurement-database_rds_proxy_sg"
            "Terraform"  = "true"
        }
        # (7 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
18 tests, 18 passed, 0 warnings, 0 failures, 0 exceptions

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

Staging: iam

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 0 to add, 1 to change, 0 to destroy
Show summary
CHANGE NAME
update aws_iam_policy.saas_procurement_ssm
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_iam_policy.saas_procurement_ssm will be updated in-place
  ~ resource "aws_iam_policy" "saas_procurement_ssm" {
        id          = "arn:aws:iam::394954348146:policy/saas_procurement_Ssm"
        name        = "saas_procurement_Ssm"
      ~ policy      = jsonencode(
          ~ {
              ~ Statement = [
                  ~ {
                      ~ Resource = "arn:aws:ssm:*:*:parameter/*" -> [
                          + "arn:aws:ssm:ca-central-1:394954348146:parameter/saas_app_config",
                          + "",
                        ]
                        # (3 unchanged elements hidden)
                    },
                ]
                # (1 unchanged element hidden)
            }
        )
        tags        = {
            "CostCentre" = "saas-procurement"
            "Terraform"  = "true"
        }
        # (5 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Releasing state lock. This may take a few moments...
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.saas_procurement_ecs"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.saas_procurement_task"]
WARN - plan.json - main - Missing Common Tags: ["module.attach_tf_plan_policy.aws_iam_policy.this"]

20 tests, 17 passed, 3 warnings, 0 failures, 0 exceptions

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

Staging: ecs

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

⚠️   Warning: resources will be destroyed by this change!

Plan: 1 to add, 3 to change, 1 to destroy
Show summary
CHANGE NAME
update aws_ecs_service.saas-procurement-app-service
aws_security_group.ecs_tasks
aws_security_group_rule.ecs_egress_database
recreate aws_ecs_task_definition.saas_procurement
Show plan
Resource actions are indicated with the following symbols:
  ~ update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_ecs_service.saas-procurement-app-service will be updated in-place
  ~ resource "aws_ecs_service" "saas-procurement-app-service" {
        id                                 = "arn:aws:ecs:ca-central-1:394954348146:service/saas-procurement-cluster/saas_procurement-service"
        name                               = "saas_procurement-service"
        tags                               = {
            "CostCentre" = "saas-procurement"
        }
      ~ task_definition                    = "arn:aws:ecs:ca-central-1:394954348146:task-definition/saas-procurement-task:12" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.saas_procurement must be replaced
-/+ resource "aws_ecs_task_definition" "saas_procurement" {
      ~ arn                      = "arn:aws:ecs:ca-central-1:394954348146:task-definition/saas-procurement-task:12" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:ca-central-1:394954348146:task-definition/saas-procurement-task" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [ # forces replacement
              ~ {
                  - cpu              = 0 -> null
                  - environment      = [] -> null
                  - essential        = true -> null
                  - mountPoints      = [] -> null
                    name             = "saas-procurement"
                  + secrets          = [
                      + {
                          + name      = "APPROVED_REQUEST_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "REQUEST_S32_APPROVED_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "POSTGRES_PASSWORD"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "ENVIRONMENT"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "DJANGO_SECRET_KEY"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "APPROVER_DELETE_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "SOCIAL_APPLICATION_CLIENT_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "SAAS_SUBMISSION_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "EDIT_REQUEST_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "DELETE_SAAS_REQUEST_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "SAAS_SUBMISSION_EDIT_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "DENIED_REQUEST_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "NOTIFY_URL"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "NOTIFY_API_KEY"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "APPROVAL_REQUEST_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "REQUEST_S32_DENIED_INTERNAL_OPS_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "DB_HOST"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "INTERNAL_OPS_REQUEST_MORE_INFO_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "POSTGRES_USER"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "REQUEST_S32_DENIED_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "S32_APPROVAL_REQUESTED_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "POSTGRES_DB"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "REQUEST_S32_APPROVED_INTERNAL_OPS_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "REQUESTOR_S32APPROVAL_PENDING_REVIEW_TEMPLATE_ID"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "SOCIAL_APPLICATION_SECRET_KEY"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "TESTING_FEATURE_FLAG"
                          + valueFrom = ""
                        },
                      + {
                          + name      = "SITE_ID"
                          + valueFrom = ""
                        },
                    ]
                  - volumesFrom      = [] -> null
                    # (5 unchanged elements hidden)
                } # forces replacement,
            ]
        )
      ~ id                       = "saas-procurement-task" -> (known after apply)
      ~ revision                 = 12 -> (known after apply)
      - tags                     = {} -> null
      ~ tags_all                 = {} -> (known after apply)
        # (8 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # aws_security_group.ecs_tasks will be updated in-place
  ~ resource "aws_security_group" "ecs_tasks" {
      ~ egress                 = [
          - {
              - cidr_blocks      = [
                  - "0.0.0.0/0",
                ]
              - description      = ""
              - from_port        = 0
              - ipv6_cidr_blocks = []
              - prefix_list_ids  = []
              - protocol         = "-1"
              - security_groups  = []
              - self             = false
              - to_port          = 0
            },
          + {
              + cidr_blocks      = [
                  + "0.0.0.0/0",
                ]
              + description      = null
              + from_port        = 0
              + ipv6_cidr_blocks = []
              + prefix_list_ids  = []
              + protocol         = "-1"
              + security_groups  = []
              + self             = false
              + to_port          = 0
            },
          - {
              - cidr_blocks      = []
              - description      = ""
              - from_port        = 5432
              - ipv6_cidr_blocks = []
              - prefix_list_ids  = []
              - protocol         = "tcp"
              - security_groups  = [
                  - "sg-051638cd60aef88c3",
                ]
              - self             = false
              - to_port          = 5432
            },
        ]
        id                     = "sg-0d1ca7e7e561a219f"
        name                   = "saas-procurement-security-group"
        tags                   = {
            "CostCentre" = "saas-procurement"
        }
        # (7 unchanged attributes hidden)
    }

  # aws_security_group_rule.ecs_egress_database will be updated in-place
  ~ resource "aws_security_group_rule" "ecs_egress_database" {
      + description              = "Allow ECS to talk to the RDS cluster"
        id                       = "sgrule-3706790936"
        # (8 unchanged attributes hidden)
    }

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

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Releasing state lock. This may take a few moments...
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.saas_procurement_group"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_cluster.saas_procurement"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_service.saas-procurement-app-service"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_task_definition.saas_procurement"]
WARN - plan.json - main - Missing Common Tags: ["aws_security_group.ecs_tasks"]
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_cloudwatch_log_group.sentinel_forwarder_lambda"]
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_iam_policy.sentinel_forwarder_lambda"]
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_iam_role.sentinel_forwarder_lambda"]
WARN - plan.json - main - Missing Common Tags: ["module.sentinel_forwarder.aws_lambda_function.sentinel_forwarder"]

26 tests, 17 passed, 9 warnings, 0 failures, 0 exceptions

Copy link
Collaborator

@gcharest gcharest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

2 participants