Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Upgrade to Terraform 0.13 #824

Merged
merged 5 commits into from
Oct 13, 2020
Merged

Upgrade to Terraform 0.13 #824

merged 5 commits into from
Oct 13, 2020

Conversation

invidian
Copy link
Member

@invidian invidian commented Aug 21, 2020

NOTE: Includes commits from #860.

NOTE: Includes changes from #1027

Closes #788

Signed-off-by: Mateusz Gozdek mateusz@kinvolk.io

@invidian
Copy link
Member Author

From testing on Packet, it seems following string must be added to the Terraform code to get things working:

$ git diff
diff --git a/pkg/platform/packet/template.go b/pkg/platform/packet/template.go
index 6c7ea543..b449f8dd 100644
--- a/pkg/platform/packet/template.go
+++ b/pkg/platform/packet/template.go
@@ -287,4 +287,15 @@ output "lokomotive_values" {
   value     = module.packet-{{.Config.ClusterName}}.lokomotive_values
   sensitive = true
 }
+
+terraform {
+  required_version = ">= 0.13.0"
+
+  required_providers {
+    packet = {
+      source  = "terraform-providers/packet"
+      version = "~> 2.7.3"
+    }
+  }
+}
 `

Note, that we render the terraform {} block together with backend settings, which probably means we should have some data structure containing list of providers which are available from Platform interface, so they can be rendered centrally. Or Platform interface should be able to emit the snippet to terraform {} block. CC @johananl

@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch from ef58fd3 to cf98394 Compare August 26, 2020 09:38
@invidian invidian requested a review from pothos as a code owner August 26, 2020 09:38
@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch 2 times, most recently from 5222ea2 to 7100402 Compare August 26, 2020 13:35
@invidian invidian added the area/dependency-update To label pending updates of upstream projects label Aug 28, 2020
@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch 3 times, most recently from 67c66b9 to 84391ac Compare September 28, 2020 14:36
@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch from 84391ac to 67fdddc Compare October 1, 2020 09:16
@invidian
Copy link
Member Author

invidian commented Oct 1, 2020

Rebased to include #1021, so CI can pass.

Copy link
Member

@knrt10 knrt10 left a comment

Choose a reason for hiding this comment

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

Rest looks great

@invidian
Copy link
Member Author

invidian commented Oct 5, 2020

Ah, forgot to mention. This PR includes #1027, so #1027 should get merged first.

@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch from 67fdddc to 935b0b8 Compare October 5, 2020 07:40
@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch from 935b0b8 to 491affc Compare October 5, 2020 09:55
@invidian invidian requested a review from knrt10 October 5, 2020 14:36
knrt10
knrt10 previously approved these changes Oct 5, 2020
Copy link
Member

@knrt10 knrt10 left a comment

Choose a reason for hiding this comment

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

looks great

@surajssd
Copy link
Member

The code looks ok to me, @invidian could you rebase and trigger the CI once more?

@invidian
Copy link
Member Author

@surajssd this is already based on latest master. I try to restart AKS job now..

@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch from 84549f5 to 8946a7c Compare October 12, 2020 14:26
@invidian
Copy link
Member Author

Well, re-pushed anyway, as CI seems to got stuck somehow

@invidian invidian requested review from knrt10 and removed request for pothos and mauriciovasquezbernal October 12, 2020 19:04
@invidian invidian force-pushed the invidian/terraform-0-13-upgrade branch from 8946a7c to 0672a10 Compare October 12, 2020 19:56
@knrt10
Copy link
Member

knrt10 commented Oct 13, 2020

Restarted failed aks and packetARM pipelines

knrt10
knrt10 previously approved these changes Oct 13, 2020
This module does not use this provider, so it shouldn't decide on
provider version to use.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Closes #1022

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Closes #788

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
As it is more idiomatic than using Sscanf. '-json' parameter is a new
option added in Terraform 0.13.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
@invidian invidian merged commit 60238e3 into master Oct 13, 2020
@invidian invidian deleted the invidian/terraform-0-13-upgrade branch October 13, 2020 13:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/dependency-update To label pending updates of upstream projects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Terraform 0.13
3 participants