generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from CDCgov/add-other-environments
Add Internal and Dev Environments
- Loading branch information
Showing
8 changed files
with
116 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Deploy to Dev Environment | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
terraform-deploy: | ||
name: Dev Infrastructure Deploy | ||
uses: ./.github/workflows/terraform-deploy_reusable.yml | ||
with: | ||
ENVIRONMENT: dev | ||
TERRAFORM_DIRECTORY: operations/environments/dev | ||
secrets: | ||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CDC_CLIENT_ID }} | ||
AZURE_TENANT_ID: ${{ secrets.AZURE_CDC_TENANT_ID }} | ||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_CDC_DMZ_C1_SUBSCRIPTION_ID }} | ||
|
||
dev-deploy: | ||
name: Dev Application Deploy | ||
needs: terraform-deploy | ||
uses: ./.github/workflows/deploy_reusable.yml | ||
with: | ||
ENVIRONMENT: dev | ||
REPO: report-stream-sftp-ingest | ||
APP: ${{ needs.terraform-deploy.outputs.APP }} | ||
REGISTRY: ${{ needs.terraform-deploy.outputs.REGISTRY }} | ||
secrets: | ||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CDC_CLIENT_ID }} | ||
AZURE_TENANT_ID: ${{ secrets.AZURE_CDC_TENANT_ID }} | ||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_CDC_DMZ_C1_SUBSCRIPTION_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Deploy to Internal Environment | ||
|
||
on: | ||
push: | ||
branches: | ||
- internal | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
terraform-deploy: | ||
name: Internal Infrastructure Deploy | ||
uses: ./.github/workflows/terraform-deploy_reusable.yml | ||
with: | ||
ENVIRONMENT: internal | ||
TERRAFORM_DIRECTORY: operations/environments/internal | ||
secrets: | ||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | ||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | ||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
|
||
internal-deploy: | ||
name: Internal Application Deploy | ||
needs: terraform-deploy | ||
uses: ./.github/workflows/deploy_reusable.yml | ||
with: | ||
ENVIRONMENT: internal | ||
REPO: report-stream-sftp-ingest | ||
APP: ${{ needs.terraform-deploy.outputs.APP }} | ||
REGISTRY: ${{ needs.terraform-deploy.outputs.REGISTRY }} | ||
secrets: | ||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | ||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | ||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
terraform { | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "3.103.1" | ||
} | ||
} | ||
|
||
# Use a remote Terraform state in Azure Storage | ||
backend "azurerm" { | ||
resource_group_name = "cdcti-terraform" | ||
storage_account_name = "cdctiterraform" | ||
container_name = "tfstate" | ||
key = "rs-sftp-internal.terraform.tfstate" | ||
} | ||
} | ||
|
||
# Configure the Microsoft Azure Provider | ||
provider "azurerm" { | ||
features { | ||
key_vault { | ||
purge_soft_deleted_secrets_on_destroy = false | ||
} | ||
} | ||
} | ||
|
||
module "template" { | ||
source = "../../template/" | ||
|
||
environment = "internal" | ||
deployer_id = "d59c2c86-de5e-41b7-a752-0869a73f5a60" //github app registration in Flexion Azure Entra | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
output "registry" { | ||
value = module.template.registry | ||
} | ||
|
||
output "publish_app" { | ||
value = module.template.publish_app | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters