Start Developing: Introduction
This solution will be handled using Terraform Cloud, GitHub Actions and configuration management.
Each service will be configured and delivered through the DevOps platform. These steps assume that you have a GitHub repository and Subscriptions in Microsoft Azure or Google Cloud Platform, and a corresponding managed identity with key vault.
NOTE: Seagen preferred cloud provider is always Microsoft Azure.
How to Get Started
Using the Terraform Registry for Azure, find the module that you need to create your cloud resource
Create a repository in GitHub and add a ‘terraform’ folder in the repository
Checkout the repository from GitHub into your environment using VS Code or your IDE
Create a branch from the repository ‘main’ branch
Create a folder per resource that you will deliver to the cloud. Each resource should be independently deployable.
Copy the
main.tf
andvariables.tf
files from the registry into the'terraform/<resourcetype>'
folder in your branchnote if you have 5 resources being deployed, you will have 5 folders, one for each resource
Change the configuration of the
main.tf
and update thevariables.tf
files for each resourceEnsure you have a Key Vault that has access to your subscription (see above)
Assign any keys to the Key Vault using a consistent naming convention. Not using a Key Vault will fail your builds.
Write some unit tests to evaluate the health of your resource after it deploys to Azure. All code should have some tests.
After configuration, create a pull request for your changes.
A reviewer evaluates the pull request and either requests changes or approves it
Once the build compiles and runs, it will merge your changes into the main branch and deploy the resource(s)
Terraform will evaluate the .tf files for consistency and syntax and either pass or fail the pipeline
Next, Terraform triggers GitHub Actions which scan your code for credentials, vulnerabilities, security holes, etc.
Note that any Critical or High vulnerabilities will fail your build. Use Snyk to understand what needs to happen to fix the code and remediate the issue.
If everything passes, the pipeline runs and delivers your code to the cloud.
You can choose to keep your branch or discard it.
For other changes, every time you create a pull request, your changes will build, the pipeline will run, scans, tests, and verification steps run and the resources delivered to the cloud.