Deployment
Cloud diagrams can be deployed directly to your Cloud. This will deploy all the cloud infrastructure specified in the diagram to any of your accounts.
Configure cloud credentials
For each cloud component (i.e AWS, Azure, Google Cloud) you have specified in the diagram (you can have multiple Clouds see Multi-cloud), select a region/location and credential (see How to create credentials) to specify the Cloud account in where you want to deploy the infrastructure.
Opsly generates Terraform code based on the standard module and .tfvars structure (we don't use pre-made code), and runs terraform plan
and terraform apply
in our Google Cloud account. We have a queue that stores all the current pending deployment processes at a single point in time and it will run yours when it has an available slot (takes an average of 1-2 seconds to run). This ensures that if there are too many deployment processes pending at a single time, it will never get stuck and your process will eventually always run.
Deploy diagram
On the top right-hand corner, you can click Deploy
You need to specify a storage container in the Cloud account where we can store the Terraform state file. By default this is taken from when you configure a Credential but you can change it at this stage. This is used to track the state of your Terraform infrastructure changes (see What is a Terraform state file?).
Build
You can click on Build, Opsly generates Terraform code and runs terraform plan -var-file=input.tfvars.json
. The .tfvars
file is generated holding all the values of your infrastructure configuration. For each terraform command that runs, Vault (see How to create credentials) generates temporary access keys to connect to your Cloud and these get deleted after the deployment has finished.
The deployment log is generated in real-time and will show a green message in which you can click Deploy to deploy the infrastructure or will show a red error message with any errors in your infrastructure configuration. You can go back to your diagram and edit those properties to fix the errors.
Deploy
Click deploy and we will run terraform apply -var-file=input.tfvars.json
to deploy the cloud infrastructure into your accounts. If the deployment succeeds then you will see a green message that your infrastructure has been deployed to your cloud accounts.
Otherwise it can show errors in your cloud configuration and you need to fix these in your diagram. You can re-run build, deploy or destroy.
Destroy
Whenever you like, you can destroy all the cloud infrastructure of your diagram by clicking the Deploy button > Destroy. This will run terraform destroy -var-file=input.tfvars.json
and remove all the running infrastructure from your cloud accounts. If it fails for whatever reason, you can re-run destroy again.
Last log
For each deployment you run, you can view the latest log file by clicking on the Log button on the top right-hand corner. This can help you view any errors and modify the cloud configuration at the same time.
Auto-saving
After you make any changes to your diagram, it will save itself after 5 seconds. Otherwise you can click the Save button on the top right-hand corner.