18 KiB
- original_name
en-us_topic_0000001955571466.html
Creating a Stack
Start creating a stack
There are four ways to start creating a stack here:
- On the Dashboard page, click Create Stack in the upper right corner, as shown in
Figure Creating a stack on Dashboard <en-us_topic_0000001955571466__fig1102195810527>
. - On the Stacks page , click Create Stack in the upper right corner, as shown in
Figure Creating a stack on Stacks page <en-us_topic_0000001955571466__fig14448537155319>
. - On the Templates -> My Templates page, click Create Stack under the Operation column associated with an existing template, as shown in
Figure Creating a stack on My Templates page <en-us_topic_0000001955571466__fig103713552537>
. - On the template details page, click Create Stack under the Operation column associated with a specific template version, as shown in
Figure Creating a stack on template details page <en-us_topic_0000001955571466__fig107841574534>
.
- On the Dashboard page, click Create Stack in the upper right corner, as shown in




Select Template
There are three ways to select a template, as shown in
Figure Selecting a template <en-us_topic_0000001955571466__fig133342145369>
:Select a template from My Templates: Template name and version selector dropdowns.
Enter a URL of an OBS template: Template URL dropdown. (The URL must contain at least the deployment code file, and the file size cannot exceed 1 MB.)
Example: https://test-stack-template.obs.eu-de.otc.t-systems.com/main.tf
Upload a local template file: click "Add File" button.
Then click Next to go to the parameter configuration page.
Important
The .tf, .tf.json, and .zip files are supported. At least the deployment code file needs to be uploaded. The size of a file cannot exceed 50 KB. The size of a decompressed .zip file cannot exceed 1 MB.

Caution
- A stack is created using a template. The template must contain the deployment code file which file name extension is tf or tf.json.
- The deployment code file must use the open source HCL syntax. After the file is imported, the corresponding resource configuration table is generated for users to configure resource parameters. This file must be provided in URL or via template upload.
- When using the RFS service, users do not need to specify the "access_key" and "secret_key" fields under the provider block in the template.
- RFS only uses the data you upload for resource management.
The following is an example of uploading a local template file. In this example, the ecs_test.tf.json file is uploaded. The template content is as follows:
{
"terraform": {
"required_providers": {
"opentelekomcloud": {
"source": "opentelekomcloud/provider/opentelekomcloud",
"version": "1.35.13"
}
}
},
"provider": {
"opentelekomcloud": {
"region": "eu-de",
"insecure": true,
"auth_url": "https://iam.eu-de.otc.t-systems.com/v3",
"tenant_name": "eu-de",
"domain_name": "OTC-EU-DE-xxxxxxxxxxxxxxxxxxxx",
"user_name": "xxxxxxxxxx"
}
},
"variable": {
"vpc_name": {
"type": "string",
"description": "vpc name",
"default": "rf_test_stack_example_vpc",
"sensitive": true,
"nullable": false
},
"subnet_name": {
"type": "string",
"description": "subnet name",
"default": "rf_test_stack_example_subnet"
},
"ecs_name": {
"type": "string",
"description": "ecs name",
"default": "rf_test_stack_example_ecs"
},
"compute_keypair_name": {
"type": "string",
"description": "ecs compute key pair name",
"default": "rf_test_stack_example_keypair"
},
"storage_volume_name": {
"type": "string",
"description": "storage volume name",
"default": "rf_test_stack_example_volume"
}
},
"resource": {
"opentelekomcloud_vpc_v1": {
"rf_doc_vpc": {
"name": "${var.vpc_name}",
"cidr": "192.168.0.0/16"
}
},
"opentelekomcloud_vpc_subnet_v1": {
"rf_doc_subnet": {
"name": "${var.subnet_name}",
"vpc_id": "${opentelekomcloud_vpc_v1.rf_doc_vpc.id}",
"cidr": "192.168.1.0/24",
"gateway_ip": "192.168.1.1"
}
},
"opentelekomcloud_compute_keypair_v2": {
"rf_doc_keypair": {
"name": "${var.compute_keypair_name}"
}
},
"opentelekomcloud_compute_instance_v2": {
"rf_doc_ecs": {
"name": "${var.ecs_name}",
"flavor_id": "s2.large.1",
"image_id": "c93ca99f-c5ee-451b-96e6-08c772edaec9",
"availability_zone": "eu-de-01",
"key_pair": "${opentelekomcloud_compute_keypair_v2.rf_doc_keypair.name}",
"security_groups": ["default"],
"network": {
"uuid": "${opentelekomcloud_vpc_subnet_v1.rf_doc_subnet.id}"
}
}
},
"opentelekomcloud_blockstorage_volume_v2": {
"rf_doc_volume": {
"name": "${var.storage_volume_name}",
"size": 4,
"availability_zone": "eu-de-01"
}
},
"opentelekomcloud_compute_volume_attach_v2": {
"rf_doc_volume_attach": {
"instance_id": "${opentelekomcloud_compute_instance_v2.rf_doc_ecs.id}",
"volume_id": "${opentelekomcloud_blockstorage_volume_v2.rf_doc_volume.id}"
}
}
},
"output": {
"ecs_address": {
"value": "${opentelekomcloud_compute_instance_v2.rf_doc_ecs.access_ip_v4}",
"description": "The ecs private address."
},
"ecs_id": {
"value": "${opentelekomcloud_compute_instance_v2.rf_doc_ecs.id}",
"description": "The ecs resource id."
}
}
}
Caution
The sample template contains charged resources. Check whether resources need to be enabled before using the template.
The template consists of eight parts:
- opentelekomcloud_vpc_v1 in resource indicates VPC information.
- opentelekomcloud_vpc_subnet_v1 in resource indicates information about a subnet defined in the VPC.
- opentelekomcloud_compute_keypair_v2 in resource indicates information about compute keypair defined in the template.
- opentelekomcloud_compute_instance_v2 in resource indicates information about an ECS defined in the template.
- opentelekomcloud_blockstorage_volume_v2 in resource indicates information about an EVS storage volume defined in the template.
- opentelekomcloud_compute_volume_attach_v2 in resource indicates the binding relationship between EVS storage volumes and ECS.
- variable indicates variables defined by users in templates during stack creation and deployment.
- output defines the outputs of templates. After a stack is created, its output is generated based on the definition and displayed on the
Outputs <en-us_topic_0000001991770629__li167036103014>
tab page.
For detailed usage of other resources, please refer to OpenTelekom Cloud Provider.
Configure parameters
On the parameter configuration page, you can modify the stack name and description and can configure the template parameters, as shown in
Figure Configuring parameters <en-us_topic_0000001955571466__fig179172325107>
.
Caution
The stack name must start with a letter and can contain a maximum of 128 characters, including letters, digits, underscores (_), and hyphens (-). The name must be unique.
A stack description can contain a maximum of 255 characters.

Parameters for which the 'nullable' field is set to 'false' in template is marked with a red asterisk (*
) are mandatory. Set these parameters to valid values.
When certain variables in the template have the field 'sensitive' set to true, KMS encryption can be selected, as shown in Figure Encrypt requirements <en-us_topic_0000001955571466__fig15774183016141>
. After encryption is enabled, RFS uses KMS to encrypt parameters whose sensitive is set to true in the template, to ensure that data is transmitted and stored in ciphertext.

If a value is invalid, the corresponding text box will turn red (as shown in Figure 8 <en-us_topic_0000001955571466____d0e644>
) and page redirection will not be triggered after you click Next.

Check whether the default VPC, subnet, and ECS names used on this page already exist on the corresponding consoles. If the names already exist, change them to unique ones to prevent creation failures.
Then click Next. The Configure Stack page is displayed.
Configure the stack.
Optional parameters , as shown in
Figure 9 <en-us_topic_0000001955571466____d0e688>
:IAM Agency (Optional): An agency can clearly define operation permissions of RFS (such as creation, update, and deletion) on stack resources. If the agency permissions are insufficient, subsequent operations may fail. For more details of how to create agency, see
create an agency <en-us_topic_0000001991890817>
.Deletion Protection: prevents the stack from being deleted accidentally. After a stack is created, You can modify it on the stack details page.
Auto-Rollback: If auto-rollback is enabled, the stack automatically rolls back to the previous successful resource status when an operation fails.
After the stack is created, you can modify the stack configurations on its details page.
Click Next to go to the Confirm Configurations page.
Figure 9 Configuring the stack Check the configuration and make sure everything is set correctly.
After you confirm the configurations, you can click either Create Execution Plan or Directly Deploy Stack.
- If you click Directly Deploy Stack, a
confirmation dialog box <en-us_topic_0000001955571466__fig38972020557>
will be displayed.
Figure 10 Directly deploy stack - Click Yes. A new stack is generated and its status is Deployment In Progress, as shown in
Figure 11 <en-us_topic_0000001955571466____d0e756>
. And it will redirect to the stack events page, as shown inFigure Stack Events <en-us_topic_0000001955571466__fig173401257402>
.
Figure 11 Deployment in progress
Figure 12 Stack Events - Then, if everything goes well, the status changes to Deployment Complete, as shown in
Figure Deployment complete <en-us_topic_0000001955571466__fig73237820229>
.
Figure 13 Deployment complete
- If you click Create Execution Plan, a dialog box of creating execution plan will be displayed. In this dialog box, you can set the name and description of the execution plan, as shown in
Figure Create Execution Plan dialog box <en-us_topic_0000001955571466__fig1032312852212>
.
Figure 14 Create Execution Plan dialog box Caution
The execution plan name must start with a letter and can contain a maximum of 128 characters,eincluding only letters, digits, underscores(_), and hyphens (-).
- Click OK. The Execution Plans tab page is displayed.
- Wait until the execution plan is created and refresh the page. The execution plan status changes to Available, as shown in
Figure Execution Plan Available <en-us_topic_0000001955571466__fig432318842212>
.
Figure 15 Execution Plan Available
- Return to the stack list page. The stack status is Creation Complete, as shown in
Figure 16 <en-us_topic_0000001955571466____d0e813>
.
Figure 16 Stack list
Caution
Creating an execution plan can preview the resource attribute changes of the entire stack and evaluate the impact. If the execution plan meets your expectations, you can execute the plan. Creating an execution plan does not incur fees. The system changes your stack only when you execute the plan.
- Click Deploy in the Operation column of the execution plan to deploy it, as shown in
Figure 17 <en-us_topic_0000001955571466____d0e835>
.
Figure 17 Execution plan dialog box - In the Execution Plan dialog box, click Execute. A message indicating that the execution plan is being deployed is displayed in the upper right corner. Return to the stack list page. A new stack is generated and its status is Deployment In Progress, as shown in
Figure Deployment in progress <en-us_topic_0000001955571466__fig65231214111516>
.
Figure 18 Deployment in progress - Then, the stack status changes to Deployment Complete, as shown in
Figure 19 <en-us_topic_0000001955571466____d0e866>
.
Figure 19 Deployment complete
- On the Execution Plans tab page of the stack details page, the execution plan status is Applied, as shown in
Figure 20 <en-us_topic_0000001955571466____d0e882>
.
Figure 20 Applied - If you click Directly Deploy Stack, a
Click the Events tab. The event list shows that resources of the stack are deployed, as shown in Figure 21 <en-us_topic_0000001955571466____d0e895>
.
Figure 21 Resources deployed
You can view additional details on the console of the corresponding cloud service.(Figure ECS <en-us_topic_0000001955571466__fig1268133163913>
shows the deployed resources on the ECS console for the above example).

Resources of the stack are deployed.