alicloud_service_catalog_principal_portfolio_association
更新时间:
Provides a Service Catalog Principal Portfolio Association resource.
Principal portfolio association.
For information about Service Catalog Principal Portfolio Association and how to use it, see What is Principal Portfolio Association.
-> NOTE: Available since v1.230.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
provider "alicloud" {
region = "cn-hangzhou"
}
resource "alicloud_service_catalog_portfolio" "defaultDaXVxI" {
provider_name = var.name
description = "desc"
portfolio_name = var.name
}
resource "alicloud_ram_role" "default48JHf4" {
name = var.name
document = <<EOF
{
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"emr.aliyuncs.com",
"ecs.aliyuncs.com"
]
}
}
],
"Version": "1"
}
EOF
description = "this is a role test."
force = true
}
resource "alicloud_service_catalog_principal_portfolio_association" "default" {
principal_id = alicloud_ram_role.default48JHf4.id
portfolio_id = alicloud_service_catalog_portfolio.defaultDaXVxI.id
principal_type = "RamRole"
}
Argument Reference
The following arguments are supported:
portfolio_id
- (Required, ForceNew) Product Portfolio IDprincipal_id
- (Required, ForceNew) RAM entity IDprincipal_type
- (Required, ForceNew) RAM entity type
Attributes Reference
The following attributes are exported:
id
- The ID of the resource supplied above.The value is formulated as<principal_id>:<principal_type>:<portfolio_id>
.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Principal Portfolio Association.delete
- (Defaults to 5 mins) Used when delete the Principal Portfolio Association.
Import
Service Catalog Principal Portfolio Association can be imported using the id, e.g.
$ terraform import alicloud_service_catalog_principal_portfolio_association.example <principal_id>:<principal_type>:<portfolio_id>
文档内容是否对您有帮助?