This terraform module will be able to manage subscriptions for CSP agreements.
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"
},
]
Name | Version |
---|---|
terraform | ~> 1.7 |
restful | 0.14.0 |
Name | Version |
---|---|
restful | 0.14.0 |
No modules.
Name | Type |
---|---|
restful_operation.this | resource |
restful_resource.subscription_metadata | data source |
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 |
object({ |
n/a | yes |
Name | Description |
---|---|
subscriptions | Will output the subscription id(s) and name(s) generated by the module. |
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.