*.tf
files) and state files that represent the current resources. If you are using Terraform locally, without a remote state store, these files should be checked into source control for future updates.
Create a new folder and add a file called main.tf
with the following content, replacing the referenced variables.
<YOUR_SNCLOUD_ORG_ID>
: your StreamNative Cloud organization ID. This is typically an ID like o-xxxxx
. This can be found in your organization list or the top header of the application.<ANY_AZURE_REGION>
: any valid Azure region, this region doesn’t hold any resources but just some managed identities, so it can be anywhere, such as eastus
or westus2
.git
as source control, you need to use the git init
command to initialize this folder as a git project.
terraform init
.
This will download the module and required dependencies.
Contributor
to the Azure subscription are sufficient to perform these operations.
All of the methods in Authenticating to Azure are compatible with the Terraform module. The most common method is to use the az
CLI to log in and set the credentials in the shell. You can check the Azure CLI for detailed instructions.
terraform apply
.
This will create a Terraform plan which shows all the resources to be created. To see an example plan, see the example plan in the GitHub readme.
terraform apply
to your CSM or support representative.
<YOUR_SNCLOUD_ORG_ID>
: your StreamNative Cloud organization ID. This is typically an ID like o-xxxxx
. This can be found in your organization list or the top header of the application.<YOUR_DESIRED_AZURE_REGION>
: the Azure region where you want to create the resources. This should be a valid Azure region, such as eastus
or westus2
, it can be different with the <ANY_AZURE_REGION>
.<YOUR_AKS_CLUSTER_RESOURCE_GROUP_NAME>
: the name of the resource group where the AKS cluster will be created. This should be a unique name within your Azure subscription.<CLIENT_ID>
: the client ID of the sn automation service principal for StreamNative Cloud automation.<SUPPORT_CLIENT_ID>
: the client ID of the sn support service principal for StreamNative Cloud support access.CLIENT_ID
and SUPPORT_CLIENT_ID
from the output of the previous terraform apply or from the Azure Portal:
There will be a ResourceGroup called sncloud-<ORG_ID>-manager-rg
in your Azure subscription, and it has two managed identities while one is sncloud-<ORG_ID>-automation
and the other is sncloud-<ORG_ID>-support
,
You can find the Client ID
in the sncloud-<ORG_ID>-automation
and sncloud-<ORG_ID>-support
managed identities.