justicecorp / CRC_Prod

Finalized version of the Cloud Resume Challenge for AWS repo
0 stars 0 forks source link

Can't delete dev deployment currently because of OIDC issues #94

Closed justice5696 closed 11 months ago

justice5696 commented 11 months ago

When I call my reusable workflow to destroy Dev, it runs in the 'main' branch context - the main branch cannot authenticate to the dev tenant and thus cannot delete the dev tenant

Need to figure out if I can invoke my reusable workflow in the context of the 'test' tenant

justice5696 commented 11 months ago

Even when I change the syntax

It still runs in the context of the main branch (it uses the files from the Test branch, but the GHA Run is in the context of the main branch). A print of the context info shows this: Github.ref = refs/heads/main Github.ref_name = main

justice5696 commented 11 months ago

Ultimately modifying my GitHub Actions role in the AWS Dev tenant was the workaround - had to make it so that the main and Test branches can authenticate to AWS Dev tenant. Now the main branch workflow can run the reusable workflow to delete the Dev deployment