This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: app | |
namespace: myapp | |
spec: | |
containers: | |
- name: mypod | |
image: mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine | |
resources: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: azurefile | |
namespace: myapp | |
spec: | |
accessModes: | |
- ReadWriteMany | |
storageClassName: azurefile-csi | |
volumeName: azurefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
annotations: | |
pv.kubernetes.io/provisioned-by: file.csi.azure.com | |
name: azurefile | |
spec: | |
capacity: | |
storage: 5Gi | |
accessModes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: resources.azure.com/v1api20200601 | |
kind: ResourceGroup | |
metadata: | |
name: rg-app | |
namespace: myapp | |
spec: | |
location: eastus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = "~> 1.0" | |
required_providers { | |
azurerm = { | |
version = "~> 3.35" | |
} | |
} | |
} | |
provider "azurerm" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TERRAFORM_VERSION="0.12.20" | |
curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ | |
&& curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_SHA256SUMS \ | |
&& curl https://keybase.io/hashicorp/pgp_keys.asc | gpg --import \ | |
&& curl -Os https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_SHA256SUMS.sig \ | |
&& gpg --verify terraform_${TERRAFORM_VERSION}_SHA256SUMS.sig terraform_${TERRAFORM_VERSION}_SHA256SUMS \ | |
&& shasum -a 256 -c terraform_${TERRAFORM_VERSION}_SHA256SUMS 2>&1 | grep "${TERRAFORM_VERSION}_linux_amd64.zip:\sOK" \ | |
&& unzip -o terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azuredevops_build_definition" "build-def1" { | |
name = "build-def-CI" | |
project_id = "${azuredevops_project.project.name}" | |
description = "It' definition created by Terraform" | |
repository { | |
name = "${azuredevops_project.project.name}" | |
type = "TfsGit" | |
branch = "master" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azuredevops_build_definition" "build-def1" { | |
......... | |
designer_phase { | |
name = "phase1" | |
step { | |
display_name = "teststep" | |
task_id = "d9bafed4-0b18-4f58-968d-86655b4d2ce9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "azuredevops" { | |
organization = "<name of your Azure DevOps organisation>" | |
token = "<Your PAT authentication>" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_virtual_machine" "myterraformvm" { | |
name = "myVM" | |
location = "eastus" | |
resource_group_name = "${azurerm_resource_group.myterraformgroup.name}" | |
network_interface_ids = ["${azurerm_network_interface.myterraformnic.id}"] | |
vm_size = "Standard_DS1_v2" | |
storage_os_disk { | |
name = "myOsDisk" | |
caching = "ReadWrite" |
NewerOlder