Skip to content

Deploy Airflow DAGs after OGC API deployment is complete #422

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

nikki-t
Copy link
Collaborator

@nikki-t nikki-t commented Jun 10, 2025

Purpose

  • Register Airflow DAGs (OGC Processes) after the SPS deployment is complete.

Proposed Changes

  • [ADD] null_resource Terraform resource that executes the modified post_deployment_terraform.sh to deploy DAGs after the OGC API has been successfully deployed.

Issues

  • #410 - [New Feature]: Register DAGs upon SPS deployment

Testing

  • Executed Terraform on local laptop and confirmed the DAGs were deployed to the nikki-3 deployment on unity-venue-dev.

Pending question

Do we want to trigger the DAG deployment everytime we run terraform?

@nikki-t nikki-t requested a review from LucaCinquini June 10, 2025 18:22
@nikki-t nikki-t self-assigned this Jun 10, 2025
Copy link
Collaborator

@LucaCinquini LucaCinquini left a comment

Choose a reason for hiding this comment

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

@nikki-t : I think it would be better to not add new variables in .tfvars, but instead read those values from these SSM parameters:

/sps/processing/workflows/unity_username
/sps/processing/workflows/unity_password
/sps/processing/workflows/unity_client_id

The last parameter key/value does not currently exists - I just created that for the unity-dev-venue. But we could ask @jl-0 to create it manually together with the other "/sps/processing/" parameters?

@LucaCinquini
Copy link
Collaborator

You could also create those values manually for now in unity-venue-test and unity-venue-prod

@LucaCinquini
Copy link
Collaborator

I get these errors when trying to deploy:
unity-sps-initiators.module.unity_initiator.aws_lambda_event_source_mapping.initiator_queue_event_source_mapping: Creation complete after 25s [id=4b0f5bf1-1ee1-47a9-804c-f095357f3c55]

│ Error: Incorrect attribute value type

│ on modules/terraform-unity-sps-ogc-processes-api/main.tf line 517, in resource "null_resource" "register_ogc_processes":
│ 517: environment = {
│ 518: OGC_PROCESSES_API = nonsensitive(aws_ssm_parameter.ogc_processes_api_url.value)
│ 519: TOKEN_URL = "https://cognito-idp.${local.region}.amazonaws.com"
│ 520: UNITY_CLIENTID = data.aws_ssm_parameter.unity_client_id
│ 521: UNITY_PASSWORD = data.aws_ssm_parameter.unity_password
│ 522: UNITY_USERNAME = data.aws_ssm_parameter.unity_username
│ 523: }
│ ├────────────────
│ │ data.aws_ssm_parameter.unity_client_id is object with 8 attributes
│ │ data.aws_ssm_parameter.unity_password is object with 8 attributes
│ │ data.aws_ssm_parameter.unity_username is object with 8 attributes
│ │ local.region is "us-west-2"

│ Inappropriate value for attribute "environment": element "UNITY_CLIENTID": string required.

(.venv) cinquini@MT-509305 unity-sps %

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