Skip to content

Commit

Permalink
Add example for Microsoft.Web_certificates@2021-02-01
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei committed Feb 19, 2025
1 parent 2b92eee commit 9ee247e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions examples/Microsoft.Web_certificates@2021-02-01/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}

provider "azapi" {
skip_provider_registration = false
}

variable "resource_name" {
type = string
default = "acctest0001"
}

variable "location" {
type = string
default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}

resource "azapi_resource" "certificate" {
type = "Microsoft.Web/certificates@2021-02-01"
name = var.resource_name
parent_id = azapi_resource.resourceGroup.id
location = var.location
body = {
properties = {
pfxBlob = filebase64("testdata/app_service_certificate.pfx")
password = "terraform"
}
}
}
Binary file not shown.

0 comments on commit 9ee247e

Please sign in to comment.