generated from actions/hello-world-javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7a8992
commit 1a0691c
Showing
6 changed files
with
29 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ This could be used by `Azure/appservice-settings@v1` action. | |
|
||
### `terraform` | ||
|
||
The Hashicorp Terraform `tfvars` structure as `portal_app_settings_secrets` object. | ||
The Hashicorp Terraform `tfvars.json` structure as `portal_app_settings_secrets` object. | ||
This could be used by `hashicorp/[email protected]` action. | ||
|
||
## Example usage | ||
|
@@ -72,22 +72,22 @@ This could be used by `hashicorp/[email protected]` action. | |
- name: Set the ENV as tfvars | ||
working-directory: terraform | ||
run: | | ||
echo $terraform_var > ./terraform.tfvars | ||
echo $terraform_var > ./terraform.tfvars.json | ||
env: | ||
terraform_var: ${{ steps.aenv.outputs.terraform}} | ||
|
||
``` | ||
|
||
The structure of variable.tf is: | ||
```yaml | ||
variable "portal_app_settings" { | ||
variable "web_app_settings" { | ||
type = map(map(string)) | ||
default = { "eun" = { "Hello" = "World" } } | ||
sensitive = true | ||
} | ||
``` | ||
|
||
After deploy do not forget to remove the `terraform.tfvars` file for security reasons: | ||
After deploy do not forget to remove the `terraform.tfvars.json` file for security reasons: | ||
```yaml | ||
# Create/Destroy infrastructure | ||
- name: Create/Destroy infrastructure | ||
|
@@ -96,18 +96,23 @@ After deploy do not forget to remove the `terraform.tfvars` file for security re | |
terraform init -input=false | ||
terraform plan -out=tfplan -input=false | ||
terraform apply -input=false tfplan | ||
rm ./terraform.tfvars | ||
rm ./terraform.tfvars.json | ||
rm ./tfplan | ||
``` | ||
The structure: | ||
```yaml | ||
web_app_settings = { | ||
WEBSITES_PORT = "3000" | ||
```json | ||
{ | ||
"web_app_settings": { | ||
"frontend": { | ||
"WEBSITES_PORT": "3000", | ||
"WEBSITES_URL": "http://localhost" | ||
} | ||
} | ||
} | ||
``` | ||
Assigning in Terraform: | ||
```yaml | ||
app_settings = var.web_app_settings | ||
app_settings = var.web_app_settings[frontend] | ||
``` |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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