azure::application-gateway¶
Creates an Application Gateway.
Azure Application Gateways are managed using a combination of resource configuration and commands.
Create an Azure Application Gateway using the azure::application-gateway
resource. After the Application Gateway is
created use the gyro azure application-gateway
command to manage certificates within the application gateway.
See documentation below on how to create, add, or remove a certificate from an application gateway.
Example¶
azure::application-gateway application-gateway-example
name: "application-gateway-example"
resource-group: $(azure::resource-group resource-group-example-AG)
network: $(azure::network network-example-AG)
subnet: "subnet1"
public-ip-address: $(azure::public-ip-address public-ip-address-example-AG)
sku-tier: "STANDARD"
sku-size: "STANDARD_SMALL"
instance-count: 1
enable-http2: true
tags: {
Name: "application-gateway-example"
}
request-routing-rule
name: "request-routing-rule-example"
listener: "listener-example"
backend: "backend-example"
backend-http-configuration: "backend-http-configuration-example"
end
request-routing-rule
name: "request-routing-rule-2-example"
listener: "listener-example-2"
redirect-configuration: "redirect-configuration-example"
end
redirect-configuration
name: "redirect-configuration-example"
type: "Temporary"
target-listener: "listener-example-3"
include-query-string: true
include-path: true
end
listener
name: "listener-example"
port: 81
end
listener
name: "listener-example-2"
port: 82
end
listener
name: "listener-example-3"
port: 83
end
backend
name: "backend-example"
ip-addresses: [
"10.0.0.2",
"10.0.0.3"
]
end
backend-http-configuration
name: "backend-http-configuration-example"
port: 8080
cookie-name: "something"
enable-affinity-cookie: false
probe: "probe-example"
connection-draining-timeout: 30
host-header: "something"
host-header-from-backend: false
backend-path: "something"
end
probe
name: "probe-example"
host-name: "www.google.com"
path: "/path"
interval: 40
timeout: 40
unhealthy-threshold: 4
https-protocol: false
http-response-codes: [
"200-210"
]
http-response-body-match: "body"
end
end
Certificate Commands¶
The following set of commands allow you to manage certificates in an application gateway. Before using these commands
you must have already created an azure::application-gateway
. The application gateway must be managed by Gyro. Ensure a proper
access policy is added to the key vault for the service principal you are using.
Add Certificate
Adds a certificate to an application gateway using your certificate file (.pfx).
gyro azure application-gateway add-certificate <application-gateway-name> <cert-name> <path> --password <password>
application-gateway-name
- The name of the application gateway resource defined in your config where you want to create your certificate.cert-name
- The name of the certificate that you want to create when you import the certificate file.cert-path
- The path pointing to the certificate file to be uploaded. Only.pfx
files are supported.password
- An optional password if the certificate file was encrypted with one.
Import Certificate
Imports a certificate to an application gateway from your vault. For the import to work make sure the vault is in the soft delete phase and give appropriate access policy to a managed identity to the vault that you have also added to the application gateway.
gyro azure application-gateway import-certificate <application-gateway-name> <cert-name> <path> --password <password>
application-gateway-name
- The name of the application gateway resource defined in your config where you want to import your certificate.cert-name
- The name of the certificate that you want to create when you import the certificate.vault-name
- The name of the key-vault resource defined in your config from which you want to import the certificate from.vault-cert-name
- The name of the certificate in the vault that you want to import.
Remove Certificate
Remove a certificate from the application gateway.
gyro azure application-gateway remove-certificate <application-gateway-name> <cert-name>
application-gateway-name
- The name of the application gateway resource defined in your config from which to remove the certificate.cert-name
- The name of the certificate that you want to remove.
List Certificate
List certificates of an application gateway.
gyro azure vault list-certificate <application-gateway-name>
application-gateway-name
- The name of the vault resource defined in your config that you want to list certificates from.
Attributes¶
Attribute | Description |
---|---|
resource-group | The resource group under which the Application Gateway would reside. (Required) |
network | The Network which would be associated with the Application Gateway. (Required) |
public-ip-address | The Public IP Address associated with the Application Gateway. (Required) |
subnet | One of the subnet name from the assigned virtual network for the Application Gateway. (Required) |
name | Name of the Application Gateway. (Required) |
request-routing-rule set subresource | Request routing rule for the Application Gateway. (Required)
|
listener set subresource | Listener for the Application Gateway. (Required)
|
backend set subresource | Backend for the Application Gateway. Required if no redirect configuration present.
|
backend-http-configuration set subresource | Backend http configuration for the Application Gateway. Required if no redirect configuration present.
|
redirect-configuration set subresource | Redirect configuration for the Application Gateway. Required if no backend present.
|
probe set subresource | Probe for the Application Gateway.
|
sku-size | The SKU for the Application Gateway. Valid values are STANDARD_SMALL , STANDARD_MEDIUM , STANDARD_LARGE , WAF_MEDIUM , WAF_LARGE , STANDARD_V2 or WAF_V2 . (Required) |
sku-tier | The SKU for the Application Gateway. Valid values are STANDARD , STANDARD_V2 , WAF or WAF_V2 . (Required) |
instance-count | Number of instances to scale for the Application Gateway. (Required) |
tags map | Tags for the Application Gateway. |
enable-http2 | Enable http2 for the Application Gateway. Defaults to false. |
private-front-end | Private front end for the Application Gateway. Defaults to false. |
availability-zones set | Availability Zones this Application Gateway should be deployed to redundancy. Valid values are 1 , 2 and 3 . |
managed-service-identity subresource | The managed service identity configuration for the application gateway.
|
Outputs¶
Attribute | Description |
---|---|
id | The ID of the application gateway. |