Skip to content

Commit 26a919e

Browse files
committed
Updating code to align with Contributor Guide template
1 parent 40c33d5 commit 26a919e

5 files changed

Lines changed: 47 additions & 18 deletions

File tree

quickstart/101-attestation-provider/main.tf

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
terraform {
2-
3-
required_version = ">=0.12"
4-
5-
required_providers {
6-
azurerm = {
7-
source = "hashicorp/azurerm"
8-
version = "~>2.0"
9-
}
10-
}
11-
}
12-
13-
provider "azurerm" {
14-
features {}
1+
resource "random_pet" "rg-name" {
2+
prefix = var.resource_group_name_prefix
153
}
164

175
resource "azurerm_resource_group" "rg" {
18-
name = var.resource_group_name
19-
location = var.resource_group_location
6+
name = random_pet.rg-name.id
7+
location = var.resource_group_location
208
}
219

2210
resource "azurerm_attestation_provider" "corpAttestation" {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "resource_group_name" {
2+
value = azurerm_resource_group.rg.name
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
terraform {
2+
3+
required_version = ">=0.12"
4+
5+
required_providers {
6+
azurerm = {
7+
source = "hashicorp/azurerm"
8+
version = "~>2.0"
9+
}
10+
}
11+
}
12+
13+
provider "azurerm" {
14+
features {}
15+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Azure attestation provider
2+
3+
This template deploys an [Attestation provider](/azure/attestation/overview) on Azure.
4+
5+
## Terraform resource types
6+
7+
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
8+
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
9+
- [azurerm_attestation_provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/attestation)
10+
11+
## Variables
12+
13+
| Name | Description | Default |
14+
|-|-|-|
15+
| `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 |
16+
| `resource_group_location` | (Optional) Azure Region in which to deploy these resources.| eastus |
17+
| `attestation_provider_name` | Name of the Attestation provider | attestationprovider007 |
18+
19+
## Example
20+
21+
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).

quickstart/101-attestation-provider/variables.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
variable "resource_group_name" {
2-
default = "myResourceGroup"
1+
variable "resource_group_name_prefix" {
2+
default = "rg"
3+
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
34
}
45

56
variable "resource_group_location" {
67
default = "eastus"
8+
description = "Location of the resource group."
79
}
810

911
variable "policy_file" {

0 commit comments

Comments
 (0)