terraform-provider-azurerm-restapi

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2021 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform Provider for Azure Resource Manager Rest API

How to use?

This provider hasn't been formly released, it can only be used by configuring provider override.

1. git clone https://github.com/Azure/terraform-provider-azurerm-restapi.git
2. cd terraform-provider-azurerm-restapi
3. go install
4. edit terraform.rc and add the following configuration, refs: https://www.terraform.io/docs/cli/config/config-file.html
  
  dev_overrides {
    "Azure/azurerm-restapi" = "C:\\Users\\henglu\\go\\bin" #path to provider execute
  }

Usage Example

The following example shows how to use azurerm-restapi_resource to manage machine learning compute resource.

terraform {
  required_providers {
    azurerm-restapi = {
      source  = "Azure/azurerm-restapi"
    }
  }
}

provider "azurerm-restapi" {
  # More information on the authentication methods supported by
  # the AzureRM Provider can be found here:
  # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs

  # subscription_id = "..."
  # client_id       = "..."
  # client_secret   = "..."
  # tenant_id       = "..."
}

provider "azurerm" {
  features {}
}

data "azurerm_machine_learning_workspace" "existing" {
  name                = "example-workspace"
  resource_group_name = "example-resources"
}

resource "azurerm-restapi_resource" "example" {
  resource_id = "${data.azurerm_machine_learning_workspace.existing.id}/computes/example"
  type = "Microsoft.MachineLearningServices/workspaces/computes@2021-07-01"
  body = <<BODY
    {
      "location": "eastus",
      "properties": {
        "computeType": "ComputeInstance",
        "disableLocalAuth": true,
        "properties": {
          "vmSize": "STANDARD_NC6"
        }
      }
    }
  BODY
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL