Skip to content

Allow to configure Terraform State#2438

Merged
sachilles merged 4 commits intosameersbn:masterfrom
peter-jozsa:allow-to-config-terraform-state
Apr 22, 2022
Merged

Allow to configure Terraform State#2438
sachilles merged 4 commits intosameersbn:masterfrom
peter-jozsa:allow-to-config-terraform-state

Conversation

@peter-jozsa
Copy link
Contributor

@peter-jozsa peter-jozsa commented Oct 20, 2021

The goal of this PR is to introduce new configuration variables for Terraform State management feature of GitLab. The new params let users:

  • enable/disable Terraform State management
  • override the default local storage path
  • enable/disable Object Store for terraform states
  • setup an AWS bucket for Object Store
  • setup a GCS bucket for Object Store

@peter-jozsa
Copy link
Contributor Author

@sachilles @sameersbn is there any chance this PR will be accepted in the near future?

@sachilles
Copy link
Collaborator

@peter-jozsa I think so. But I'll need some time to understand the details in your PR (and get warm with Terraform).

@sachilles
Copy link
Collaborator

@peter-jozsa Sorry for my late reply. I will include your PR before the #2465 . However, I will not be able to check it until the weekend or next week.

@peter-jozsa
Copy link
Contributor Author

alright, thank you! anyway in the end we ended up not using terraform state management but we are planning to use it in the near future

@sachilles
Copy link
Collaborator

Hi, I think that for now I will rather update GitLab to stay up to date with the upstream.

@ymazzer
Copy link
Contributor

ymazzer commented Jan 18, 2022

Hi, this feature would be wonderful for people using terraform.

As of now, the state is stored using the tmp local folder which does not seem very safe.

Any change to merge it soon? Or at least to change default terraform state storage location to something like /home/git/data/terraform_state?

@paolomainardi
Copy link
Contributor

Hi everyone, @sachilles are there any chances to have this one merged ?

@peter-jozsa peter-jozsa force-pushed the allow-to-config-terraform-state branch from a9f0df2 to 06cbb56 Compare April 11, 2022 09:36
@peter-jozsa
Copy link
Contributor Author

hi 👋
I rebased my modifications on current master. Hopefully we can speed things up here.

@peter-jozsa peter-jozsa force-pushed the allow-to-config-terraform-state branch from bd655de to 82e88ff Compare April 11, 2022 10:14
@paolomainardi
Copy link
Contributor

thanks a lot @peter-jozsa

@sachilles
Copy link
Collaborator

Hi,

I'll do my very best to understand the terraform configuration.

@Syphon83
Copy link
Contributor

Hi,

I'll do my very best to understand the terraform configuration.

This feature would be great!
Terraform files should follow the same flow for the objects storage as uploads or artifacts files.

Hope to see this merged soon! Thank you for your work!

@paolomainardi
Copy link
Contributor

@sachilles are we still in time to have this one merged before 14.10 ?

@paolomainardi
Copy link
Contributor

@sachilles sorry for chasing, are you planning to merge this one for the next release ?

@sachilles
Copy link
Collaborator

Hi, I'm planning to merge this PR.

Please be patient. I think I will get to the final review tonight.

Copy link
Collaborator

@sachilles sachilles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this very valuable post and sorry for the long wait (and subsequent rework). Nevertheless, could you include the small changes in the documentation?


##### `GITLAB_TERRAFORM_STATE_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE`

Changes AWS Path Style to 'host/bucket_name/object' instead of 'bucket_name.host/object'. Defaults to `AWS_PATH_STYLE`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change AWS_PATH_STYLE to $AWS_PATH_STYLE

README.md Outdated

##### `GITLAB_TERRAFORM_STATE_OBJECT_STORE_CONNECTION_PROVIDER`

Connection Provider for the Object Store. (`AWS` or `Google`) Defaults to `$GITLAB_OBJECT_STORE_CONNECTION_PROVIDER` (`AWS`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this sentence to:

Connection Provider for the Object Store (AWS or Google). Defaults to $GITLAB_OBJECT_STORE_CONNECTION_PROVIDER (i.e. AWS).

Add proposed changes (see sameersbn#2438).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants