From b54867290b63b4111e0b8be26a28b853f8e9a428 Mon Sep 17 00:00:00 2001 From: Till Kuhn Date: Thu, 23 May 2024 09:59:24 +0200 Subject: [PATCH] switch to opentofu --- .github/workflows/terraform.yml | 14 +-- go/imagine/go.sum | 20 +--- terraform/.terraform.lock.hcl | 177 ++++++++++++++------------------ terraform/Makefile | 35 ++++--- 4 files changed, 107 insertions(+), 139 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 7fa62d52..74ec7f3f 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -28,10 +28,12 @@ jobs: aws-region: eu-central-1 - name: Setup Terraform - uses: hashicorp/setup-terraform@v3 + #uses: hashicorp/setup-terraform@v3 + uses: opentofu/setup-opentofu@v1 with: # align with terraform/versions.tf - terraform_version: "~> 1.7" + #terraform_version: "~> 1.7" + tofu_version: "~> 1.7" - name: Cache Terraform workdir uses: actions/cache@v4 @@ -60,10 +62,10 @@ jobs: - name: Build with Terraform working-directory: ./terraform run: | - terraform version - terraform init -backend=false - terraform fmt -check - terraform validate -no-color + tofu version + tofu init -backend=false + tofu fmt -check + tofu validate -no-color - name: Publish Action Event if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main diff --git a/go/imagine/go.sum b/go/imagine/go.sum index b58d13e9..9325420c 100644 --- a/go/imagine/go.sum +++ b/go/imagine/go.sum @@ -44,8 +44,6 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/aws/aws-sdk-go v1.51.13 h1:j6lgtz9E/XFRiYYnGNrAfWvyyTsuYvWvo2RCt0zqAIs= -github.com/aws/aws-sdk-go v1.51.13/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go v1.51.25 h1:DjTT8mtmsachhV6yrXR8+yhnG6120dazr720nopRsls= github.com/aws/aws-sdk-go v1.51.25/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -58,8 +56,6 @@ github.com/cdfmlr/ellipsis v0.0.1/go.mod h1:hulYx9m/7Edoo2AkRzkJ/YPDlLB45BgjitI3 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -75,8 +71,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dhowden/tag v0.0.0-20240122214204-713ab0e94639 h1:U3nSi6C8fCzav9CPYMC4SMSRW8HivuqENikr2aFT+yI= -github.com/dhowden/tag v0.0.0-20240122214204-713ab0e94639/go.mod h1:Z3Lomva4pyMWYezjMAU5QWRh0p1VvO4199OHlFnyKkM= github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8 h1:OtSeLS5y0Uy01jaKK4mA/WVIYtpzVm63vLVAPzJXigg= github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8/go.mod h1:apkPC/CR3s48O2D7Y++n1XWEpgPNNCjXYga3PPbJe2E= github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= @@ -220,7 +214,6 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= @@ -272,8 +265,6 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1: github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -281,8 +272,6 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw= -github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -291,8 +280,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/prometheus/procfs v0.14.0 h1:Lw4VdGGoKEZilJsayHf0B+9YgLGREba2C6xr+Fdfq6s= github.com/prometheus/procfs v0.14.0/go.mod h1:XL+Iwz8k8ZabyZfMFHPiilCniixqQarAy5Mu67pHlNQ= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= @@ -328,8 +315,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tillkuhn/angkor/go/topkapi v0.0.0-20240402214223-eb2764e16c74 h1:lNaivjGe1JnPfBDN8/InM0tAmUeM8TxCbAX8gzj+qOc= -github.com/tillkuhn/angkor/go/topkapi v0.0.0-20240402214223-eb2764e16c74/go.mod h1:yA5tbO/Q25N2nJHqqEHraAbZnLJOkJaXV44p0DvyrZg= github.com/tillkuhn/angkor/go/topkapi v0.0.0-20240412065419-6184e1c3d2e7 h1:ROP0Df22b66ayPLsKUrhEIv2faLuSr8w0r5CVAkpyug= github.com/tillkuhn/angkor/go/topkapi v0.0.0-20240412065419-6184e1c3d2e7/go.mod h1:yA5tbO/Q25N2nJHqqEHraAbZnLJOkJaXV44p0DvyrZg= github.com/urfave/cli/v2 v2.11.0/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= @@ -353,6 +338,7 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -368,7 +354,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= @@ -444,7 +429,6 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= @@ -467,7 +451,6 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -520,7 +503,6 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl index 586df398..57611488 100644 --- a/terraform/.terraform.lock.hcl +++ b/terraform/.terraform.lock.hcl @@ -1,29 +1,29 @@ -# This file is maintained automatically by "terraform init". +# This file is maintained automatically by "tofu init". # Manual edits may be lost in future updates. -provider "registry.terraform.io/confluentinc/confluent" { - version = "1.72.0" +provider "registry.opentofu.org/confluentinc/confluent" { + version = "1.73.0" constraints = "~> 1.23, ~> 1.30, ~> 1.53" hashes = [ - "h1:d2skGV9tI7RNU1HAGsSKPPiqPZnKBOAbaDJiRLC76kc=", - "zh:0614da2322f461a40108c639387d54681f360fb4feeab194e9b0e6106a98e79c", - "zh:3623ee80b45391fb7dbcbf5405d81bf5c3cf26a0b52c98cced5008526e156e8b", - "zh:41e303806da7de154d36afcaaecf6187652791352315690856f9c5b270d9d782", - "zh:42adaa0542b8e17db54c270a4fcf3ee0eadc79f30fcfb7d37298a5abda229820", - "zh:4eb30f807b3e7cecb1159b00f90a9379157049494dfb88319772caa7d9e1a239", - "zh:897ea8d8e7a705cb7031d02cfe447b22e8870447b678b37804070060ec56a184", - "zh:bafa8d8991e74090af578e7d7b4111eb5108b00b6635fb6771e9b31f950f01d8", - "zh:bf927ed7ba05a201c737a73796652e04ebe091138e22ecf88eb8caf377cb5443", - "zh:c9d707b2b22ef1c8aa2637ab594e2d409588195cd6d7003305f4b676f8c13eef", - "zh:d651f113df48ae39592ceef542e94b6dad6b0d00f4959a1ab30203991c61e1fc", - "zh:d7de49dc0cd669712a922133f2c79283b87ca03c4abfadef0008a8a0f41d4c6d", - "zh:e21184c50b8e74ae675377548afb26e91a5d6b4a0579dbe14b327a8f56666946", - "zh:f64569cb9c845facc0c60532bafea01351e366d103c3903c1a74f8c1a14aa79a", - "zh:fb15c4fd5396cfdd696e8e72877c724bc9c3312af9d22d87498e6b47f24f3884", + "h1:fxzJS3e9hQdP6oKDmn2QklI20US8iGUCxmPrPi5VSkI=", + "zh:1e12261ce2b6e7ec18a7d2e004d9ddad9f663ff732bdda4de73449ad0e2181ab", + "zh:2822b374b230cf03156fcbb29b0cabb84e20343e742c279398dd56001cef4350", + "zh:2ac58b642f9cfa2739c34e2e5e2f9bfeddcd30b54d9dbe1b85048733aa1d0c67", + "zh:2f98124befd73151bdcb6826df73526b3ecb956d7d407a2351e53604775d7ca8", + "zh:56856d4bc987bb8f3c6a09413bc63d4f3feacb6bf57409986923fdd9b804a66d", + "zh:5c3b0a6c422e485d9e107af4a28188b920d8b3192aa44589c0735e0defc78ecf", + "zh:75e6595dd480712e97dac8aca451b5d93d0e1514d5a5184ee9905e0bcde3cc2a", + "zh:8671165f239d2bc858ebef6e6d7d40e09ba79b335c94859344f74dcccc90153c", + "zh:88ba97fe980f6fe8e87b89e5e87d2a332565f1107c0fe03f08b410c063064e7d", + "zh:9a0f547f070dede52cdc880dd5683ca84d4bac5e223bd734bda8a3c40ab72f16", + "zh:ba838474ad534877bcbcde6532f986d8af8d20f7c8998be927913677fe289fb8", + "zh:d279669d3611671bdabcbe41408a465a7e147706a24a5e8668e6e0265583d05a", + "zh:d96556ec64e5491624c103072dd1839d78c66f8523710b1377e2393e8cedba23", + "zh:fa115aaa1ce34563bed61315e4872ff38829e2dc956d905e1b1d86ce8e21b4a2", ] } -provider "registry.terraform.io/grafana/grafana" { +provider "registry.opentofu.org/grafana/grafana" { version = "2.18.0" constraints = "~> 2.11" hashes = [ @@ -45,110 +45,91 @@ provider "registry.terraform.io/grafana/grafana" { ] } -provider "registry.terraform.io/hashicorp/aws" { +provider "registry.opentofu.org/hashicorp/aws" { version = "5.46.0" constraints = "~> 5.13" hashes = [ - "h1:d0Mf33mbbQujZ/JaYkqmH5gZGvP+iEIWf9yBSiOwimE=", - "zh:05ae6180a7f23071435f6e5e59c19af0b6c5da42ee600c6c1568c8660214d548", - "zh:0d878d1565d5e57ce6b34ec5f04b28662044a50c999ec5770c374aa1f1020de2", - "zh:25ef1467af2514d8011c44759307445f7057836ff87dfe4503c3e1c9776d5c1a", - "zh:26c006df6200f0063b827aab05bec94f9f3f77848e82ed72e48a51d1170d1961", - "zh:37cdf4292649a10f12858622826925e18ad4eca354c31f61d02c66895eb91274", - "zh:4315b0433c2fc512666c74e989e2d95240934ef370bea1c690d36cb02d30c4ce", - "zh:75df0b3f631b78aeff1832cc77d99b527c2a5e79d40f7aac40bdc4a66124dac2", - "zh:90693d936c9a556d2bf945de4920ff82052002eb73139bd7164fafd02920f0ef", - "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:c9177ad09804c60fd2ed25950570407b6bdcdf0fcc309e1673b584f06a827fae", - "zh:ca8e8db24a4d62d92afd8d3d383b81a08693acac191a2e0a110fb46deeff56a3", - "zh:d5fa3a36e13957d63bfe9bbd6df0426a2422214403aac9f20b60c36f8d9ebec6", - "zh:e4ede44a112296c9cc77b15e439e41ee15c0e8b3a0dec94ae34df5ebba840e8b", - "zh:f2d4de8d8cde69caffede1544ebea74e69fcc4552e1b79ae053519a05c060706", - "zh:fc19e9266b1841d4a3aeefa8a5b5ad6988baed6540f85a373b6c2d0dc1ca5830", + "h1:/vOvEEgnd+OY/Bbz6uwwEW1EnlgWQWJsXw5NnwHQOUY=", + "zh:151d35ab9d67f39ab568f5713dd74f0856a7d7b59a8c9557d05eaf0fa305426f", + "zh:2ff7031712d6fca0fc826ca6f1749244cc9aee5141b75ec9aea084a2907d6c40", + "zh:4c7d81be3b3dbb0f46f4a2074c17c72fe4c0a768b92b0882ffff39fdbe6ba310", + "zh:5313b02b5a1d9ece5302f075975a5ac9ba143bb32a457952885ecaa6a44fc232", + "zh:676a050266346d0b07d188c70377d8fb3c85a7a4c605a3ed4f9c6fcfc0537c7f", + "zh:6a02981bff4bd3d00d260e4ce72e5d6e54a7c6ea038cfb664b7cae13cef59b9f", + "zh:8c2a218e7e8969080eb400dd3e6b4707c74e4b0ccad07baaf410efec959162e4", + "zh:d2ea4316ed8f0b92eb62f1c676f7304081730a5cefbd5b36dae0f7bb91305016", + "zh:e310721c4d275a2e0cd222bdbac08676f62153d55c7dd0fbcbbcc2e919e3557f", + "zh:f52ed32e0393840c059fcfdac8022b50a58cffb0e3eff1fda21a58fc68562fe0", ] } -provider "registry.terraform.io/hashicorp/hcp" { +provider "registry.opentofu.org/hashicorp/hcp" { version = "0.86.0" constraints = "~> 0.71" hashes = [ - "h1:Ghu+TTkm/eDHPcTmADLHiD/NEI1wKM9JvtTqfj7Fmak=", - "zh:00428db9ba32bf9231e281371f7112b22d0d2757ee70be46381b7aba728efc6a", - "zh:0c9c66d9028e1fac6f549786681faaaaf1301291b50461bfcf072b32321170bd", - "zh:541d4532c875b2ee7ecb98da9a1461e76788893b623b0adf7c634d9fff7770e3", - "zh:6237fa0b3d9a1ae91a49d2182bca3b4b96118f6653ea36efe230b0d862fd509e", - "zh:705c42789ee6cc96f485930766e33e9e0a7b323f0149ea5f07f66e37211f0008", - "zh:7b5a33fe02079989b353194fb5c5dae7644445d68ab87b83d76ae17fc389a270", - "zh:9230022ad78c6ddc4ec16f7ec00796bbe7116ad6c9cd77f41a3b20f55f05272c", - "zh:942e490702eb6d9b7722fb683e8f9eb513f51b61bfb648a0bc387d0c2cab6eca", - "zh:a647a589fc955856632d4299e67f6ea1ae13a8a2c54831be64fb7959849a3f2b", - "zh:d3c38fc5fcf85e62e942b648dce5c63d642e468b25e37fe50caea41eb3daea02", - "zh:d895481bea8081fb71d4a07230cb8a3c01ad57918ca4ff19b0e70b6efddff216", - "zh:e4c98c2193bc1cd72f962510884835ad9aaa2f143d53424f0196ac47b396f7f5", + "h1:Eea93S5WiQcaAb43OUbYeZv70GamPS36jDjbu0y07r0=", + "zh:12b23c4b3f094491ae787159abaf57dbda2b42bef158301e8a5cb186eb95a8f5", + "zh:241fed27b7baecc4d09d778096650780c72847dc98dff8f3a267b4f72dbdadf1", + "zh:3de1d5bcba39a9367cbad13e6de96964f3140eeb1dfe9a58ae2e45b0a873a286", + "zh:440e873062d4cdda0175d389dd3c6f5f5d0fd4f11bcc487f7e227198bf2f151b", + "zh:611222712ba2217618dad968c991e59051255857990a1ed85aba92157a66eddb", + "zh:64f1115ed7bd197bbffd6d59c501b95e4cf5aa99d3cfa874e01806a809f97645", + "zh:862b0d5d27bf4cf0192e1a6a3aa02b2b6d1f3fef61a6adf255bed51e9d7b6309", + "zh:a21793617689af766e17a24211bd744b8056edb2ccc83f3aa882c4e37de707a7", + "zh:a4235ecc3acf9e27a2ff9b9b8b7d76715baf291eda1cc86b47c2bce270273c8a", + "zh:f90625f9e944a14a416126354f9baf3719fad326a911821e5982a6b32f25ef92", ] } -provider "registry.terraform.io/hashicorp/http" { +provider "registry.opentofu.org/hashicorp/http" { version = "3.4.2" constraints = "~> 3.2" hashes = [ - "h1:Te941FhpXymGvOraU9IQiMrvDVCMAF4gwjvyVZuvRtk=", - "h1:eqo0hkFNrixeaT93PC5NiU893s7rUwwOMeqnCjjj3u0=", - "h1:v6Hn+15SfN2SI281Sp+uNXdWhD197ycP07fnaoGpPcc=", - "h1:vaoPfsLm6mOk6avKTrWi35o+9p4fEeZAY3hzYoXVTfo=", - "zh:0ba051c9c8659ce0fec94a3d50926745f11759509c4d6de0ad5f5eb289f0edd9", - "zh:23e6760e8406fef645913bf47bfab1ca984c1c5805d2bb0ef8310b16913d29cd", - "zh:3c69fde4548bfe65b968534c4df8d699648c921d6a065b97fec5faece73a442b", - "zh:41c7f9a8c117704b7a8fa96a57ebfb92b72129d9625128eeb0dee7d5a09d1110", - "zh:59d09d2e00727df10565cc82a33250b44201fcd353eb2b1579507a5a0adcce18", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:c95b2f63d4357b3068531b90d9dca62a32551d7693defb7ab14b650b5d139c57", - "zh:cc0a3bbd3026191b35f417d3a8f26bdfad376d15be9e8d99a8803487ca5b0105", - "zh:d1185c6abb3ba25123fb7df1ad7dbe2b9cd8f43962628da551040fbe1934656f", - "zh:dfb26fccab7ecdc150f67415e6cfe19d699dc43e8bf5722f36032b17b46a0fbe", - "zh:eb1fcc00073bc0463f64e49600a73d925b1a0c0ae5b94dd7b67d3ebac248a113", - "zh:ec9b9ad69cf790cb0603a1036d758063bbbc35c0c75f72dd04a1eddaf46ad010", + "h1:KYPSiOzUcE18IUcDI19bVFVNgp+ihVrOub5hSdtct0I=", + "zh:02431ec117a862e219dab4d014bc4d5c158b49b18dbc31fd53c2a5a1f1a3d9c7", + "zh:11f0c07a25e03436531ed37536f7aaba376b1dc994b6d59483030f2c17120752", + "zh:23aa3da0bf34f92fa2253b3228e8aa42aa2a2b8b27cec487bf78147aec6c373b", + "zh:29823a543f553a61a21c9d9c0440978760e3fc2c9d017c381af20b9729621a32", + "zh:2add06181c808f777db807cbfcb30fe3869d137ca7ad4e6ffb9f76decfe0b2c5", + "zh:347906acb8d672d51306f6ba129d553b349960afbb22e852e33695d3bd69c2ee", + "zh:3d389638498ee30296832b7416ffe8704820b0874522e4567aa5aca70d4354b3", + "zh:7b855e39e47e4974b8e749fd4dadc4d06d797dac5d3aa48dff38609b1bad4c85", + "zh:a7873dc733bf8680c312c5d0345e3646e6a1db07bc5a58bdc47b507d78c6ed56", + "zh:ccc0af216be2200190f04859f844e989b710a65a423f126b191f3919adbe807d", ] } -provider "registry.terraform.io/hashicorp/local" { +provider "registry.opentofu.org/hashicorp/local" { version = "2.5.1" constraints = "~> 2.3" hashes = [ - "h1:/GAVA/xheGQcbOZEq0qxANOg+KVLCA7Wv8qluxhTjhU=", - "h1:8oTPe2VUL6E2d3OcrvqyjI4Nn/Y/UEQN26WLk5O/B0g=", - "h1:fm2EuMlsdPTuv2tKwx3PMJzWJUh7aMtU9Eky7t4fMys=", - "h1:tjcGlQAFA0kmQ4vKkIPPUC4it1UYxLbg4YvHOWRAJHA=", - "zh:0af29ce2b7b5712319bf6424cb58d13b852bf9a777011a545fac99c7fdcdf561", - "zh:126063ea0d79dad1f68fa4e4d556793c0108ce278034f101d1dbbb2463924561", - "zh:196bfb49086f22fd4db46033e01655b0e5e036a5582d250412cc690fa7995de5", - "zh:37c92ec084d059d37d6cffdb683ccf68e3a5f8d2eb69dd73c8e43ad003ef8d24", - "zh:4269f01a98513651ad66763c16b268f4c2da76cc892ccfd54b401fff6cc11667", - "zh:51904350b9c728f963eef0c28f1d43e73d010333133eb7f30999a8fb6a0cc3d8", - "zh:73a66611359b83d0c3fcba2984610273f7954002febb8a57242bbb86d967b635", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7ae387993a92bcc379063229b3cce8af7eaf082dd9306598fcd42352994d2de0", - "zh:9e0f365f807b088646db6e4a8d4b188129d9ebdbcf2568c8ab33bddd1b82c867", - "zh:b5263acbd8ae51c9cbffa79743fbcadcb7908057c87eb22fd9048268056efbc4", - "zh:dfcd88ac5f13c0d04e24be00b686d069b4879cc4add1b7b1a8ae545783d97520", + "h1:87L+rpGao062xifb1VuG9YVFwp9vbDP6G2fgfYxUkQs=", + "zh:031c2c2070672b7e78e0aa15560839278dc57fe7cf1e58a617ac13c67b31d5fb", + "zh:1ef64ea4f8382cd538a76f3d319f405d18130dc3280f1c16d6aaa52a188ecaa4", + "zh:422ce45691b2f384dbd4596fdc8209d95cb43d85a82aaa0173089d38976d6e96", + "zh:7415fbd8da72d9363ba55dd8115837714f9534f5a9a518ec42268c2da1b9ed2f", + "zh:92aa22d071339c8ef595f18a9f9245c287266c80689f5746b26e10eaed04d542", + "zh:9cd0d99f5d3be835d6336c19c4057af6274e193e677ecf6370e5b0de12b4aafe", + "zh:a8c1525b389be5809a97f02aa7126e491ba518f97f57ed3095a3992f2134bb8f", + "zh:b336fa75f72643154b07c09b3968e417a41293358a54fe03efc0db715c5451e6", + "zh:c66529133599a419123ad2e42874afbd9aba82bd1de2b15cc68d2a1e665d4c8e", + "zh:c7568f75ba6cb7c3660b69eaab8b0e4278533bd9a7a4c33ee6590cc7e69743ea", ] } -provider "registry.terraform.io/hashicorp/random" { +provider "registry.opentofu.org/hashicorp/random" { version = "3.6.1" hashes = [ - "h1:a+Goawwh6Qtg4/bRWzfDtIdrEFfPlnVy0y4LdUQY3nI=", - "zh:2a0ec154e39911f19c8214acd6241e469157489fc56b6c739f45fbed5896a176", - "zh:57f4e553224a5e849c99131f5e5294be3a7adcabe2d867d8a4fef8d0976e0e52", - "zh:58f09948c608e601bd9d0a9e47dcb78e2b2c13b4bda4d8f097d09152ea9e91c5", - "zh:5c2a297146ed6fb3fe934c800e78380f700f49ff24dbb5fb5463134948e3a65f", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7ce41e26f0603e31cdac849085fc99e5cd5b3b73414c6c6d955c0ceb249b593f", - "zh:8c9e8d30c4ef08ee8bcc4294dbf3c2115cd7d9049c6ba21422bd3471d92faf8a", - "zh:93e91be717a7ffbd6410120eb925ebb8658cc8f563de35a8b53804d33c51c8b0", - "zh:982542e921970d727ce10ed64795bf36c4dec77a5db0741d4665230d12250a0d", - "zh:b9d1873f14d6033e216510ef541c891f44d249464f13cc07d3f782d09c7d18de", - "zh:cfe27faa0bc9556391c8803ade135a5856c34a3fe85b9ae3bdd515013c0c87c1", - "zh:e4aabf3184bbb556b89e4b195eab1514c86a2914dd01c23ad9813ec17e863a8a", + "h1:egGGMQ18ihxoFBTgL/6aRL2N5/0bTI738Mg+TTsvBHA=", + "zh:1208af24d1f66e858740812dd5da12e8951b1ca75cc6edb1975ba22bfdeefb1b", + "zh:19137e9b4d3c15e1d99d2352888b98ec0e69bd5b2e89049150379d7bbd115063", + "zh:26613834a1a8ac60390c7a4cbd4cb794b01dfe237d2b0c10f132f3e434a21e03", + "zh:2cbe4425918f3f401609d89e6381f7d120493d637a3d103d827f0c0fd00b1600", + "zh:44ef27a972540435efa88f323280f96d6ac77934079225e7fcc3560cc28aae59", + "zh:8c5d4ca7d1ce007f7c055807cde77aad4685eb807ff802c93ffbec8589068f17", + "zh:9a4fa908d6af48805c862cd4f3a1031d552b96d863a94263e390ac92915d74a9", + "zh:ba396849f0f6d488784f6039095634e1c84e67e31375f3d17218fcf8ce952cb8", + "zh:cb695db8798957bd64ce411f061307e39cb2baa69668b4d42ccf010db47d2e39", + "zh:d02704bf99a93dc0b1ca00bd6051df9c431fbe17cd662a1ab58db1b96264a26f", ] } diff --git a/terraform/Makefile b/terraform/Makefile index 9481e20f..9a305256 100644 --- a/terraform/Makefile +++ b/terraform/Makefile @@ -3,22 +3,24 @@ .EXPORT_ALL_VARIABLES: # export all variables to child processes by default, also important for sub-make calls # Variable defaults +# prefer https://opentofu.org/ over terraform +TF_BIN ?= tofu AWS_PROFILE ?= timafe ENV_FILE ?= ~/.angkor/.env SSH_OPTIONS ?= -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -# Preconditions such as unverstioned files that must exist to run any target -# NOTE: These are always checked when make starts, no need for a dedicated taerget +# Preconditions such as unversioned files that must exist to run any target +# NOTE: These are always checked when make starts, no need for a dedicated target # How to ensure Makefile variable is set (or unset) as a prerequisite? https://stackoverflow.com/a/4731504/4292075 # use ifdef to check if an environment var is defined, and ifndef to check it it is not set ifdef AWS_SESSION_TOKEN - $(error please unset AWS_SESSION_TOKEN is present which leads to conflichts since we rely on AWS_PROFILE) + $(error please unset AWS_SESSION_TOKEN is present which leads to conflichts since we rely on AWS_PROFILE) endif ifeq (,$(wildcard terraform.tfvars)) - $(error terraform.tfvars not found and not managed by SCM on purpose, use terraform.tfvars.tmpl as template!) + $(error terraform.tfvars not found and not managed by SCM on purpose, use terraform.tfvars.tmpl as template!) endif ifeq (,$(wildcard terraform-backend.tf)) - $(error terraform-backend.tf not found and not managed by SCM on purpose, use terraform-backend.tf.tmpl as template!) + $(error terraform-backend.tf not found and not managed by SCM on purpose, use terraform-backend.tf.tmpl as template!) endif .PHONY: help @@ -34,19 +36,20 @@ tfswitch: ## Run 'tfswitch' utility if the binary exists and versions.tf is pres .PHONY: init init: tfswitch ## Run 'terraform init' to prepare your working directory for other commands - terraform init + $(TF_BIN) --version + $(TF_BIN) init .PHONY: plan -plan: tfswitch fmt ## Run 'terraform plan', implies includes targets fmt and validate - terraform validate; terraform plan +plan: tfswitch fmt ## Run '$(TF_BIN) plan', implies includes targets fmt and validate + $(TF_BIN) validate; $(TF_BIN) plan .PHONY: apply -apply: tfswitch fmt ## Run 'terraform apply --auto-approve' to apply changes without prompting - terraform apply --auto-approve +apply: tfswitch fmt ## Run '$(TF_BIN) apply --auto-approve' to apply changes without prompting + $(TF_BIN) apply --auto-approve .PHONY: update update: ## Run 'terraform init -upgrade' to update provider versions, see also 'lock' - terraform init -upgrade + $(TF_BIN) init -upgrade tfswitch --latest @echo "Finished, it's recommended to run 'make plan' now to verify if everything is still working " @@ -55,20 +58,20 @@ upgrade: update ## Alias for target 'update' .PHONY: fmt fmt: tfswitch ## Run 'terraform fmt -recursive' to reformat config in the the standard style - terraform fmt -recursive + $(TF_BIN) fmt -recursive .PHONY: check check: tfswitch ## Run 'terraform fmt -check' to check if input is formatted, return != 0 if not - terraform fmt -check + $(TF_BIN) fmt -check .PHONY: lock lock: ## Ensure terraform lock file contains suitable provider checksums on all of selected platforms - terraform providers lock -platform=darwin_amd64 -platform=linux_amd64 -platform=linux_arm64 + $(TF_BIN) providers lock -platform=darwin_amd64 -platform=linux_amd64 -platform=linux_arm64 .PHONY: release release: ## Manage release info based on latest git tag and release.auto.tfvars - terraform apply -auto-approve -target=module.release - terraform output -raw release_name + $(TF_BIN) apply -auto-approve -target=module.release + $(TF_BIN) output -raw release_name # EC2 Instance Managements Tasks