Skip to content

Error in tre_deploy, Set to use TF_VAR_ variables as purely a TF step#269

Merged
marrobi merged 6 commits into
developfrom
marrobi/issue209-patch-2
Jun 16, 2021
Merged

Error in tre_deploy, Set to use TF_VAR_ variables as purely a TF step#269
marrobi merged 6 commits into
developfrom
marrobi/issue209-patch-2

Conversation

@marrobi
Copy link
Copy Markdown
Member

@marrobi marrobi commented Jun 15, 2021

PR for issue #209

What is being addressed

The terraform deploy scripts should only use TF_VAR_ variabless.

How is this addressed

Changed the variable names to TF_VAR_

@marrobi marrobi marked this pull request as draft June 15, 2021 10:14
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 15, 2021

Unit Test Results

  1 files    1 suites   1s ⏱️
44 tests 44 ✔️ 0 💤 0 ❌

Results for commit a85b66e.

♻️ This comment has been updated with latest results.

@marrobi marrobi temporarily deployed to Dev June 15, 2021 10:22 Inactive
@marrobi marrobi temporarily deployed to Dev June 15, 2021 10:32 Inactive
@marrobi marrobi temporarily deployed to Dev June 15, 2021 10:35 Inactive
@marrobi marrobi temporarily deployed to Dev June 15, 2021 10:44 Inactive
@marrobi marrobi temporarily deployed to Dev June 15, 2021 10:44 Inactive
@marrobi marrobi marked this pull request as ready for review June 15, 2021 10:54
@limorl
Copy link
Copy Markdown

limorl commented Jun 15, 2021

@marrobi The quickstart documentation should be updated, specifically this section, to match with the .env variables with the following var names. Also, the location of .env has changed:
image

@marrobi
Copy link
Copy Markdown
Member Author

marrobi commented Jun 15, 2021

@limorl where is that screenshot from - can't see that on this branch.

@limorl
Copy link
Copy Markdown

limorl commented Jun 15, 2021

@limorl where is that screenshot from - can't see that on this branch.

quickstart.md

I'll open a bug on it and fix it. outside this PR

@marrobi
Copy link
Copy Markdown
Member Author

marrobi commented Jun 15, 2021

@limorl when I look I see:
image

@limorl
Copy link
Copy Markdown

limorl commented Jun 15, 2021

@limorl when I look I see:
image

Weird! I synced this branch. I'll force checking out this file.
Please ignore then

@limorl
Copy link
Copy Markdown

limorl commented Jun 16, 2021

make-tre fails .
$TF_VAR_acr_name seems like it hasn't been set.

After setting it manually, and running make tre-deployment there are errors that indicate other environment variables are missing or not set properly:

Initializing provider plugins...

  • Reusing previous version of hashicorp/azurerm from the dependency lock file
  • Reusing previous version of hashicorp/random from the dependency lock file
  • Using previously-installed hashicorp/azurerm v2.58.0
  • Using previously-installed hashicorp/random v3.1.0

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

│ Error: Workspace Name can only contain alphabet, number, and '-' character. You can not use '-' as the start and end of the name

│ with azurerm_log_analytics_workspace.tre,
│ on main.tf line 25, in resource "azurerm_log_analytics_workspace" "tre":
│ 25: resource "azurerm_log_analytics_workspace" "tre" {



│ Error: alpha numeric characters only are allowed in "name": "acr_lldev123"

│ with module.acr.azurerm_container_registry.acr,
│ on acr/acr.tf line 6, in resource "azurerm_container_registry" "acr":
│ 6: resource "azurerm_container_registry" "acr" {



│ Error: "name" can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number and be between 6 and 50 characters long

│ with module.servicebus.azurerm_servicebus_namespace.sb,
│ on servicebus/servicebus.tf line 1, in resource "azurerm_servicebus_namespace" "sb":
│ 1: resource "azurerm_servicebus_namespace" "sb" {



│ Error: invalid value for name (Cosmos DB Account name must be 3 - 50 characters long, contain only lowercase letters, numbers and hyphens.)

│ with module.state-store.azurerm_cosmosdb_account.tre-db-account,
│ on state-store/statestore.tf line 1, in resource "azurerm_cosmosdb_account" "tre-db-account":
│ 1: resource "azurerm_cosmosdb_account" "tre-db-account" {



│ Error: name ("stg_lldev123") can only consist of lowercase letters and numbers, and must be between 3 and 24 characters long

│ with module.storage.azurerm_storage_account.stg,
│ on storage/storage.tf line 1, in resource "azurerm_storage_account" "stg":
│ 1: resource "azurerm_storage_account" "stg" {


Acquiring state lock. This may take a few moments...

│ Error: Workspace Name can only contain alphabet, number, and '-' character. You can not use '-' as the start and end of the name

│ with azurerm_log_analytics_workspace.tre,
│ on main.tf line 25, in resource "azurerm_log_analytics_workspace" "tre":
│ 25: resource "azurerm_log_analytics_workspace" "tre" {



│ Error: alpha numeric characters only are allowed in "name": "acr_lldev123"

│ with module.acr.azurerm_container_registry.acr,
│ on acr/acr.tf line 6, in resource "azurerm_container_registry" "acr":
│ 6: resource "azurerm_container_registry" "acr" {



│ Error: "name" can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number and be between 6 and 50 characters long

│ with module.servicebus.azurerm_servicebus_namespace.sb,
│ on servicebus/servicebus.tf line 1, in resource "azurerm_servicebus_namespace" "sb":
│ 1: resource "azurerm_servicebus_namespace" "sb" {



│ Error: invalid value for name (Cosmos DB Account name must be 3 - 50 characters long, contain only lowercase letters, numbers and hyphens.)

│ with module.state-store.azurerm_cosmosdb_account.tre-db-account,
│ on state-store/statestore.tf line 1, in resource "azurerm_cosmosdb_account" "tre-db-account":
│ 1: resource "azurerm_cosmosdb_account" "tre-db-account" {



│ Error: name ("stg_lldev123") can only consist of lowercase letters and numbers, and must be between 3 and 24 characters long

│ with module.storage.azurerm_storage_account.stg,
│ on storage/storage.tf line 1, in resource "azurerm_storage_account" "stg":
│ 1: resource "azurerm_storage_account" "stg" {


Releasing state lock. This may take a few moments...
make: *** [Makefile:52: tre-deploy] Error 1

@marrobi
Copy link
Copy Markdown
Member Author

marrobi commented Jun 16, 2021

@limorl it will fail, as the make file creates the backend configuration. Can you paste the output of make tre_deploy ?

@christoferlof christoferlof self-requested a review June 16, 2021 12:49
Copy link
Copy Markdown
Contributor

@christoferlof christoferlof left a comment

Choose a reason for hiding this comment

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

Everything that was in scope for this PR is working fine when testing it. However, there is some unnecessary confusion introduced by mentioning environment variables which are not required for the quickstart scenario. Will create separate issues to address.

@marrobi marrobi merged commit d373f11 into develop Jun 16, 2021
@marrobi marrobi deleted the marrobi/issue209-patch-2 branch June 16, 2021 19:52
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.

3 participants