pacbot icon indicating copy to clipboard operation
pacbot copied to clipboard

Terraform Plan / Terraform Apply Workflow -- Automated Build for Infra

Open jonshern opened this issue 8 years ago • 6 comments

Thanks for the great project

Would love to be able to just run terraform plan and terraform apply and set some variables Seems like the folder could be modules with a just a main.tf that calls the modules.

Right now it is difficult to see what is being created. Also because each folder has a state file, a build process would need to store them in separate folders. Which would be unique to this particular build.

The idea would be to have an automated build, and as part of that approve the infra changes.

jonshern avatar Oct 14 '18 11:10 jonshern

Hey @jonshern ,

We have already started working on this and hopefully by next release that will be rolled out.

johnakash avatar Oct 14 '18 23:10 johnakash

Oh sweet

So are you creating an automated build. We have terraform for codepipeline that we could probably to the repo. Regarding the python + terraform. Are you using the python generate a few of tf blocks a bunch of times? If so how do plan on seeing the plan? My two cents

  1. Bash script that executes a python script to do any of the generation.
  2. Run terraform and that should essentially contain all of the tf.
  3. One state file
  4. Python to do the app deploy

I started on this flow The reason it mattered was I wanted to see all of resources that are going to be created before we deploy into an enterprise

Get Outlook for Androidhttps://aka.ms/ghei36


From: Akash John [email protected] Sent: Sunday, October 14, 2018 6:00:17 PM To: tmobile/pacbot Cc: Jon Shern; Mention Subject: Re: [tmobile/pacbot] Terraform Plan / Terraform Apply Workflow -- Automated Build for Infra (#14)

Hey @jonshernhttps://github.com/jonshern ,

We have already started working on this and hopefully by next release that will be rolled out.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/tmobile/pacbot/issues/14#issuecomment-429670727, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABNMeJaeLZI6BIkD-GYltSrFQ1qB9R8Uks5uk8IBgaJpZM4XbFd6.

jonshern avatar Oct 15 '18 00:10 jonshern

Hello @jonshern We already started making changes on install script. In the newer version, Python will be used to drive the setup by doing validations, creating classes for each TF resource and generate terraform files from these classes then setup the infra. We will be releasing the newer version of installer script soon.

sajeer-nooh avatar Oct 15 '18 09:10 sajeer-nooh

That is great news As part of this workflow i think it would be nicer to just use the credentials that are configured in the AWS Cli. If you use the default credentials or a profile. It will make the process of automating more straightforward.

jonshern avatar Oct 15 '18 15:10 jonshern

Part of this workflow should be to use remote state.

jonshern avatar Oct 23 '18 13:10 jonshern

@jonshern , We have covered all your suggestions in the latest release. Please have a look.

johnakash avatar Feb 04 '19 03:02 johnakash