-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write Terraform CLI logs to container stdout (#258)
* Add spec.enablelogging to workspace Signed-off-by: Katrina Ronquillo <[email protected]> * Send Workspace spec.enableLogging to Terraform Harness Signed-off-by: Suvaansh Kumar <[email protected]> * Add logic to send Terraform Plan output to container logs Signed-off-by: Suvaansh Kumar <[email protected]> * Revert example providerconfig Signed-off-by: Katrina Ronquillo <[email protected]> * Log structurally in json format Signed-off-by: Suresh Ramasamy <[email protected]> * Refactor enableTerraformCLILogging flag, Fix time formattting for logging Signed-off-by: Suresh Ramasamy <[email protected]> * updated documentation and fix lint errors Signed-off-by: Suresh Ramasamy <[email protected]> * Restructure workspace to add enableterraformlogs to forprovider Signed-off-by: Suresh Ramasamy <[email protected]> * Revert providerconfig Signed-off-by: Suresh Ramasamy <[email protected]> * Made EnableTerraformCLILogging Optional and added a description. Added Operation key value pair to logs. * Reverting WhiteSpace changes * replaced newline at end of providerconfig.yaml * Show operation on error * Revert logging format changes Signed-off-by: Katrina Ronquillo <[email protected]> * Change Terraform destroy logging message Signed-off-by: Katrina Ronquillo <[email protected]> * Fix unformatted file Signed-off-by: Katrina Ronquillo <[email protected]> --------- Signed-off-by: Katrina Ronquillo <[email protected]> Signed-off-by: Suvaansh Kumar <[email protected]> Signed-off-by: Suresh Ramasamy <[email protected]> Signed-off-by: Katrina Ronquillo <[email protected]> Co-authored-by: Suvaansh Kumar <[email protected]> Co-authored-by: Katrina Ronquillo <[email protected]> Co-authored-by: Rami Radaideh <[email protected]> Co-authored-by: Tammy Young <[email protected]>
- Loading branch information
1 parent
1720633
commit 8850b8a
Showing
7 changed files
with
138 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: tf.upbound.io/v1beta1 | ||
kind: Workspace | ||
metadata: | ||
name: example-random-generator | ||
annotations: | ||
meta.upbound.io/example-id: tf/v1beta1/workspace | ||
# The terraform workspace will be named 'random'. If you omit this | ||
# annotation it would be derived from metadata.name - e.g. 'example-random-generator. | ||
crossplane.io/external-name: random | ||
spec: | ||
forProvider: | ||
enableTerraformCLILogging: true | ||
source: Inline | ||
module: | | ||
resource "random_id" "example_id" { | ||
byte_length = 8 | ||
} | ||
resource "random_password" "password" { | ||
length = 16 | ||
special = true | ||
} | ||
// Non-sensitive Outputs are written to status.atProvider.outputs and to the connection secret. | ||
output "random_id_hex" { | ||
value = random_id.example_id.hex | ||
} | ||
// Sensitive Outputs are only written to the connection secret | ||
output "random_password" { | ||
value = random_password.password | ||
sensitive = true | ||
} | ||
// Terraform has several other random resources, see the random provider for details | ||
writeConnectionSecretToRef: | ||
namespace: default | ||
name: terraform-workspace-example-random-generator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters