This file contains hidden or 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 = ">= 0.12, < 0.13" | |
backend "azurerm" { | |
resource_group_name = "tf-state-rg" | |
storage_account_name = "tfstatemohit20200930" | |
container_name = "azure-devops" | |
key = "terraform.tfstate" | |
} |
This file contains hidden or 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 "azurerm" { | |
version = "=2.20.0" | |
features {} | |
} | |
resource "azurerm_resource_group" "tf-state-resource-group" { | |
name = "tf-state-rg" | |
location = "eastus2" | |
} |
This file contains hidden or 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
output "azuredevops_project_id" { | |
value = azuredevops_project.tf-example.id | |
description = "azure devops project id" | |
} | |
output "azuredevops_project_name" { | |
value = azuredevops_project.tf-example.project_name | |
description = "azure devops project name" | |
} |
This file contains hidden or 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
# partially complete block of code below - will not work in isolation | |
terraform { | |
required_version = ">= 0.12, < 0.13" | |
backend "s3" { | |
bucket = "terrafrom-state-20200929" | |
key = "azure-devops/terraform.tfstate" | |
region = "us-east-2" | |
dynamodb_table = "terraformlocks-mohit-202009292250" |
This file contains hidden or 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 = ">= 0.12, < 0.13" | |
} | |
provider "aws" { | |
region = "us-east-2" | |
} | |
resource "aws_dynamodb_table" "terraform-locks" { | |
name = "terraform-locks-mohit-20200929" |
This file contains hidden or 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 = ">= 0.12, < 0.13" | |
} | |
provider "aws" { | |
region = "us-east-2" | |
} | |
resource "aws_s3_bucket" "terrafrom-state" { | |
bucket = "terrafrom-state" |
This file contains hidden or 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
# local .terraform directories | |
**/.terraform/* | |
# .tfstate files | |
*.tfstate | |
*.tfstate.* | |
# .tfvars files | |
*.tfvars |
This file contains hidden or 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
variable "service_principal_id" { | |
description = "Service Principal Id" | |
type = string | |
} | |
variable "service_principal_key" { | |
description = "Service Principal Password" | |
type = string | |
} |
This file contains hidden or 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
# partially complete code block below - will not work in isolation | |
resource "azuredevops_serviceendpoint_azurerm" "endpointazure" { | |
project_id = azuredevops_project.tf-example.id | |
service_endpoint_name = "azurerm_endpoint_test" | |
description = "Managed by Terraform" | |
credentials { | |
serviceprincipalid = var.service_principal_id | |
serviceprincipalkey = var.service_principal_key | |
} |
This file contains hidden or 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
# ASP.NET Core (.NET Framework) | |
# Build and test ASP.NET Core projects targeting the full .NET Framework. | |
# Add steps that publish symbols, save build artifacts, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | |
trigger: | |
- master | |
pool: | |
vmImage: 'windows-latest' |
NewerOlder