I want to create and manage AWS Workspace with terraform.
I have searched the Terraform documentation. But, I cannot find any documentation or sample codes.
The support for AWS Workspace in terraform is still a work in progress. You can track the progress on the github issue.
From the looks of it, there are no API calls yet from AWS
AWS still hasn't provided any API functionality to register a
directory for workspaces making this impossible. Been following this
https://forums.aws.amazon.com/thread.jspa?threadID=237801 which AWS
has stated there is no ETA.
Related
I am migrating my deployment from Jenkins to GitHub Actions.
I understand how to pull from my repository, build, test my application.
But one of the steps I currently perform inside of Jenkins is to update my infrastructure using Terraform. This means the code has to run on an instance running in my AWS environment.
How is this possible when using GitHub Actions?
I prefer Self-host runner environment to default runners of GitHub Actions.The simple reason is security issues that arise with default runners,you must provide them AWS Secret Access Keys and IDs.This is the excellent module terraform-aws-github-runner that I used for my project.
You can setup AWS Access using AWS Credentials Configure action. You can use these credentials to run a SSM document for your instances through the GitHub Actions workflow either via the AWS CLI or a script in your repository. SSM documents run directly on the instances.
I am building a small server-less application on aws. It is a SaaS for business purposes so I am looking at ways to cater for multi-tenancy.
So far my proof-of-concepts have been single tenant and deployed via terraform.
I am thinking of using the Terraform Cloud Workspace API to create a workspace for each tenant on sign up. The work spaces would be configured to auto-apply from my production github branch.
I'm concerned that this isn't the intended usage of Terraform Cloud and that I may run into issues as the application scales.
Does anyone have any insight into the upper-limits of Terraform Cloud? I have read through some of Hashicorp's documentation but I can't find anything specific to this.
I have few resources in AWS which are launched using Terraform and some of them are manual create using AWS console. Some of the resources are launched using Cloudformation template.
I know Cloudformation designer gives you visualization of cloudformation templates. Terraform graph can provide dependent resources diagram too.
But can any service within AWS provide complete architecture and resources and dependencies for all resources launched either via CFT, Terraform or manual launch?
any service within AWS provide
There is no such AWS service or tool. There used to be AWS CloudFormer which could help a bit with this, but its not maintained any more.
Instead, as indicated in comments, you could use former2 which is a third party tool. former2 does not generate visualizations, but can reveres-engineer CFN templates from existing resources. Once having these templates you can try CFN designer to visualize them.
We currently use terraform to provision and tear down infrastructure in Softlayer. However we want to reuse monthly hardware for reprovisioning rather than a complete teardown/reprovision. Is this possible using Terraform? Does the Softlayer or IBM Cloud Provider for terraform support OS-reloading?
Thank you!
Reference: https://ibm-cloud.github.io/tf-ibm-docs/v0.12.0/r/compute_vm_instance.html
It seems that the terraform does not support OS-reloading yet, there is already a issue posted in the terraform GitHub issues. You can see it in the following link:
https://github.com/IBM-Cloud/terraform-provider-ibm/issues/278
You can check the link below may be it help you with your request because it using terraform with rest api calls:
Terraform REST API calls with cURL
I have a wonderful terraform plan that perfectly describes my infrastructure in Google Cloud Platform, however, I have a problem: since my repository isn't perfectly private, some steps of my plan are encrypted and must be decrypted using Google Key Management Service.
This means my plan must be broken down into two terraform phases:
Setup the Google Cloud Project and create a Key Ring and Key (after this, I encrypt secrets and put them in a variables.tf file)
Apply the entire plan.
Does Terraform support a way to break down my plan into phases? How should I go around implementing this?
Though terraform enables us to automate the resources creation, some preliminary steps need to be done manually, like account creation, billing setup, etc. Similarly for Google cloud setup, the project needs to be created prior running terrform scripts since terraform google provider requires the project details.
The project creation and terraform variables for the keys (as environment variables) can be generated through shell scripts. Then the shell script and the terraform scripts can be sequenced in execution using a make file.
The below link might be helpful for you to create GCP project through shell scripts.
https://medium.com/google-cloud/how-to-automate-project-creation-using-gcloud-4e71d9a70047