-
Notifications
You must be signed in to change notification settings - Fork 87
resource_asg
Arthur Halet edited this page Jul 16, 2020
·
3 revisions
Provides an application security group resource for Cloud Foundry. This resource defines egress rules that can be applied to containers that stage and run applications.
~> NOTE: This resource requires the provider to be authenticated with an account granted admin permissions. ~> NOTE: Resource will not override all security group set but rather only manage ASGs defined in the resource.
Basic usage
resource "cloudfoundry_asg" "messaging" {
name = "rmq-service"
rule {
protocol = "tcp"
destination = "192.168.1.100"
ports = "1883,8883"
log = true
}
rule {
protocol = "tcp"
destination = "192.168.1.101"
ports = "5671-5672"
log = true
}
}
The following arguments are supported:
-
name
- (Required) The name of the application security group. -
rule
- (Required) A list of egress rules with the following arguments.-
protocol
- (Required, String) One oficmp
,tcp
,udp
, orall
. -
destination
- (Required, String) The IP address or CIDR block that can receive traffic. -
ports
- (Required, String) A single port, comma-separated ports or range of ports that can receive traffic. -
type
- (Optional, Integer) Allowed ICMP type. A value of -1 allows all types. Default is -1. -
code
- (Optional, Integer) Allowed ICMP code. . A value of -1 allows all codes. Default is -1. -
log
- (Optional, Boolean) Set totrue
to enable logging. For more information on how to configure system logs to be sent to a syslog drain, review the ASG logging documentation. Defaults to false. -
description
- (Optional, String) Description of the rule. Defaults to empty.
-
The following attributes are exported:
-
id
- The GUID of the application security group
The current Asg can be imported using the asg
guid, e.g.
$ terraform import cloudfoundry_asg.messaging a-guid
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_domain
- cloudfoundry_info
- cloudfoundry_isolation_segment
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_route
- cloudfoundry_router_group
- cloudfoundry_service
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_stack
- cloudfoundry_user
- cloudfoundry_user_provided_service
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_buildpack
- cloudfoundry_default_asg
- cloudfoundry_domain
- cloudfoundry_evg
- cloudfoundry_feature_flag
- cloudfoundry_isolation_segment
- cloudfoundry_isolation_segment_entitlement
- cloudfoundry_network_policy
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_org_users
- cloudfoundry_private_domain_access
- cloudfoundry_route
- cloudfoundry_route_service_binding
- cloudfoundry_service_broker
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_service_plan_access
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_space_users
- cloudfoundry_user
- cloudfoundry_user_provided_service