Skip to content

schubergphilis/terraform-azure-mcaf-svm-csp

Repository files navigation

terraform-azure-mcaf-svm-csp

This terraform module will be able to manage subscriptions for CSP agreements.

how to work with this module

you need to configure the restful provider. make sure to ask the saas team to whitelist your outgoing ip.

provider "restful" {
  base_url = "https://your-csp-app-uri-here"

  header = {
    Content-Type = "application/json"
  }

  security = {
    apikey = [
      {
        in    = "header"
        name  = "x-functions-key"
        value = "x-functions-value"
      },
      {
        in    = "header"
        name  = "x-customer-key"
        value = "x-customer-value"
      },
    ]
  }
}

for variables, you need to provide a sku as well, default is 0001, which is fine. the following options are available.

"enabledAzurePlans": [
  {
    "skuId": "0001",
    "skuDescription": "Microsoft Azure Plan"
  }
  {
    "skuId": "0002",
    "skuDescription": "Microsoft Azure Plan for DevTest"
  },
]

Requirements

Name Version
terraform ~> 1.7
restful 0.14.0

Providers

Name Version
restful 0.14.0

Modules

No modules.

Resources

Name Type
restful_operation.this resource
restful_resource.subscription_metadata data source

Inputs

Name Description Type Default Required
subscription - name = (Required) - name that the subscription will get.
- sku = (Optional) - Production or a DevTest type of azure plan.
hcl
sub1 = {
name = "sub1"
sku = "0001"
}
object({
name = string
sku = optional(string, "0001")
})
n/a yes

Outputs

Name Description
subscriptions Will output the subscription id(s) and name(s) generated by the module.

License

Copyright: Schuberg Philis

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Releases

No releases published

Packages

No packages published

Languages