remote state with Jenkins

115 views
Skip to first unread message

Prakash Pagare

unread,
Dec 29, 2016, 4:22:04 AM12/29/16
to Terraform
Hello All,

How to achieve S3 Managed terraform remote state along with Jenkins ?

Thanks,

Lowe Schmidt

unread,
Dec 29, 2016, 5:45:15 AM12/29/16
to terrafo...@googlegroups.com
What have you tried and what didn't work ?

--
Lowe Schmidt | +46 723 867 157

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/57ae1edc-f6a0-4f48-bd68-4923a8159cef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prakash Pagare

unread,
Dec 29, 2016, 8:14:45 AM12/29/16
to Terraform
I have somehow got it working, I am putting below the steps, BUT I am not sure if this the right way to do this. Please suggest..

I followed the official documentation of terraform (https://www.terraform.io/docs/state/remote/s3.html). 
1. I have datasource "terraform_remote_state" in my main.tf file. 
2. Now I believe It is required to run the terraform remote config command to enable remote state.
3. In Jenkins job, I execute my main.tf file using Terraform plugin configuration, and later in same job I also used a Build action to 'Execute shell' to run terraform remote config command. Now I see there is a .state file copied to S3.


Thanks,

On Thursday, December 29, 2016 at 4:15:15 PM UTC+5:30, Lowe Schmidt wrote:
What have you tried and what didn't work ?

--
Lowe Schmidt | +46 723 867 157

On 29 December 2016 at 10:22, Prakash Pagare <prakash...@gmail.com> wrote:
Hello All,

How to achieve S3 Managed terraform remote state along with Jenkins ?

Thanks,

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages