Updating code to align with Contributor Guide template
This commit is contained in:
parent
40c33d528f
commit
26a919e903
@ -1,22 +1,10 @@
|
|||||||
terraform {
|
resource "random_pet" "rg-name" {
|
||||||
|
prefix = var.resource_group_name_prefix
|
||||||
required_version = ">=0.12"
|
|
||||||
|
|
||||||
required_providers {
|
|
||||||
azurerm = {
|
|
||||||
source = "hashicorp/azurerm"
|
|
||||||
version = "~>2.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
provider "azurerm" {
|
|
||||||
features {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_resource_group" "rg" {
|
resource "azurerm_resource_group" "rg" {
|
||||||
name = var.resource_group_name
|
name = random_pet.rg-name.id
|
||||||
location = var.resource_group_location
|
location = var.resource_group_location
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_attestation_provider" "corpAttestation" {
|
resource "azurerm_attestation_provider" "corpAttestation" {
|
||||||
|
3
quickstart/101-attestation-provider/output.tf
Normal file
3
quickstart/101-attestation-provider/output.tf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
output "resource_group_name" {
|
||||||
|
value = azurerm_resource_group.rg.name
|
||||||
|
}
|
15
quickstart/101-attestation-provider/providers.tf
Normal file
15
quickstart/101-attestation-provider/providers.tf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
terraform {
|
||||||
|
|
||||||
|
required_version = ">=0.12"
|
||||||
|
|
||||||
|
required_providers {
|
||||||
|
azurerm = {
|
||||||
|
source = "hashicorp/azurerm"
|
||||||
|
version = "~>2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
provider "azurerm" {
|
||||||
|
features {}
|
||||||
|
}
|
21
quickstart/101-attestation-provider/readme.md
Normal file
21
quickstart/101-attestation-provider/readme.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Azure attestation provider
|
||||||
|
|
||||||
|
This template deploys an [Attestation provider](/azure/attestation/overview) on Azure.
|
||||||
|
|
||||||
|
## Terraform resource types
|
||||||
|
|
||||||
|
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
|
||||||
|
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
|
||||||
|
- [azurerm_attestation_provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/attestation)
|
||||||
|
|
||||||
|
## Variables
|
||||||
|
|
||||||
|
| Name | Description | Default |
|
||||||
|
|-|-|-|
|
||||||
|
| `resource_group_name_prefix` | (Optional) Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription.| rg |
|
||||||
|
| `resource_group_location` | (Optional) Azure Region in which to deploy these resources.| eastus |
|
||||||
|
| `attestation_provider_name` | Name of the Attestation provider | attestationprovider007 |
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
To see how to run this example, see [Configure an Azure Attestation provider using Terraform](https://docs.microsoft.com/en-us/azure/developer/terraform/create-attestation-provider).
|
@ -1,9 +1,11 @@
|
|||||||
variable "resource_group_name" {
|
variable "resource_group_name_prefix" {
|
||||||
default = "myResourceGroup"
|
default = "rg"
|
||||||
|
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "resource_group_location" {
|
variable "resource_group_location" {
|
||||||
default = "eastus"
|
default = "eastus"
|
||||||
|
description = "Location of the resource group."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "policy_file" {
|
variable "policy_file" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user