From a473e164bc8a68bbee23f811a67478c9db55cba1 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Thu, 17 Oct 2024 15:56:38 +1100 Subject: [PATCH 1/9] upgrade vcs-connected-workspace module version --- vcs-connected-workspaces.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcs-connected-workspaces.tf b/vcs-connected-workspaces.tf index c0e349d..2463513 100644 --- a/vcs-connected-workspaces.tf +++ b/vcs-connected-workspaces.tf @@ -9,7 +9,7 @@ locals { module "vcs-connected-workspace" { source = "ausmartway/vcs-connected-workspace/tfe" - version = "0.0.4" + version = "0.1.0" # insert the 5 required variables here for_each = local.inputvcsworkspacemap organization = var.organization From 8a242b9322b5739fab8fe9ddc3e2b2cd37fbfa62 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Thu, 17 Oct 2024 16:01:03 +1100 Subject: [PATCH 2/9] update provider.lck file --- management-settings.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/management-settings.tf b/management-settings.tf index ca7e32d..0ebfc95 100644 --- a/management-settings.tf +++ b/management-settings.tf @@ -2,11 +2,11 @@ terraform { required_version = ">= 1.0" required_providers { - tfe = "= 0.58.1" + tfe = "= 0.59.0" vault = "= 4.4.0" github = { source = "integrations/github" - version = "= 4.31.0" + version = "= 6.3.1" } auth0 = { source = "auth0/auth0" From e275bb45c109fad80b2ffc3d8bbc928caef4ec60 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Thu, 17 Oct 2024 17:11:05 +1100 Subject: [PATCH 3/9] another test --- .terraform.lock.hcl | 86 ------------------------------- management-settings.tf | 6 +-- tfc-config-as-code.code-workspace | 8 --- 3 files changed, 3 insertions(+), 97 deletions(-) delete mode 100644 .terraform.lock.hcl delete mode 100644 tfc-config-as-code.code-workspace diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl deleted file mode 100644 index c6bbfc5..0000000 --- a/.terraform.lock.hcl +++ /dev/null @@ -1,86 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/auth0/auth0" { - version = "0.35.0" - constraints = "~> 0.35.0" - hashes = [ - "h1:xIS2dIpTgcjKsWERQr2Ed46JNIF6r3FuiCNTxdWJ2r4=", - "zh:1441b4e390ab970a2c3405d4b5381f19f6f31388ecdc701bc6ac64e01538459a", - "zh:3473ca85c1d5aa43cd32d9abd50ec3d967154056506113a6e72a4b4b9d028aa2", - "zh:3d73c114bbeb07802e859b3a03df07e259cf747a4a509b3e2ecda24f80e340c9", - "zh:8a1e1adab4773b2876727d24abd7de2b28a4ca068cc0ec88b4a18b6122cfa2b8", - "zh:94625fa8db2f354445eab2d0eec5d2e3a3ee639b7ebee6cc48cab5fac5da36c5", - "zh:9713739ae7562bb31e9a2f2993959a2a2e3b7ddab6f40d5b4d0f009074480e41", - "zh:9f37addad86a53de02c2028329de05a6ab5eebfeea9d9f16aaa7a3680565fdf3", - "zh:a6a728a5e318c8b1a3eee2f0bcc331febc55e8575d7590619b5c238cdcec51ad", - "zh:b6924ec7bcd4a949a422d699b9c1a3f06d641ab84645b9b85df719d3548bde94", - "zh:c4e648fafe387da586975632e3c17d122608b193e4c3a1f8ae6314b431adce1b", - "zh:c8f31dae233c17644b1af5bac63c3676bf3c997edbc66cc1eaa909032e1515b5", - "zh:ca7d7c8b86b344e371ccb975ab3558fd97f361b02893bb5e823199a7217ee7ae", - "zh:d189271a97776023d4de4b8846d3bbc9ebf840228e7b4aa6cd7acf7825a3c4bc", - "zh:dd61150a0eeff5e68f5e0140320df8e9259d5ea2563a4822fa91ce7ad0d2a82f", - ] -} - -provider "registry.terraform.io/hashicorp/tfe" { - version = "0.58.1" - constraints = ">= 0.26.0, 0.58.1" - hashes = [ - "h1:I6H+Yq1+icMcETbDEjF/fV6MQ3onCS3NUskZz6n2z+o=", - "zh:0287e18fd54bb8f029a20b680138dc060624b0680d8fff03ef2d50060486495a", - "zh:035a4db8a4eb850de9cfb9802ec4bf6882edf14a9a479554f87d5eb4dc9675f6", - "zh:1fa3dbde072e3148560b92502d54766f8ae8174da02e1454af336c30fc41bc7f", - "zh:3a83e6f7f3c32b219ac74b730c2b666f4e4b5d00d14767bd2c33bc1f9d425077", - "zh:5338578c52a23ef29725eb829dac2440e8c85406ec370c4d31815b7a47b7d3d6", - "zh:87e2455211b4faf376618d5ba00b3a6e8a7690f136f634654c3443ed4a3fb739", - "zh:8c121cd999d9ce20e8493e5469e72e6d9c85a1abc3bc39214b5dfd4a3eabc5e5", - "zh:a30aa3a515c281e2be843fc200367aa007c15d0e9a58499f0dd6e78be77bc5b8", - "zh:b2c0c1d981e955841e6f0035c3d6f5f6247dd96d4c44072dd34abd0eba21977f", - "zh:bee9c8ced3fc1d5d865b4b3484e0c8d4a5ddcec8462efed97f0371dfbb7899f7", - "zh:d95ec293fa70e946b6cd657912b33155f8be3413e6128ed2bfa5a493f788e439", - "zh:eb85330441985da624bb195a86743b7b50e1d2f14a002de8cd587daec5f937bd", - ] -} - -provider "registry.terraform.io/hashicorp/vault" { - version = "4.4.0" - constraints = "4.4.0" - hashes = [ - "h1:iYUiW9CZ+Cea0TTX9iQSfXlqB2ex713pmno1jSTlLRQ=", - "zh:12758c5afc4160355c55e808f3d0e960a69ef285ddd57f29c3a775ac63c76135", - "zh:190c4fbb620bbc07ff850119e17ffbca9f4d81968e69436024fcfb20c69d177e", - "zh:2668d3f37e41a539ddca8507a2f8100711cbe54fd7de6d9e82e191c456999674", - "zh:59cf5fe3a5cff561c9d15b1b0748fdaeee8966537a5121a20178a1dd265cc22c", - "zh:6bf7107b56132281b05932aa8fce8851cd2351d2f6c7d0de4475b5dabf755d4f", - "zh:77ee85a529e9ae519aa63950960bd2c2056dd622ad32b08731cb5237e28a9200", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:c3ff4d9c123cc23f95813800c4cea69d1fab29c65b96de4a5932fc328275f527", - "zh:c5a6dd8530f720757861da38c16da6577f30cc00423471f8bcc5682c1852027f", - "zh:c5acd773d7d24a6116866bf0e4449a3be6849cd6bd2f87141289d47983a0f777", - "zh:ede501e9979a586be279b63e0cf5ce69fa89780e37791fe87d8b4283e3716c96", - "zh:f5f6ae50a23a184d126832d688380e22311fa1b0192723507a790e57917c3e78", - ] -} - -provider "registry.terraform.io/integrations/github" { - version = "4.31.0" - constraints = "~> 4.0, 4.31.0" - hashes = [ - "h1:FkBft5JlVtlcYcEM0CiphlFWgjBFQVziJMwrowuBIoc=", - "zh:07208ecc74804fbdd554830de79627f3e58633fc417b12dc29aafaceae01e427", - "zh:0dca3802a7ea1ba4812c866bf202e62aef6c8995db8856fdb5b4d1d81b505518", - "zh:24e6a56b34b3e0dca6ca0d6f22d0a31dda6a3256713492902c39ce9edd14acbd", - "zh:42e41fa4e61218973615b7e5d564119bb5c728ee40b881539964cd704632d8c0", - "zh:6aa6bb04fdc00c3c762122e96ee7c19abfb8e42dc5d3a720b5767dbb4cfa274d", - "zh:74ea4bbad825eee831d37940760459786460fe492e1b30acb5c91c9edd14a5ea", - "zh:8e170f6d5e46c08fbc3b5ff251075382f75b53a66a83b7b005099fb99ad94f24", - "zh:9164b611e7318e3d08cc84513d3d8c27bd12336a7721a894cb3d346b60286233", - "zh:91d3397f021c5a9fedff36f84635ffc3169224494629bb4a578356a05091e182", - "zh:b061e1529499bf40f8f14c9c8116787dd50f6fd3d64ad38d77cd39db77e98ae9", - "zh:c9daff626f7a55c01db79b6ccc462948bf854d976c73def306ae9ae09e5afe1b", - "zh:ec7e223ae7d6292b8425b7190e801f1098a647d2aee3132761d37fd75cfcfe07", - "zh:f2001b2a2f7049fc74ffe54d7bc48c9dfec80956f468a2c8a550c5071d077dbd", - "zh:f75ec1e71924c50b346bced15883c626f697ffd3ee6c4bb2835e4170fe65215a", - ] -} diff --git a/management-settings.tf b/management-settings.tf index 0ebfc95..637448b 100644 --- a/management-settings.tf +++ b/management-settings.tf @@ -2,15 +2,15 @@ terraform { required_version = ">= 1.0" required_providers { - tfe = "= 0.59.0" + tfe = ">= 0.58.0" vault = "= 4.4.0" github = { source = "integrations/github" - version = "= 6.3.1" + version = ">= 6.0" } auth0 = { source = "auth0/auth0" - version = "~> 0.35.0" + version = ">= 0.35.0" } } } diff --git a/tfc-config-as-code.code-workspace b/tfc-config-as-code.code-workspace deleted file mode 100644 index 876a149..0000000 --- a/tfc-config-as-code.code-workspace +++ /dev/null @@ -1,8 +0,0 @@ -{ - "folders": [ - { - "path": "." - } - ], - "settings": {} -} \ No newline at end of file From 4082ef5792c25df07b9311b90054a14f9476a544 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Fri, 18 Oct 2024 12:24:50 +1100 Subject: [PATCH 4/9] upgrade non-vcs-connected-workspace to newer version --- .terraform.lock.hcl | 87 +++++++++++++++++++++++++++++++++++++++++++ non-vcs-workspaces.tf | 2 +- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 .terraform.lock.hcl diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl new file mode 100644 index 0000000..8d6fcf2 --- /dev/null +++ b/.terraform.lock.hcl @@ -0,0 +1,87 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/auth0/auth0" { + version = "1.7.1" + constraints = ">= 0.35.0" + hashes = [ + "h1:uKl4wOHbQOPqWneEZwDRNeo511TLDdM6tbqLqTXVwQo=", + "zh:0507d40f7eccf341f3cf4f76e20f2dd5b65aff0735ad611346652e4a8e02cba6", + "zh:20daab1414acc6d4d67666cfc5365e3392a8232d6016637f06ed87ebc59befb7", + "zh:33013b1f2ffd068327e8757c54759ae2538aeea040472b36e4652449ee2f1f04", + "zh:4f9bb0d8caa3e226d9560541c512f0bdd82e16d0856382fc94acb93a7e66e5bc", + "zh:5a91449a7f371e8a71fedb8f88cf6115c0d9fce2f02f0a643b2b244dba4d40c4", + "zh:7a1366efde9d04da5fb9b13db1cfde61d585f06a89100736eebadb545104c47d", + "zh:7bf862207a0ea8b013a2409e364095c8e9c5b31fd27a8057f2f57339f8a359ad", + "zh:8c6aca2029521bc0a3f77c7cf874a1116288c60effcaa8259b36f6120611d838", + "zh:90423f892fceb72d5bbef307abb416d0a32c0f3082e204c90c7fde91f5ca2a75", + "zh:ca322db22dbcb3525151e2755c64b068f4c757fb5a496275ce6c46c48e749e1e", + "zh:ced37839b601c5753777e3e645243036b34d612752453ea49f290dd59f8df409", + "zh:d31cb47b467eaf0b0095fb6b5f055df79f2d4d07afbd60fe1d982069550ab431", + "zh:dae99a252718d8fb02fbee13afb1a67f4b4fe5a12aa978aea400960f5c0dab91", + "zh:f303d8d6318166f9fe4be0c4c145fc5806259f670009d8226db9bd4d9ab6b90b", + ] +} + +provider "registry.terraform.io/hashicorp/tfe" { + version = "0.59.0" + constraints = ">= 0.58.0, 0.59.0" + hashes = [ + "h1:Imh9PHOAaBJFBbyiKHYoItWjtWrrSolE5444EUYDgRU=", + "zh:39d4513f023d57c83f3d1e659db6093dd661ef34f7b5d8025b8155a19244e8e4", + "zh:4c2183c32356c0345c86b063c0bc9276fe704c9fc5c94ba9b45394de9d22a08a", + "zh:55ec15a226636e48dc17bad05781c2f679c9fd40940aff3f8109e6c2d4869e3e", + "zh:6cac67993b64000fd7a9856c82115e3af9ebf2ebe5e6c9870865cbb1da5a8b8e", + "zh:6ea98ea1e4afd42b44a84756914ee80dbc6f81f0aa314def7316c9c14b8114b0", + "zh:a708a6bdc80cf77793c2e9d367f628c3fdd8b1ec05f7b08ffb8ef4944d625a23", + "zh:a960e9330494d63a796ed71e3563b13121115f02806dfea8c64231753dac53bd", + "zh:b752c5c1000728b22cda47b5032ae537a46a8e5c197642102cb3e5dab95ce090", + "zh:c16b0899b984ef398b2b234d4171cab17484c8eeb7f20cc0eaea172d337ae187", + "zh:d95ec293fa70e946b6cd657912b33155f8be3413e6128ed2bfa5a493f788e439", + "zh:ddb8ddcf0cc945f369e537285c727be9c673477ca62d7f9800287041539841aa", + "zh:e917a03a99b8f3ca1021a099e421824e8e98fc63913de2932bb0a7dd54b24461", + ] +} + +provider "registry.terraform.io/hashicorp/vault" { + version = "4.4.0" + constraints = "4.4.0" + hashes = [ + "h1:iYUiW9CZ+Cea0TTX9iQSfXlqB2ex713pmno1jSTlLRQ=", + "zh:12758c5afc4160355c55e808f3d0e960a69ef285ddd57f29c3a775ac63c76135", + "zh:190c4fbb620bbc07ff850119e17ffbca9f4d81968e69436024fcfb20c69d177e", + "zh:2668d3f37e41a539ddca8507a2f8100711cbe54fd7de6d9e82e191c456999674", + "zh:59cf5fe3a5cff561c9d15b1b0748fdaeee8966537a5121a20178a1dd265cc22c", + "zh:6bf7107b56132281b05932aa8fce8851cd2351d2f6c7d0de4475b5dabf755d4f", + "zh:77ee85a529e9ae519aa63950960bd2c2056dd622ad32b08731cb5237e28a9200", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:c3ff4d9c123cc23f95813800c4cea69d1fab29c65b96de4a5932fc328275f527", + "zh:c5a6dd8530f720757861da38c16da6577f30cc00423471f8bcc5682c1852027f", + "zh:c5acd773d7d24a6116866bf0e4449a3be6849cd6bd2f87141289d47983a0f777", + "zh:ede501e9979a586be279b63e0cf5ce69fa89780e37791fe87d8b4283e3716c96", + "zh:f5f6ae50a23a184d126832d688380e22311fa1b0192723507a790e57917c3e78", + ] +} + +provider "registry.terraform.io/integrations/github" { + version = "6.3.1" + constraints = ">= 6.0.0, 6.3.1" + hashes = [ + "h1:vKWgfpIrSNic7pYVi4LKIDQ2MgUpHq7uSj8nA8xfrw0=", + "zh:25ae1cb97ec528e6b7e9330489f4a33acc0fa80b909c113a8445656bc524c5b9", + "zh:3e1f6300dc10e52a54f13352770ed79f25ff4ba9ac49b776c52a655a3488a20b", + "zh:4aaf2877ec22e63358d7c9cd48c7d7947d1a1dc4d03231f0af193d8975d5918a", + "zh:4b904a81fac12a2a7606c8d811cb9c4e13581adcaaa19e503a067ac95c515925", + "zh:54fe7e0dca04e698631a5b86bdd43ef09a31375e68f8f89970b4315cd5fc6312", + "zh:6b14f92cf62784eaf20f43ef58ce966735f30d43deeab077943bd410c0d8b8b2", + "zh:86c49a1c11c024b26b6750c446f104922a3fe8464d3706a5fb9a4a05c6ca0b0a", + "zh:8939fb6332c4a58c4e90245eb9f0110987ccafff06b45a7ed513f2759a2abe6a", + "zh:8b4068a78c1f357325d1151facdb1aff506b9cd79d2bab21a55651255a130e2f", + "zh:ae22f5e52f534f19811d7f9480b4eb442f12ff16367b3893abb4e449b029ff6b", + "zh:afae9cfd9d49002ddfea552aa4844074b9974bd56ff2c2458f2297fe0df56a5b", + "zh:bc7a434408eb16a4fbceec0bd86b108a491408b727071402ad572cdb1afa2eb7", + "zh:c8e4728ea2d2c6e3d2c1bc5e7d92ed1121c02bab687702ec2748e3a6a0844150", + "zh:f6314b2cff0c0a07a216501cda51b35e6a4c66a2418c7c9966ccfe701e01b6b0", + "zh:fbd1fee2c9df3aa19cf8851ce134dea6e45ea01cb85695c1726670c285797e25", + ] +} diff --git a/non-vcs-workspaces.tf b/non-vcs-workspaces.tf index 8acdf86..6d29aae 100644 --- a/non-vcs-workspaces.tf +++ b/non-vcs-workspaces.tf @@ -9,7 +9,7 @@ locals { module "non-vcs-connected-workspace" { source = "ausmartway/non-vcs-connected-workspace/tfe" - version = "0.0.1" + version = "0.1.0" for_each = local.inputworkspacemap # insert the 4 required variables here organization = var.organization From 13837ea9b28355c712a33a58a51c93aec990b0b2 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Fri, 18 Oct 2024 12:31:26 +1100 Subject: [PATCH 5/9] comment out deprecated excution_mode property --- flexible-workspaces.tf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/flexible-workspaces.tf b/flexible-workspaces.tf index 22e7c52..e22ec27 100644 --- a/flexible-workspaces.tf +++ b/flexible-workspaces.tf @@ -193,7 +193,7 @@ resource "tfe_workspace" "aws-s3-demo" { description = "A simple demo to show how sentinel policy as code engine can make sure s3 are provisioned securely." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false name = "aws-s3-demo" @@ -224,7 +224,7 @@ resource "tfe_workspace" "gcp-playground" { description = "A simple demo of deploying gcp resources." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false name = "gcp-playground" @@ -255,7 +255,7 @@ resource "tfe_workspace" "aws-shared-infra" { allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false remote_state_consumer_ids = values(data.tfe_workspace_ids.awsconsumer-apps.ids) @@ -290,7 +290,7 @@ resource "tfe_workspace" "azure-shared-infra" { description = "Core azure infra" allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = true name = "azure-shared-infra" @@ -313,7 +313,7 @@ resource "tfe_workspace" "vault-config-as-code-aws" { description = "A workspace that's used to manage my own Vault's configuration as code." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false @@ -340,8 +340,8 @@ resource "tfe_workspace" "vault-config-as-code-local" { description = "A workspace that's used to manage my own Vault's configuration as code." allow_destroy_plan = true auto_apply = true - execution_mode = "agent" - agent_pool_id = tfe_agent_pool.local-agent-pool.id + # execution_mode = "agent" + # agent_pool_id = tfe_agent_pool.local-agent-pool.id file_triggers_enabled = false global_remote_state = false @@ -368,7 +368,7 @@ resource "tfe_workspace" "vault-config-as-code-hcp" { description = "A workspace that's used to manage my own Vault's configuration as code." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false From 434a17f063a4bb8cc7c26a5834512852f4c28fa7 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Fri, 18 Oct 2024 12:35:26 +1100 Subject: [PATCH 6/9] comment out deprecated property execution_mode --- management-settings.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/management-settings.tf b/management-settings.tf index 637448b..976fd47 100644 --- a/management-settings.tf +++ b/management-settings.tf @@ -58,7 +58,7 @@ resource "tfe_workspace" "tfc-config-as-code" { description = "Workspace for managing my own TFC orgnisation's configuration as code, using terraform." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = true global_remote_state = false project_id = tfe_project.projects["Management"].id @@ -116,7 +116,7 @@ resource "tfe_workspace" "tfc-credential-injector" { allow_destroy_plan = true auto_apply = true description = "A workspace that will inject aws and azure credentials to other workspaces automaticly." - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false project_id = tfe_project.projects["Management"].id @@ -140,7 +140,7 @@ resource "tfe_workspace" "tfc-notification-configurator" { allow_destroy_plan = true auto_apply = true description = "A workspace that will configure TFC/E notifications based on tag automaticly." - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false project_id = tfe_project.projects["Management"].id From d10aecd19b68ab70ef908d155cd3ed89b33b5ca3 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Fri, 18 Oct 2024 13:24:49 +1100 Subject: [PATCH 7/9] tidy up --- flexible-workspaces.tf | 11 ++++++----- management-settings.tf | 19 +------------------ versions.tf | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 versions.tf diff --git a/flexible-workspaces.tf b/flexible-workspaces.tf index e22ec27..1e5d398 100644 --- a/flexible-workspaces.tf +++ b/flexible-workspaces.tf @@ -1,8 +1,9 @@ +# this file contains workspaces that were imported before this tfc-config-as-code repo has been created. resource "tfe_workspace" "aws-lambda-example" { description = "Demo workspace for deploying lambda functions." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false @@ -35,7 +36,7 @@ resource "tfe_workspace" "multi-env-provisioning-example-0-test" { description = "A demo showing how to manage multiple enviroments using one set of terraform code." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false name = "multi-env-provisioning-example-0-test" @@ -67,7 +68,7 @@ resource "tfe_workspace" "multi-env-provisioning-example-1-staging" { description = "A demo showing how to manage multiple enviroments using one set of terraform code." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false @@ -101,7 +102,7 @@ resource "tfe_workspace" "multi-env-provisioning-example-2-prod" { description = "A demo showing how to manage multiple enviroments using one set of terraform code." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false @@ -134,7 +135,7 @@ resource "tfe_workspace" "terraform-aws-vault-demo" { description = "A workspace that standup a demo vault instance." allow_destroy_plan = true auto_apply = true - execution_mode = "remote" + # execution_mode = "remote" file_triggers_enabled = false global_remote_state = false name = "terraform-aws-vault-demo" diff --git a/management-settings.tf b/management-settings.tf index 976fd47..e7aa8c8 100644 --- a/management-settings.tf +++ b/management-settings.tf @@ -1,20 +1,3 @@ -##test123 -terraform { - required_version = ">= 1.0" - required_providers { - tfe = ">= 0.58.0" - vault = "= 4.4.0" - github = { - source = "integrations/github" - version = ">= 6.0" - } - auth0 = { - source = "auth0/auth0" - version = ">= 0.35.0" - } - } -} - locals { ##this can be changed to switch between A/B github connection. tfc_oauth_token = tfe_oauth_client.github-b.oauth_token_id @@ -164,7 +147,7 @@ resource "tfe_workspace" "tfc-policyset-attacher" { allow_destroy_plan = true auto_apply = true description = "A workspace that will configure TFC/E notifications based on tag automaticly." - execution_mode = "remote" + file_triggers_enabled = false global_remote_state = false project_id = tfe_project.projects["Management"].id diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..34147ef --- /dev/null +++ b/versions.tf @@ -0,0 +1,16 @@ +##version constraints for tf and required providers +terraform { + required_version = ">= 1.0" + required_providers { + tfe = ">= 0.58.0" + vault = ">= 4.4.0" + github = { + source = "integrations/github" + version = ">= 6.0" + } + auth0 = { + source = "auth0/auth0" + version = ">= 0.35.0" + } + } +} From 4f16177c4a1a862e4e2396b8e45d8c107f6bc503 Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Fri, 18 Oct 2024 13:36:24 +1100 Subject: [PATCH 8/9] update tf_lastest from 1.9.6 to 1.9.8 --- variables.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variables.tf b/variables.tf index 1a1ca0d..264d664 100644 --- a/variables.tf +++ b/variables.tf @@ -5,7 +5,7 @@ variable "tf_latest" { condition = substr(var.tf_latest, 0, 2) == "1." error_message = "The terraform cli version must match 1.*." } - default = "1.9.6" + default = "1.9.8" } @@ -16,7 +16,7 @@ variable "v1latest" { condition = substr(var.v1latest, 0, 2) == "1." error_message = "The terraform cli version must match 1.*." } - default = "1.9.6" + default = "1.9.8" } variable "v015latest" { type = string From 0ac3b3604ad83d0c5a6f48ab93563e1f45a1e9ab Mon Sep 17 00:00:00 2001 From: Yulei Liu Date: Fri, 18 Oct 2024 13:38:31 +1100 Subject: [PATCH 9/9] upgrade tf versions to 1.9.8 to many workspaces --- vcs-connected-workspaces/workspace-hcp-boundary-config.yaml | 2 +- vcs-connected-workspaces/workspace-hcp-boundary.yaml | 2 +- vcs-connected-workspaces/workspace-hcp-vault-management.yaml | 2 +- vcs-connected-workspaces/workspace-hcp-vault.yaml | 2 +- .../workspace-tfc-workload-identity-demo.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vcs-connected-workspaces/workspace-hcp-boundary-config.yaml b/vcs-connected-workspaces/workspace-hcp-boundary-config.yaml index 1162df9..5c54cf7 100644 --- a/vcs-connected-workspaces/workspace-hcp-boundary-config.yaml +++ b/vcs-connected-workspaces/workspace-hcp-boundary-config.yaml @@ -1,5 +1,5 @@ name: hcp-boundary-config-as-code -version: 1.4.6 +version: 1.9.8 vcsbranch: vcsworkingdirectory: description: A workspace to manage my test boundary in hcp@ap-southeast-2 region diff --git a/vcs-connected-workspaces/workspace-hcp-boundary.yaml b/vcs-connected-workspaces/workspace-hcp-boundary.yaml index 846ffc8..3de3c43 100644 --- a/vcs-connected-workspaces/workspace-hcp-boundary.yaml +++ b/vcs-connected-workspaces/workspace-hcp-boundary.yaml @@ -1,5 +1,5 @@ name: hcp-boundary -version: 1.6.3 +version: 1.9.8 vcsbranch: vcsworkingdirectory: description: A workspace to manage my test boundary in hcp@ap-southeast-2 region diff --git a/vcs-connected-workspaces/workspace-hcp-vault-management.yaml b/vcs-connected-workspaces/workspace-hcp-vault-management.yaml index 3aa940a..62cf13a 100644 --- a/vcs-connected-workspaces/workspace-hcp-vault-management.yaml +++ b/vcs-connected-workspaces/workspace-hcp-vault-management.yaml @@ -1,5 +1,5 @@ name: hcp-vault-management -version: 1.4.6 +version: 1.9.8 vcsbranch: vcsworkingdirectory: description: this is a workspace that manages my hcp-vault diff --git a/vcs-connected-workspaces/workspace-hcp-vault.yaml b/vcs-connected-workspaces/workspace-hcp-vault.yaml index 5d2b653..f29e130 100644 --- a/vcs-connected-workspaces/workspace-hcp-vault.yaml +++ b/vcs-connected-workspaces/workspace-hcp-vault.yaml @@ -1,5 +1,5 @@ name: hcp-vault-sydney -version: 1.4.6 +version: 1.9.8 vcsbranch: vcsworkingdirectory: description: A workspace to manage my test Vault in hcp@ap-southeast-2 region diff --git a/vcs-connected-workspaces/workspace-tfc-workload-identity-demo.yaml b/vcs-connected-workspaces/workspace-tfc-workload-identity-demo.yaml index 0142d9e..ae40565 100644 --- a/vcs-connected-workspaces/workspace-tfc-workload-identity-demo.yaml +++ b/vcs-connected-workspaces/workspace-tfc-workload-identity-demo.yaml @@ -1,5 +1,5 @@ name: tfc-workload-identity-demo -version: 1.9.6 +version: 1.9.8 vcsbranch: vcsworkingdirectory: description: A workspace to test/demo the workload identity feature in TFC