Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): enhance logs with path to construct #1635

Merged
merged 5 commits into from
Mar 24, 2022

Conversation

DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Mar 21, 2022

Enhances the logs by adding an additional parenthesis with a construct-level path to the resource to the log lines including a resource mention.

baseA  Initializing the backend...
baseA  Initializing provider plugins...
       - Reusing previous version of hashicorp/random from the dependency lock file
baseA
baseA  - Reusing previous version of hashicorp/local from the dependency lock file
baseA  - Using previously-installed hashicorp/random v3.1.0
baseA  - Using previously-installed hashicorp/local v2.2.2
baseA  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.
baseA  Terraform used the selected providers to generate the following execution
       plan. Resource actions are indicated with the following symbols:
         + create

       Terraform will perform the following actions:
baseA    # random_password.Best_Nested_password_F0555A61 (Best/Nested/password) will be created
         + resource "random_password" "Best_Nested_password_F0555A61" {
             + id          = (known after apply)
             + length      = 10
             + lower       = true
             + min_lower   = 0
             + min_numeric = 0
             + min_special = 0
             + min_upper   = 0
             + number      = true
             + result      = (sensitive value)
             + special     = true
             + upper       = true
           }

         # random_string.Best_A-One_52D8D86F (Best/A-One) will be created
         + resource "random_string" "Best_A-One_52D8D86F" {
             + id          = (known after apply)
             + length      = 10
             + lower       = true
             + min_lower   = 0
             + min_numeric = 0
             + min_special = 0
             + min_upper   = 0
             + number      = true
             + result      = (known after apply)
             + special     = true
             + upper       = true
           }

         # random_string.Best_Nested_A-One_78565713 (Best/Nested/A-One) will be created
         + resource "random_string" "Best_Nested_A-One_78565713" {
             + id          = (known after apply)
             + length      = 10
             + lower       = true
             + min_lower   = 0
             + min_numeric = 0
             + min_special = 0
             + min_upper   = 0
             + number      = true
             + result      = (known after apply)
             + special     = true
             + upper       = true
           }

         # random_string.val (val) will be created
         + resource "random_string" "val" {
             + id          = (known after apply)
             + length      = 42
             + lower       = true
             + min_lower   = 0
             + min_numeric = 0
             + min_special = 0
             + min_upper   = 0
             + number      = true
             + result      = (known after apply)
             + special     = true
             + upper       = true
           }

       Plan: 4 to add, 0 to change, 0 to destroy.

       Changes to Outputs:
         + cross-stack-output-random_stringvalresult = (sensitive value)

       ─────────────────────────────────────────────────────────────────────────────

       Saved the plan to: plan

       To perform exactly these actions, run the following command to apply:
           terraform apply "plan"
baseA  random_string.val (val): Creating...
       random_string.Best_A-One_52D8D86F (Best/A-One): Creating...
baseA  random_password.Best_Nested_password_F0555A61 (Best/Nested/password): Creating...
       random_string.Best_Nested_A-One_78565713 (Best/Nested/A-One): Creating...
       random_string.val (val): Creation complete after 0s [id=*jO$O}T-F!a&To3efQNz}OZ*S}hx6QPbb?dh?]z7cU]
baseA  random_password.Best_Nested_password_F0555A61 (Best/Nested/password): Creation complete after 0s [id=none]
       random_string.Best_A-One_52D8D86F (Best/A-One): Creation complete after 0s [id=U]%qLGg[&E]
baseA  random_string.Best_Nested_A-One_78565713 (Best/Nested/A-One): Creation complete after 0s [id=n)yhAiJX4g]
baseA
       Apply complete! Resources: 4 added, 0 changed, 0 destroyed.

       Outputs:

       cross-stack-output-random_stringvalresult = <sensitive>
       output = ""

  baseA
  cross-stack-output-random_string.val.result = <sensitive>
  output =

packages/cdktf-cli/lib/execution-logs.ts Outdated Show resolved Hide resolved
@DanielMSchmidt DanielMSchmidt merged commit d41beac into main Mar 24, 2022
@DanielMSchmidt DanielMSchmidt deleted the enhance-logs-with-construct-path branch March 24, 2022 10:26
This was referenced Mar 24, 2022
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants