Terraform module for verify Billing/Usage metrics are visible on OCI and Azure.
| Name | Version |
|---|---|
| azurerm | ~>3.0.0 |
| VARIABLE | DESCRIPTION | REQUIRED | DEFAULT_VALUE | SAMPLE VALUE |
|---|---|---|---|---|
config_file_profile |
OCI CLI profile name. | Yes | "DEFAULT" | "ONBOARDING" |
compartment_ocid |
Tenancy OCID of root comparment. | Yes | "ocid1.tenancy.oc1..xxxxxxxxxxxxx" | |
azure_resource_name |
The resource name of the resource. | Yes | ||
azure_resource_group_name |
The resource group name of the resource. | Yes |
- Using
az login --use-device-code --tenant <AZURE_TENANT_ID>. - Using
az account set <AZURE_SUBSCRIPTION_ID>to specify the desired subscription ID if you have multiple subscriptions within a tenant. - Login to OCI tenancy by executing the following command:
# authenticate OCI cli oci session authenticate --region=<region-identifier>
The following input tfvars must be set
Either as terraform.tfvars file in same directory
config_file_profile="<MY_OCI_PROFILE_NAME>"
oci_compartment_ocid="<MY_OCI_TENANCY_ID>"
azure_resource_group_name = "<MY_AZURE_RESOURCE_GROUP>"
azure_resource_name = "<MY_AZURE_RESOURCE_NAME>"
Or running as command line parameter
terraform apply -var="config_file_profile=DEFAULT" -var='compartment_ocid=ocid1.tenancy.oc1..xxxxxxxxxxxxx' -var='azure_resource_group_name=xxx' -var='azure_resource_name=xxx'
Init and Run
terraform init
terraform run
terraform destroy
rm -r ../../modules/billing-usage-metrics-validation/venv
NA