Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform-boot new destroy service with script file contents in request body #804

Closed
9 tasks done
swaroopar opened this issue Aug 25, 2023 · 1 comment · Fixed by eclipse-xpanse/terraform-boot#11
Closed
9 tasks done
Assignees
Labels
enhancement New feature or request terraform-boot

Comments

@swaroopar
Copy link
Contributor

swaroopar commented Aug 25, 2023

  • rename existing destroy service as destroyFromDirectory
  • rename existing data model - TerraformDestroyRequest to TerraformDestroyFromDirectoryRequest
  • create new service 'destroyWithScripts' with new data model TerraformDestroyWithScriptsRequest -> with similar data model as before. but additionally have 'files' as below.
             {
                "scripts":[
                   {
                      "script":"dffdfdfdfdfdfdfdfd"
                   },
                   {
                      "script":"dffdfdfdfdfdfdfdfd"
                   },
                   {
                      "script":"dffdfdfdfdfdfdfdfd"
                   }
                ],
               "tfState": "edfdgfdgasdgdfgfddfd"
             }
    
  • create a random directory under terraform.root.module.directory folder.
  • create files with random file names with '.tf' extension for each of the script in the scripts list.
  • create tfstate file using the contents from 'tfState' field.
  • Then execute the terraform command.
  • Extend TerraformResult data model to have a new optional field 'terraformState'. In case of TerraformDeployWithScriptsRequest method, the tfstate file contents from the workspace directory and return in the new field.
  • Service must be offered as both sync and async.
@swaroopar swaroopar moved this to Planned in xpanse Aug 25, 2023
@swaroopar swaroopar added enhancement New feature or request terraform-boot labels Aug 25, 2023
@WangLiNaruto
Copy link
Contributor

let me do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request terraform-boot
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants