Cloudformation bulk import onto SG Platform#12
Conversation
|
@rixhieloomis Please create a README for the users. Also edit main README.md to add this new transformer. Currently the main docs are only about Terraform Cloud, fix it to include the Cloudformation as well. |
|
|
||
| - An organization on [StackGuardian Platform](https://app.stackguardian.io) | ||
| - Optionally, pre-configure VCS, cloud integrations or private runners to use when importing into StackGuardian Platform. | ||
| - Terraform |
There was a problem hiding this comment.
Please add "AWS account with adequate access where CloudFormation stacks are maintained."
| ```shell | ||
| cd transformer/terraform-cloud | ||
| terraform init | ||
| terraform apply -target=null_resource.get_stack_names |
There was a problem hiding this comment.
Comment what this and the next command does
| @@ -0,0 +1,92 @@ | |||
| locals { | |||
transformer/cloudformation/main.tf
Outdated
| @@ -0,0 +1,5 @@ | |||
| provider "aws" { | |||
| region = "eu-central-1" # Change to your desired AWS region | |||
There was a problem hiding this comment.
Change to your desired AWS region, where Cloudformation stacks are maintained.
| resource "null_resource" "get_stack_names" { | ||
| provisioner "local-exec" { | ||
| command = <<-EOT | ||
| aws cloudformation describe-stacks --query 'Stacks[*].{Name:StackName}' --output json > stack_names.json |
There was a problem hiding this comment.
Are you cleaning up this file after successful or failed execution?
|
|
||
| bucket = var.s3Bucket | ||
| key = "${var.s3_path}/${each.key}.yaml" | ||
| content = each.value.template_body |
There was a problem hiding this comment.
User might want to pass encryption info as well. Please create a task for working on it later.
README.md
Outdated
| - Choose the transformer and locate the example of `terraform.tfvars.example` and rename it to `terraform.tfvars`. | ||
| - Edit terraform.tfvars with appropriate variables. | ||
| - Run the following commands: | ||
| - Run the following commands mentioned in the README.md file in the transformer. |
There was a problem hiding this comment.
Run the commands mentioned in the README.md file in the transformer.
README.md
Outdated
| - Choose the transformer and locate the example of `terraform.tfvars.example` and rename it to `terraform.tfvars`. | ||
| - Edit terraform.tfvars with appropriate variables. | ||
| - Run the following commands: | ||
| - Run the following commands mentioned in the README.md file in the transformer. |
There was a problem hiding this comment.
Add a link to each provider docs
README.md
Outdated
| @@ -5,6 +5,7 @@ Migrate workloads from other platforms to [StackGuardian Platform](https://app.s | |||
| ## Supported platforms for migration | |||
|
|
|||
| - Terraform Cloud | |||
There was a problem hiding this comment.
Add link to the readmes of each providers
No description provided.