Skip to content

Commit

Permalink
base64encode(file -> filebase64
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte committed Feb 28, 2019
1 parent a5a5cf9 commit 8a0e651
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions azurerm/resource_arm_api_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ resource "azurerm_api_management" "test" {
}
certificate {
encoded_certificate = "${base64encode(file("testdata/api_management_api_test.pfx"))}"
encoded_certificate = "${filebase64("testdata/api_management_api_test.pfx")}"
certificate_password = "terraform"
store_name = "CertificateAuthority"
}
certificate {
encoded_certificate = "${base64encode(file("testdata/api_management_api_test.pfx"))}"
encoded_certificate = "${filebase64("testdata/api_management_api_test.pfx")}"
certificate_password = "terraform"
store_name = "Root"
}
Expand All @@ -291,22 +291,22 @@ resource "azurerm_api_management" "test" {
hostname_configuration {
proxy {
host_name = "api.terraform.io"
certificate = "${base64encode(file("testdata/api_management_api_test.pfx"))}"
certificate = "${filebase64("testdata/api_management_api_test.pfx")}"
certificate_password = "terraform"
default_ssl_binding = true
negotiate_client_certificate = false
}
proxy {
host_name = "api2.terraform.io"
certificate = "${base64encode(file("testdata/api_management_api2_test.pfx"))}"
certificate = "${filebase64("testdata/api_management_api2_test.pfx")}"
certificate_password = "terraform"
negotiate_client_certificate = true
}
portal {
host_name = "portal.terraform.io"
certificate = "${base64encode(file("testdata/api_management_portal_test.pfx"))}"
certificate = "${filebase64("testdata/api_management_portal_test.pfx"))}"
certificate_password = "terraform"
}
}
Expand Down
6 changes: 3 additions & 3 deletions azurerm/resource_arm_key_vault_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ resource "azurerm_key_vault_certificate" "test" {
key_vault_id = "${azurerm_key_vault.test.id}"
certificate {
contents = "${base64encode(file("testdata/keyvaultcert.pfx"))}"
contents = "${filebase64("testdata/keyvaultcert.pfx")}"
password = ""
}
Expand Down Expand Up @@ -466,7 +466,7 @@ resource "azurerm_key_vault_certificate" "test" {
vault_uri = "${azurerm_key_vault.test.vault_uri}"
certificate {
contents = "${base64encode(file("testdata/keyvaultcert.pfx"))}"
contents = "${filebase64("testdata/keyvaultcert.pfx")}"
password = ""
}
Expand Down Expand Up @@ -500,7 +500,7 @@ resource "azurerm_key_vault_certificate" "import" {
key_vault_id = "${azurerm_key_vault.test.id}"
certificate {
contents = "${base64encode(file("testdata/keyvaultcert.pfx"))}"
contents = "${filebase64("testdata/keyvaultcert.pfx")}"
password = ""
}
Expand Down
2 changes: 1 addition & 1 deletion azurerm/resource_arm_scheduler_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ resource "azurerm_scheduler_job" "test" {
method = "get"
authentication_certificate {
pfx = "${base64encode(file("testdata/application_gateway_test.pfx"))}"
pfx = "${filebase64("testdata/application_gateway_test.pfx")}"
password = "terraform"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/app-service/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "azurerm_app_service" "test" {
# ...
site_config = {
# ...
linux_fx_version = "COMPOSE|${base64encode(file("compose.yml"))}"
linux_fx_version = "COMPOSE|${filebase64("compose.yml")}"
}
lifecycle {
Expand Down
2 changes: 1 addition & 1 deletion examples/app-service/docker-compose/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "azurerm_app_service" "main" {

site_config {
app_command_line = ""
linux_fx_version = "COMPOSE|${base64encode(file("docker-compose.yml"))}"
linux_fx_version = "COMPOSE|${filebase64("docker-compose.yml")}"
}

app_settings = {
Expand Down
2 changes: 1 addition & 1 deletion examples/app-service/docker-kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "azurerm_app_service" "test" {
# ...
site_config = {
# ...
linux_fx_version = "KUBE|${base64encode(file("kubernetes.yml"))}"
linux_fx_version = "KUBE|${filebase64("kubernetes.yml")}"
}
lifecycle {
Expand Down
2 changes: 1 addition & 1 deletion examples/app-service/docker-kubernetes/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "azurerm_app_service" "main" {

site_config {
app_command_line = ""
linux_fx_version = "KUBE|${base64encode(file("kubernetes.yml"))}"
linux_fx_version = "KUBE|${filebase64("kubernetes.yml")}"
}

app_settings = {
Expand Down
2 changes: 1 addition & 1 deletion examples/scheduler-jobs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ resource "azurerm_scheduler_job" "web-recurring_weekly-auth_cert" {
method = "get"

authentication_certificate {
pfx = "${base64encode(file("../../azurerm/testdata/application_gateway_test.pfx"))}"
pfx = "${filebase64("../../azurerm/testdata/application_gateway_test.pfx")}"
password = "terraform"
}
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/app_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ A `site_config` block supports the following:

~> **NOTE:** MySQL In App is not intended for production environments and will not scale beyond a single instance. Instead you may wish [to use Azure Database for MySQL](/docs/providers/azurerm/r/mysql_database.html).

* `linux_fx_version` - (Optional) Linux App Framework and version for the App Service. Possible options are a Docker container (`DOCKER|<user/image:tag>`), a base-64 encoded Docker Compose file (`COMPOSE|${base64encode(file("compose.yml"))}`) or a base-64 encoded Kubernetes Manifest (`KUBE|${base64encode(file("kubernetes.yml"))}`).
* `linux_fx_version` - (Optional) Linux App Framework and version for the App Service. Possible options are a Docker container (`DOCKER|<user/image:tag>`), a base-64 encoded Docker Compose file (`COMPOSE|${filebase64("compose.yml")}`) or a base-64 encoded Kubernetes Manifest (`KUBE|${filebase64("kubernetes.yml")}`).

Additional examples of how to run Containers via the `azurerm_app_service` resource can be found in [the `./examples/app-service` directory within the Github Repository](https://github.com/terraform-providers/terraform-provider-azurerm/tree/master/examples/app-service).

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/key_vault_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource "azurerm_key_vault_certificate" "test" {
key_vault_id = "${azurerm_key_vault.test.id}"
certificate {
contents = "${base64encode(file("certificate-to-import.pfx"))}"
contents = "${filebase64("certificate-to-import.pfx")}"
password = ""
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/scheduler_job.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ resource "azurerm_scheduler_job" "web-recurring-daily" {
url = "https://this.url.fails"
authentication_certificate {
pfx = "${base64encode(file("your_cert.pfx"))}"
pfx = "${filebase64("your_cert.pfx")}"
password = "cert_password"
}
}
Expand Down

0 comments on commit 8a0e651

Please sign in to comment.