anypoint

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2024 License: MIT, Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const APIM_MULE4_TECHNOLOGY = "mule4"
View Source
const BG_VIEWER_ROLE = "833ab9ca-0c72-45ba-9764-1df83240db57"
View Source
const COMPOSITE_ID_SEPARATOR = "/"
View Source
const FLEX_GATEWAY_TECHNOLOGY = "flexGateway"

Variables

View Source
var DATASOURCES_MAP = map[string]*schema.Resource{
	"anypoint_vpcs":                                  dataSourceVPCs(),
	"anypoint_vpc":                                   dataSourceVPC(),
	"anypoint_vpn":                                   dataSourceVPN(),
	"anypoint_bg":                                    dataSourceBG(),
	"anypoint_roles":                                 dataSourceRoles(),
	"anypoint_rolegroup":                             dataSourceRoleGroup(),
	"anypoint_rolegroups":                            dataSourceRoleGroups(),
	"anypoint_users":                                 dataSourceUsers(),
	"anypoint_user":                                  dataSourceUser(),
	"anypoint_env":                                   dataSourceENV(),
	"anypoint_user_rolegroup":                        dataSourceUserRolegroup(),
	"anypoint_user_rolegroups":                       dataSourceUserRolegroups(),
	"anypoint_team":                                  dataSourceTeam(),
	"anypoint_teams":                                 dataSourceTeams(),
	"anypoint_team_roles":                            dataSourceTeamRoles(),
	"anypoint_team_members":                          dataSourceTeamMembers(),
	"anypoint_team_group_mappings":                   dataSourceTeamGroupMappings(),
	"anypoint_dlb":                                   dataSourceDLB(),
	"anypoint_dlbs":                                  dataSourceDLBs(),
	"anypoint_idp":                                   dataSourceIDP(),
	"anypoint_idps":                                  dataSourceIDPs(),
	"anypoint_connected_app":                         dataSourceConnectedApp(),
	"anypoint_connected_apps":                        dataSourceConnectedApps(),
	"anypoint_amq":                                   dataSourceAMQ(),
	"anypoint_ame":                                   dataSourceAME(),
	"anypoint_apim":                                  dataSourceApim(),
	"anypoint_apim_instance":                         dataSourceApimInstance(),
	"anypoint_apim_instance_policy":                  dataSourceApimInstancePolicy(),
	"anypoint_apim_instance_policies":                dataSourceApimInstancePolicies(),
	"anypoint_apim_instance_upstreams":               dataSourceApimInstanceUpstreams(),
	"anypoint_flexgateway_target":                    dataSourceFlexGatewayTarget(),
	"anypoint_flexgateway_targets":                   dataSourceFlexGatewayTargets(),
	"anypoint_flexgateway_registration_token":        dataSourceFlexGatewayRegistrationToken(),
	"anypoint_secretgroups":                          dataSourceSecretGroups(),
	"anypoint_secretgroup":                           dataSourceSecretGroup(),
	"anypoint_secretgroup_keystores":                 dataSourceSecretGroupKeystores(),
	"anypoint_secretgroup_keystore":                  dataSourceSecretGroupKeystore(),
	"anypoint_secretgroup_truststores":               dataSourceSecretGroupTruststores(),
	"anypoint_secretgroup_truststore":                dataSourceSecretGroupTruststore(),
	"anypoint_secretgroup_certificates":              dataSourceSecretGroupCertificates(),
	"anypoint_secretgroup_certificate":               dataSourceSecretGroupCertificate(),
	"anypoint_secretgroup_tlscontexts":               dataSourceSecretGroupTlsContexts(),
	"anypoint_secretgroup_tlscontext_flexgateway":    dataSourceSecretGroupTlsContextFG(),
	"anypoint_secretgroup_tlscontext_securityfabric": dataSourceSecretGroupTlsContextSF(),
	"anypoint_secretgroup_tlscontext_mule":           dataSourceSecretGroupTlsContextMule(),
	"anypoint_secretgroup_crldistrib_cfgs_list":      dataSourceSecretGroupCrlDistribCfgsList(),
	"anypoint_secretgroup_crldistrib_cfgs":           dataSourceSecretGroupCrlDistribCfgs(),
	"anypoint_exchange_policy_templates":             dataSourceExchangePolicyTemplates(),
	"anypoint_exchange_policy_template":              dataSourceExchangePolicyTemplate(),
	"anypoint_fabrics_list":                          dataSourceFabricsCollection(),
	"anypoint_fabrics":                               dataSourceFabrics(),
	"anypoint_fabrics_associations":                  dataSourceFabricsAssociations(),
	"anypoint_fabrics_helm_repo":                     dataSourceFabricsHelmRepoProps(),
	"anypoint_fabrics_health":                        dataSourceFabricsHealth(),
	"anypoint_app_deployment_v2":                     dataSourceAppDeploymentV2(),
	"anypoint_app_deployments_v2":                    dataSourceAppDeploymentsV2(),
}
View Source
var DeplApplicationC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"status": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The status of the application.",
		},
		"desired_state": {
			Type:        schema.TypeString,
			Optional:    true,
			Default:     "STARTED",
			Description: "The desired state of the application.",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice(
					[]string{
						"PARTIALLY_STARTED", "DEPLOYMENT_FAILED", "STARTING", "STARTED", "STOPPING",
						"STOPPED", "UNDEPLOYING", "UNDEPLOYED", "UPDATED", "APPLIED", "APPLYING", "FAILED", "DELETED",
					},
					false,
				),
			),
		},
		"ref": {
			Type:     schema.TypeList,
			MaxItems: 1,
			Required: true,
			Description: `
			The reference to the artifact on Exchange that is to be deployed on Cloudhub 2.0.
			Please ensure the application's artifact is deployed on Exchange before using this resource on Cloudhub 2.0.
			`,
			Elem: DeplApplicationRefC2SSDefinition,
		},
		"configuration": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Required:    true,
			Description: "The configuration of the application.",
			Elem:        DeplApplicationConfigC2SSDefinition,
		},
		"vcores": {
			Type:             schema.TypeFloat,
			Required:         true,
			Description:      "The allocated virtual cores. Acceptable Values are: 0.1 / 0.2 / 0.5 / 1 / 1.5 / 2 / 2.5 / 3 / 3.5 / 4",
			ValidateDiagFunc: VCoresValidatorDiag,
		},
		"object_store_v2_enabled": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Whether object store v2 is enabled.",
		},
	},
}
View Source
var DeplApplicationConfigC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"mule_agent_app_props_service": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Description: "The mule app properties",
			Elem:        DeplApplicationConfigPropsC2SSDefinition,
			Required:    true,
		},
		"mule_agent_logging_service": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Description: "The mule app logging props",
			Elem:        DeplApplicationConfigLoggingC2SSDefinition,
			Optional:    true,
		},
		"mule_agent_scheduling_service": {
			Type:        schema.TypeList,
			Description: "The mule app scheduling",
			Elem:        DeplApplicationConfigSchedulingReadOnlyDefinition,
			Computed:    true,
		},
	},
}
View Source
var DeplApplicationConfigLoggingC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"artifact_name": {
			Type:        schema.TypeString,
			Description: "The application name.",
			Computed:    true,
		},
		"scope_logging_configurations": {
			Type:        schema.TypeList,
			Description: "Additional log levels and categories to include in logs.",
			Optional:    true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"scope": {
						Type:        schema.TypeString,
						Description: "The logging package scope",
						Required:    true,
					},
					"log_level": {
						Type:        schema.TypeString,
						Description: "The application log level: INFO / DEBUG / WARNING / ERROR / FATAL",
						Required:    true,
						ValidateDiagFunc: validation.ToDiagFunc(
							validation.StringInSlice([]string{"INFO", "DEBUG", "WARNING", "ERROR", "FATAL"}, false),
						),
					},
				},
			},
		},
	},
}
View Source
var DeplApplicationConfigLoggingRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"artifact_name": {
			Type:        schema.TypeString,
			Description: "The application name.",
			Computed:    true,
		},
		"scope_logging_configurations": {
			Type:        schema.TypeList,
			Description: "Additional log levels and categories to include in logs.",
			Optional:    true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"scope": {
						Type:        schema.TypeString,
						Description: "The logging package scope",
						Required:    true,
					},
					"log_level": {
						Type:        schema.TypeString,
						Description: "The application log level: INFO / DEBUG / WARNING / ERROR / FATAL",
						Required:    true,
						ValidateDiagFunc: validation.ToDiagFunc(
							validation.StringInSlice([]string{"INFO", "DEBUG", "WARNING", "ERROR", "FATAL"}, false),
						),
					},
				},
			},
		},
	},
}
View Source
var DeplApplicationConfigLoggingReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"artifact_name": {
			Type:        schema.TypeString,
			Description: "The application name.",
			Computed:    true,
		},
		"scope_logging_configurations": {
			Type:        schema.TypeList,
			Description: "Additional log levels and categories to include in logs.",
			Computed:    true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"scope": {
						Type:        schema.TypeString,
						Description: "The logging package scope",
						Computed:    true,
					},
					"log_level": {
						Type:        schema.TypeString,
						Description: "The application log level: INFO / DEBUG / WARNING / ERROR / FATAL",
						Computed:    true,
					},
				},
			},
		},
	},
}
View Source
var DeplApplicationConfigPropsC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"application_name": {
			Type:        schema.TypeString,
			Description: "The application name",
			Computed:    true,
		},
		"properties": {
			Type:        schema.TypeMap,
			Description: "The mule application properties.",
			Optional:    true,
			DefaultFunc: func() (interface{}, error) { return make(map[string]string), nil },
		},
		"secure_properties": {
			Type:        schema.TypeMap,
			Description: "The mule application secured properties.",
			Optional:    true,
			DefaultFunc: func() (interface{}, error) { return make(map[string]string), nil },
		},
	},
}
View Source
var DeplApplicationConfigPropsRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"application_name": {
			Type:        schema.TypeString,
			Description: "The application name",
			Computed:    true,
		},
		"properties": {
			Type:        schema.TypeMap,
			Description: "The mule application properties.",
			Optional:    true,
			DefaultFunc: func() (interface{}, error) { return make(map[string]string), nil },
		},
		"secure_properties": {
			Type:        schema.TypeMap,
			Description: "The mule application secured properties.",
			Optional:    true,
			DefaultFunc: func() (interface{}, error) { return make(map[string]string), nil },
		},
	},
}
View Source
var DeplApplicationConfigPropsReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"application_name": {
			Type:        schema.TypeString,
			Description: "The application name",
			Computed:    true,
		},
		"properties": {
			Type:        schema.TypeMap,
			Description: "The mule application properties.",
			Computed:    true,
		},
		"secure_properties": {
			Type:        schema.TypeMap,
			Description: "The mule application secured properties.",
			Computed:    true,
		},
	},
}
View Source
var DeplApplicationConfigRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"mule_agent_app_props_service": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Description: "The mule app properties",
			Elem:        DeplApplicationConfigPropsRTFDefinition,
			Required:    true,
		},
		"mule_agent_logging_service": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Description: "The mule app logging props",
			Elem:        DeplApplicationConfigLoggingRTFDefinition,
			Optional:    true,
		},
		"mule_agent_scheduling_service": {
			Type:        schema.TypeList,
			Description: "The mule app scheduling",
			Elem:        DeplApplicationConfigSchedulingReadOnlyDefinition,
			Computed:    true,
		},
	},
}
View Source
var DeplApplicationConfigReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"mule_agent_app_props_service": {
			Type:        schema.TypeList,
			Description: "The mule app properties",
			Elem:        DeplApplicationConfigPropsReadOnlyDefinition,
			Computed:    true,
		},
		"mule_agent_logging_service": {
			Type:        schema.TypeList,
			Description: "The mule app logging props",
			Elem:        DeplApplicationConfigLoggingReadOnlyDefinition,
			Computed:    true,
		},
		"mule_agent_scheduling_service": {
			Type:        schema.TypeList,
			Description: "The mule app scheduling",
			Elem:        DeplApplicationConfigSchedulingReadOnlyDefinition,
			Computed:    true,
		},
	},
}
View Source
var DeplApplicationConfigSchedulingReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"application_name": {
			Type:        schema.TypeString,
			Description: "The mule application name.",
			Computed:    true,
		},
		"schedulers": {
			Type:        schema.TypeList,
			Description: "The mule app schedulers details",
			Computed:    true,
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"name": {
						Type:        schema.TypeString,
						Description: "The scheduler name",
						Computed:    true,
					},
					"type": {
						Type:        schema.TypeString,
						Description: "The scheduler type",
						Computed:    true,
					},
					"flow_name": {
						Type:        schema.TypeString,
						Description: "The scheduler flow name",
						Computed:    true,
					},
					"enabled": {
						Type:        schema.TypeBool,
						Description: "Whether the scheduler is enabled or not.",
						Computed:    true,
					},
					"time_unit": {
						Type:        schema.TypeString,
						Description: "The scheduler's time unit.",
						Computed:    true,
					},
					"frequency": {
						Type:        schema.TypeString,
						Description: "The scheduler's frequency",
						Computed:    true,
					},
					"start_delay": {
						Type:        schema.TypeString,
						Description: "The scheduler's start delay",
						Computed:    true,
					},
					"expression": {
						Type:        schema.TypeString,
						Description: "The scheduler's cron expression",
						Computed:    true,
					},
					"time_zone": {
						Type:        schema.TypeString,
						Description: "The scheduler's time zone",
						Computed:    true,
					},
				},
			},
		},
	},
}
View Source
var DeplApplicationRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"status": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The status of the application.",
		},
		"desired_state": {
			Type:        schema.TypeString,
			Optional:    true,
			Default:     "STARTED",
			Description: "The desired state of the application.",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice(
					[]string{
						"PARTIALLY_STARTED", "DEPLOYMENT_FAILED", "STARTING", "STARTED", "STOPPING",
						"STOPPED", "UNDEPLOYING", "UNDEPLOYED", "UPDATED", "APPLIED", "APPLYING", "FAILED", "DELETED",
					},
					false,
				),
			),
		},
		"ref": {
			Type:     schema.TypeList,
			MaxItems: 1,
			Required: true,
			Description: `
			The reference to the artifact on Exchange that is to be deployed on Runtime Fabrics.
			Please ensure the application's artifact is deployed on Exchange before using this resource on Runtime Fabrics.
			`,
			Elem: DeplApplicationRefRTFDefinition,
		},
		"configuration": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Required:    true,
			Description: "The configuration of the application.",
			Elem:        DeplApplicationConfigRTFDefinition,
		},
		"vcores": {
			Type:        schema.TypeFloat,
			Description: "The allocated virtual cores.",
			Computed:    true,
		},
		"object_store_v2_enabled": {
			Type:        schema.TypeBool,
			Computed:    true,
			Description: "Whether object store v2 is enabled. Only for Cloudhub.",
		},
	},
}
View Source
var DeplApplicationReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"status": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The status of the application.",
		},
		"desired_state": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The desired state of the application.",
		},
		"ref": {
			Type:        schema.TypeList,
			Computed:    true,
			Description: "The reference to the deployed artifact on exchange.",
			Elem:        DeplApplicationRefReadOnlyDefinition,
		},
		"configuration": {
			Type:        schema.TypeList,
			Computed:    true,
			Description: "The configuration of the application.",
			Elem:        DeplApplicationConfigReadOnlyDefinition,
		},
		"vcores": {
			Type:        schema.TypeFloat,
			Computed:    true,
			Description: "The allocated virtual cores.",
		},
		"object_store_v2_enabled": {
			Type:        schema.TypeBool,
			Computed:    true,
			Description: "Whether object store v2 is enabled.",
		},
	},
}
View Source
var DeplApplicationRefC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"group_id": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The groupId of the application.",
		},
		"artifact_id": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The artifactId of the application.",
		},
		"version": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The version of the application.",
		},
		"packaging": {
			Type:     schema.TypeString,
			Required: true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"jar"}, false),
			),
			Description: "The packaging of the application. Only 'jar' is supported.",
		},
	},
}
View Source
var DeplApplicationRefRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"group_id": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The groupId of the application.",
		},
		"artifact_id": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The artifactId of the application.",
		},
		"version": {
			Type:        schema.TypeString,
			Required:    true,
			Description: "The version of the application.",
		},
		"packaging": {
			Type:     schema.TypeString,
			Required: true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"jar"}, false),
			),
			Description: "The packaging of the application. Only 'jar' is supported.",
		},
	},
}
View Source
var DeplApplicationRefReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"group_id": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The groupId of the application.",
		},
		"artifact_id": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The artifactId of the application.",
		},
		"version": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The version of the application.",
		},
		"packaging": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The packaging of the application.",
		},
	},
}
View Source
var DeplTargetC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"provider": {
			Type:        schema.TypeString,
			Description: "The cloud provider the target belongs to.",
			Optional:    true,
			Default:     "MC",
			ForceNew:    true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"MC"}, false),
			),
		},
		"target_id": {
			Type: schema.TypeString,
			Description: `The unique identifier of the target within Cloudhub 2.0.
			Checkout the [documentation](https://docs.mulesoft.com/cloudhub-2/ch2-architecture#regions-and-dns-records) for more info
			`,
			Required: true,
			ForceNew: true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice(
					[]string{
						"cloudhub-us-east-1", "cloudhub-us-east-2",
						"cloudhub-us-west-1", "cloudhub-us-west-2",
						"cloudhub-ca-central-1", "cloudhub-sa-east-1",
						"cloudhub-ap-southeast-1", "cloudhub-ap-southeast-2",
						"cloudhub-ap-northeast-1", "cloudhub-eu-west-1",
						"cloudhub-eu-central-1", "cloudhub-eu-west-2",
					},
					false,
				),
			),
		},
		"deployment_settings": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Description: "The settings of the target for the deployment to perform.",
			Required:    true,
			Elem:        DeplTargetDeploymentSettingsC2SSDefinition,
		},
		"replicas": {
			Type:        schema.TypeInt,
			Description: "The number of replicas. Default is 1.",
			Optional:    true,
			Default:     1,
		},
	},
}
View Source
var DeplTargetDeplSettAutoscalingC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"enabled": {
			Type:        schema.TypeBool,
			Description: "Enables or disables the Autoscaling feature. The possible values are: true or false.",
			Required:    true,
		},
		"min_replicas": {
			Type:             schema.TypeInt,
			Description:      "Set the minimum amount of replicas for your deployment. The minimum accepted value is 1. The maximum is 3.",
			Optional:         true,
			Default:          1,
			ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 3)),
		},
		"max_replicas": {
			Type:             schema.TypeInt,
			Description:      "Set the maximum amount of replicas your application can scale to. The minimum accepted value is 2. The maximum is 32.",
			Optional:         true,
			Default:          2,
			ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(2, 32)),
		},
	},
}
View Source
var DeplTargetDeplSettAutoscalingRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"enabled": {
			Type:        schema.TypeBool,
			Description: "Enables or disables the Autoscaling feature. The possible values are: true or false.",
			Required:    true,
		},
		"min_replicas": {
			Type:             schema.TypeInt,
			Description:      "Set the minimum amount of replicas for your deployment. The minimum accepted value is 1. The maximum is 3.",
			Optional:         true,
			Default:          1,
			ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 3)),
		},
		"max_replicas": {
			Type:             schema.TypeInt,
			Description:      "Set the maximum amount of replicas your application can scale to. The minimum accepted value is 2. The maximum is 32.",
			Optional:         true,
			Default:          2,
			ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(2, 32)),
		},
	},
}
View Source
var DeplTargetDeplSettAutoscalingReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"enabled": {
			Type:        schema.TypeBool,
			Description: "Enables or disables the Autoscaling feature. The possible values are: true or false.",
			Computed:    true,
		},
		"min_replicas": {
			Type:        schema.TypeInt,
			Description: "Set the minimum amount of replicas for your deployment. The minimum accepted value is 1. The maximum is 3.",
			Computed:    true,
		},
		"max_replicas": {
			Type:        schema.TypeInt,
			Description: "Set the maximum amount of replicas your application can scale to. The minimum accepted value is 2. The maximum is 32.",
			Computed:    true,
		},
	},
}
View Source
var DeplTargetDeplSettHttpC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"inbound_public_url": {
			Type:        schema.TypeString,
			Description: "The inbound public url. Setting the public url is disabled for shared-space.",
			Computed:    true,
		},
		"inbound_path_rewrite": {
			Type:        schema.TypeString,
			Description: "The inbound path rewrite. This option is disabled for shared-space.",
			Computed:    true,
		},
		"inbound_last_mile_security": {
			Type:        schema.TypeBool,
			Description: "Last-mile security means that the connection between ingress and the actual Mule app will be HTTPS.",
			Optional:    true,
			Default:     false,
		},
		"inbound_forward_ssl_session": {
			Type:        schema.TypeBool,
			Description: "Whether to forward the ssl session. This option is disabled for shared-space.",
			Computed:    true,
		},
		"inbound_internal_url": {
			Type:        schema.TypeString,
			Description: "The inbound internal url.",
			Computed:    true,
		},
		"inbound_unique_id": {
			Type:        schema.TypeString,
			Description: "The inbound unique id.",
			Computed:    true,
		},
	},
}
View Source
var DeplTargetDeplSettHttpRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"inbound_public_url": {
			Type: schema.TypeString,
			Description: `The ingress url(s).
			If you need to use multiple ingress urls, separete them with commas.
			example: http://example.mulesoft.terraform.net/(.+)
			`,
			Optional: true,
			Default:  "",
		},
		"inbound_path_rewrite": {
			Type:        schema.TypeString,
			Description: "The inbound path rewrite. This option is only available for Cloudhub 2.0 with private spaces",
			Computed:    true,
		},
		"inbound_last_mile_security": {
			Type:        schema.TypeBool,
			Description: "Last-mile security means that the connection between ingress and the actual Mule app will be HTTPS.",
			Optional:    true,
			Default:     false,
		},
		"inbound_forward_ssl_session": {
			Type:        schema.TypeBool,
			Description: "Whether to forward the ssl session.",
			Optional:    true,
			Default:     false,
		},
		"inbound_internal_url": {
			Type:        schema.TypeString,
			Description: "The inbound internal url.",
			Computed:    true,
		},
		"inbound_unique_id": {
			Type:        schema.TypeString,
			Description: "The inbound unique id.",
			Computed:    true,
		},
	},
}
View Source
var DeplTargetDeplSettHttpReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"inbound_public_url": {
			Type:        schema.TypeString,
			Description: "The inbound public url",
			Computed:    true,
		},
		"inbound_path_rewrite": {
			Type:        schema.TypeString,
			Description: "The inbound path rewrite",
			Computed:    true,
		},
		"inbound_last_mile_security": {
			Type:        schema.TypeBool,
			Description: "Last-mile security means that the connection between ingress and the actual Mule app will be HTTPS.",
			Computed:    true,
		},
		"inbound_forward_ssl_session": {
			Type:        schema.TypeBool,
			Description: "Whether to forward the ssl session",
			Computed:    true,
		},
		"inbound_internal_url": {
			Type:        schema.TypeString,
			Description: "The inbound internal url",
			Computed:    true,
		},
		"inbound_unique_id": {
			Type:        schema.TypeString,
			Description: "The inbound unique id",
			Computed:    true,
		},
	},
}
View Source
var DeplTargetDeplSettResourcesRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"cpu_limit": {
			Type:        schema.TypeString,
			Description: "The CPU limit",
			Required:    true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringMatch(
					regexp.MustCompile(`^\d+m$`),
					"field value should be a valid cpu representation. ex: 100m (= 0.1 vcores).",
				),
			),
		},
		"cpu_reserved": {
			Type:        schema.TypeString,
			Description: "The CPU reserved.",
			Required:    true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringMatch(
					regexp.MustCompile(`^\d+m$`),
					"field value should be a valid cpu representation. ex: 100m (= 0.1 vcores).",
				),
			),
		},
		"memory_limit": {
			Type:        schema.TypeString,
			Description: "The memory limit",
			Required:    true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringMatch(
					regexp.MustCompile(`^\d+Mi$`),
					"field value should be a valid memory representation. ex: 1000Mi (= 1Gb).",
				),
			),
		},
		"memory_reserved": {
			Type:        schema.TypeString,
			Description: "The memory reserved.",
			Required:    true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringMatch(
					regexp.MustCompile(`^\d+Mi$`),
					"field value should be a valid memory representation. ex: 1000Mi (= 1Gb).",
				),
			),
		},
		"storage_limit": {
			Type:        schema.TypeString,
			Description: "The storage limit",
			Computed:    true,
		},
		"storage_reserved": {
			Type:        schema.TypeString,
			Description: "The storage reserved",
			Computed:    true,
		},
	},
}
View Source
var DeplTargetDeplSettResourcesReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"cpu_limit": {
			Type:        schema.TypeString,
			Description: "The CPU limit",
			Computed:    true,
		},
		"cpu_reserved": {
			Type:        schema.TypeString,
			Description: "The CPU reserved",
			Computed:    true,
		},
		"memory_limit": {
			Type:        schema.TypeString,
			Description: "The memory limit",
			Computed:    true,
		},
		"memory_reserved": {
			Type:        schema.TypeString,
			Description: "The memory reserved",
			Computed:    true,
		},
		"storage_limit": {
			Type:        schema.TypeString,
			Description: "The storage limit",
			Computed:    true,
		},
		"storage_reserved": {
			Type:        schema.TypeString,
			Description: "The storage reserved",
			Computed:    true,
		},
	},
}
View Source
var DeplTargetDeplSettRuntimeC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"version": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to:
				- a full image version with tag (i.e "4.6.0:40e-java17"),
				- a base version with a partial tag not indicating the java version (i.e. "4.6.0:40")
				- or only a base version (i.e. "4.6.0").
			Defaults to the latest image version.
			This field has precedence over the legacy 'target.deploymentSettings.runtimeVersion'.
			Learn more about Mule runtime release notes [here](https://docs.mulesoft.com/release-notes/runtime-fabric/runtime-fabric-runtimes-release-notes)
			`,
			Required: true,
		},
		"release_channel": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to one of:
				- "LTS"
				- "EDGE"
				- "LEGACY".
			Defaults to "EDGE". This field has precedence over the legacy 'target.deploymentSettings.runtimeReleaseChannel'.
			Learn more on release channels [here](https://docs.mulesoft.com/release-notes/mule-runtime/lts-edge-release-cadence).
			`,
			Optional: true,
			Default:  "EDGE",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"LTS", "EDGE", "LEGACY"}, false),
			),
		},
		"java": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to one of:
				- "8"
				- "17"
			Defaults to "8".
			Learn more about Java support [here](https://docs.mulesoft.com/general/java-support).
			`,
			Optional: true,
			Default:  "8",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"8", "17"}, false),
			),
		},
	},
}
View Source
var DeplTargetDeplSettRuntimeRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"version": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to:
				- a full image version with tag (i.e "4.6.0:40e-java17"),
				- a base version with a partial tag not indicating the java version (i.e. "4.6.0:40")
				- or only a base version (i.e. "4.6.0").
			Defaults to the latest image version.
			This field has precedence over the legacy 'target.deploymentSettings.runtimeVersion'.
			Learn more about Mule runtime release notes [here](https://docs.mulesoft.com/release-notes/runtime-fabric/runtime-fabric-runtimes-release-notes)
			`,
			Required: true,
		},
		"release_channel": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to one of:
				- "LTS"
				- "EDGE"
				- "LEGACY".
			Defaults to "EDGE". This field has precedence over the legacy 'target.deploymentSettings.runtimeReleaseChannel'.
			Learn more on release channels [here](https://docs.mulesoft.com/release-notes/mule-runtime/lts-edge-release-cadence).
			`,
			Optional: true,
			Default:  "EDGE",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"LTS", "EDGE", "LEGACY"}, false),
			),
		},
		"java": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to one of:
				- "8"
				- "17"
			Defaults to "8".
			Learn more about Java support [here](https://docs.mulesoft.com/general/java-support).
			`,
			Optional: true,
			Default:  "8",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"8", "17"}, false),
			),
		},
	},
}
View Source
var DeplTargetDeplSettRuntimeReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"version": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to:
				- a full image version with tag (i.e "4.6.0:40e-java17"),
				- a base version with a partial tag not indicating the java version (i.e. "4.6.0:40")
				- or only a base version (i.e. "4.6.0").
			Defaults to the latest image version.
			This field has precedence over the legacy 'target.deploymentSettings.runtimeVersion'
			Learn more about Mule runtime release notes [here](https://docs.mulesoft.com/release-notes/runtime-fabric/runtime-fabric-runtimes-release-notes)
			`,
			Computed: true,
		},
		"release_channel": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to one of:
				- "LTS"
				- "EDGE"
				- "LEGACY".
			Defaults to "EDGE". This field has precedence over the legacy 'target.deploymentSettings.runtimeReleaseChannel'.
			Learn more on release channels [here](https://docs.mulesoft.com/release-notes/mule-runtime/lts-edge-release-cadence).
			`,
			Computed: true,
		},
		"java": {
			Type: schema.TypeString,
			Description: `
			On deployment operations it can be set to one of:
				- "8"
				- "17"
			Defaults to "8".
			Learn more about Java support [here](https://docs.mulesoft.com/general/java-support).
			`,
			Computed: true,
		},
	},
}
View Source
var DeplTargetDeplSettSidecarsReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"anypoint_monitoring_image": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"anypoint_monitoring_resources_cpu_limit": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"anypoint_monitoring_resources_cpu_reserved": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"anypoint_monitoring_resources_memory_limit": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"anypoint_monitoring_resources_memory_reserved": {
			Type:     schema.TypeString,
			Computed: true,
		},
	},
}
View Source
var DeplTargetDeploymentSettingsC2SSDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"clustered": {
			Type:        schema.TypeBool,
			Description: "Whether the application is deployed in clustered mode.",
			Optional:    true,
			Default:     false,
		},

		"http": {
			Type:        schema.TypeList,
			Description: "The details about http inbound or outbound configuration",
			Optional:    true,
			MaxItems:    1,
			DefaultFunc: func() (interface{}, error) {
				dict := make(map[string]interface{})
				dict["inbound_last_mile_security"] = false
				return []interface{}{dict}, nil
			},
			Elem: DeplTargetDeplSettHttpC2SSDefinition,
		},
		"jvm_args": {
			Type:        schema.TypeString,
			Description: "The java virtual machine arguments",
			Optional:    true,
			Default:     "",
		},
		"runtime": {
			Type:        schema.TypeList,
			Description: "The Mule app runtime version info.",
			Optional:    true,
			MaxItems:    1,
			Elem:        DeplTargetDeplSettRuntimeC2SSDefinition,
		},
		"autoscaling": {
			Type: schema.TypeList,
			Description: `
			Use this object to provide CPU Based Horizontal Autoscaling configuration on deployment and redeployment operations. This object is optional.
			If Autoscaling is disabled and the fields "minReplicas" and "maxReplicas" are provided, they must match the value of "target.replicas" field.
			Learn more about Autoscaling [here](https://docs.mulesoft.com/cloudhub-2/ch2-configure-horizontal-autoscaling).
			`,
			Optional: true,
			MaxItems: 1,
			DefaultFunc: func() (interface{}, error) {
				dict := make(map[string]interface{})
				dict["enabled"] = false
				return []interface{}{dict}, nil
			},
			Elem: DeplTargetDeplSettAutoscalingC2SSDefinition,
		},
		"update_strategy": {
			Type:        schema.TypeString,
			Description: "The mule app deployment update strategy: rolling or recreate",
			Optional:    true,
			Default:     "rolling",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"rolling", "recreate"}, false),
			),
		},
		"resources": {
			Type:        schema.TypeList,
			Description: "The mule app allocated resources",
			Elem:        DeplTargetDeplSettResourcesReadOnlyDefinition,
			Computed:    true,
		},
		"disable_am_log_forwarding": {
			Type:        schema.TypeBool,
			Description: "Whether log forwarding is disabled.",
			Optional:    true,
			Default:     false,
		},
		"persistent_object_store": {
			Type:        schema.TypeBool,
			Description: "Whether persistent object store is enabled. Only for RTF",
			Computed:    true,
		},
		"anypoint_monitoring_scope": {
			Type:        schema.TypeString,
			Description: "The anypoint moniroting scope",
			Computed:    true,
		},
		"sidecars": {
			Type:        schema.TypeList,
			Description: "The mule app sidecars.",
			Elem:        DeplTargetDeplSettSidecarsReadOnlyDefinition,
			Computed:    true,
		},
		"disable_external_log_forwarding": {
			Type:        schema.TypeBool,
			Description: "Whether the log forwarding is disabled.",
			Optional:    true,
			Default:     false,
		},
		"tracing_enabled": {
			Type:        schema.TypeBool,
			Description: "Whether the log tracing is enabled.",
			Computed:    true,
		},
		"generate_default_public_url": {
			Type:        schema.TypeBool,
			Description: "Whether default public url should be generated.",
			Optional:    true,
			Default:     false,
		},
	},
}
View Source
var DeplTargetDeploymentSettingsRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"clustered": {
			Type:        schema.TypeBool,
			Description: "Whether the application is deployed in clustered mode.",
			Optional:    true,
			Default:     false,
		},
		"enforce_deploying_replicas_across_nodes": {
			Type:        schema.TypeBool,
			Description: "If true, forces the deployment of replicas across the RTF cluster. This option only available for Runtime Fabrics.",
			Optional:    true,
			Default:     false,
		},
		"http": {
			Type:        schema.TypeList,
			Description: "The details about http inbound or outbound configuration",
			Optional:    true,
			MaxItems:    1,
			DefaultFunc: func() (interface{}, error) {
				dict := make(map[string]interface{})
				dict["inbound_last_mile_security"] = false
				dict["inbound_forward_ssl_session"] = false
				return []interface{}{dict}, nil
			},
			Elem: DeplTargetDeplSettHttpRTFDefinition,
		},
		"jvm_args": {
			Type:        schema.TypeString,
			Description: "The java virtual machine arguments",
			Optional:    true,
			Default:     "",
		},
		"runtime": {
			Type:        schema.TypeList,
			Description: "The Mule app runtime version info.",
			Optional:    true,
			MaxItems:    1,
			Elem:        DeplTargetDeplSettRuntimeRTFDefinition,
		},
		"autoscaling": {
			Type: schema.TypeList,
			Description: `
			Use this object to provide CPU Based Horizontal Autoscaling configuration on deployment and redeployment operations. This object is optional.
			If Autoscaling is disabled and the fields "minReplicas" and "maxReplicas" are provided, they must match the value of "target.replicas" field.
			Learn more about Autoscaling [here](https://docs.mulesoft.com/cloudhub-2/ch2-configure-horizontal-autoscaling).
			`,
			Optional: true,
			MaxItems: 1,
			DefaultFunc: func() (interface{}, error) {
				dict := make(map[string]interface{})
				dict["enabled"] = false
				return []interface{}{dict}, nil
			},
			Elem: DeplTargetDeplSettAutoscalingRTFDefinition,
		},
		"update_strategy": {
			Type:        schema.TypeString,
			Description: "The mule app deployment update strategy: rolling or recreate",
			Optional:    true,
			Default:     "rolling",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"rolling", "recreate"}, false),
			),
		},
		"resources": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Description: "The mule app allocated resources.",
			Elem:        DeplTargetDeplSettResourcesRTFDefinition,
			Required:    true,
		},
		"disable_am_log_forwarding": {
			Type:        schema.TypeBool,
			Description: "Whether log forwarding is disabled.",
			Optional:    true,
			Default:     false,
		},
		"persistent_object_store": {
			Type:        schema.TypeBool,
			Description: "Whether persistent object store is enabled.",
			Optional:    true,
			Default:     false,
		},
		"anypoint_monitoring_scope": {
			Type:        schema.TypeString,
			Description: "The anypoint moniroting scope",
			Computed:    true,
		},
		"sidecars": {
			Type:        schema.TypeList,
			Description: "The mule app sidecars.",
			Elem:        DeplTargetDeplSettSidecarsReadOnlyDefinition,
			Computed:    true,
		},
		"disable_external_log_forwarding": {
			Type:        schema.TypeBool,
			Description: "Whether the log forwarding is disabled.",
			Optional:    true,
			Default:     false,
		},
		"tracing_enabled": {
			Type:        schema.TypeBool,
			Description: "Whether the log tracing is enabled.",
			Computed:    true,
		},
		"generate_default_public_url": {
			Type:        schema.TypeBool,
			Description: "Whether default public url should be generated.",
			Optional:    true,
			Default:     false,
		},
	},
}
View Source
var DeplTargetDeploymentSettingsReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"clustered": {
			Type:        schema.TypeBool,
			Description: "Whether the application is deployed in clustered mode.",
			Computed:    true,
		},
		"enforce_deploying_replicas_across_nodes": {
			Type:        schema.TypeBool,
			Description: "If true, forces the deployment of replicas across the RTF cluster. This option only available for Runtime Fabrics.",
			Computed:    true,
		},
		"http": {
			Type:        schema.TypeList,
			Description: "The details about http inbound or outbound configuration",
			Computed:    true,
			Elem:        DeplTargetDeplSettHttpReadOnlyDefinition,
		},
		"jvm_args": {
			Type:        schema.TypeString,
			Description: "The java virtual machine arguments",
			Computed:    true,
		},
		"runtime": {
			Type:        schema.TypeList,
			Description: "The Mule app runtime version info.",
			Computed:    true,
			Elem:        DeplTargetDeplSettRuntimeReadOnlyDefinition,
		},
		"autoscaling": {
			Type: schema.TypeList,
			Description: `
			Use this object to provide CPU Based Horizontal Autoscaling configuration on deployment and redeployment operations. This object is optional.
			If Autoscaling is disabled and the fields "minReplicas" and "maxReplicas" are provided, they must match the value of "target.replicas" field.
			Learn more about Autoscaling [here](https://docs.mulesoft.com/cloudhub-2/ch2-configure-horizontal-autoscaling).
			`,
			Computed: true,
			Elem:     DeplTargetDeplSettAutoscalingReadOnlyDefinition,
		},
		"update_strategy": {
			Type:        schema.TypeString,
			Description: "The mule app update strategy: rolling or recreate",
			Computed:    true,
		},
		"resources": {
			Type:        schema.TypeList,
			Description: "The mule app allocated resources",
			Elem:        DeplTargetDeplSettResourcesReadOnlyDefinition,
			Computed:    true,
		},
		"last_mile_security": {
			Type:        schema.TypeBool,
			Description: "Whether last mile security is active",
			Computed:    true,
		},
		"disable_am_log_forwarding": {
			Type:        schema.TypeBool,
			Description: "Whether log forwarding is disabled.",
			Computed:    true,
		},
		"persistent_object_store": {
			Type:        schema.TypeBool,
			Description: "Whether persistent object store is enabled.",
			Computed:    true,
		},
		"anypoint_monitoring_scope": {
			Type:        schema.TypeString,
			Description: "The anypoint moniroting scope",
			Computed:    true,
		},
		"sidecars": {
			Type:        schema.TypeList,
			Description: "The mule app sidecars.",
			Elem:        DeplTargetDeplSettSidecarsReadOnlyDefinition,
			Computed:    true,
		},
		"forward_ssl_session": {
			Type:        schema.TypeBool,
			Description: "Whether the ssl session is forwarded to the mule app.",
			Computed:    true,
		},
		"disable_external_log_forwarding": {
			Type:        schema.TypeBool,
			Description: "Whether the log forwarding is disabled.",
			Computed:    true,
		},
		"tracing_enabled": {
			Type:        schema.TypeBool,
			Description: "Whether the log tracing is enabled.",
			Computed:    true,
		},
		"generate_default_public_url": {
			Type:        schema.TypeBool,
			Description: "Whether default public url should be generated",
			Computed:    true,
		},
	},
}
View Source
var DeplTargetRTFDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"provider": {
			Type:        schema.TypeString,
			Description: "The cloud provider the target belongs to.",
			Optional:    true,
			Default:     "MC",
			ForceNew:    true,
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.StringInSlice([]string{"MC"}, false),
			),
		},
		"target_id": {
			Type:        schema.TypeString,
			Description: "The unique identifier of the Runtime Fabrics target.",
			Required:    true,
			ForceNew:    true,
		},
		"deployment_settings": {
			Type:        schema.TypeList,
			MaxItems:    1,
			Description: "The settings of the target for the deployment to perform.",
			Required:    true,
			Elem:        DeplTargetDeploymentSettingsRTFDefinition,
		},
		"replicas": {
			Type:        schema.TypeInt,
			Description: "The number of replicas. Default is 1.",
			Optional:    true,
			Default:     1,
		},
	},
}
View Source
var DeplTargetReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"provider": {
			Type:        schema.TypeString,
			Description: "The cloud provider the target belongs to.",
			Computed:    true,
		},
		"target_id": {
			Type:        schema.TypeString,
			Description: "The unique identifier of the target.",
			Computed:    true,
		},
		"deployment_settings": {
			Type:        schema.TypeList,
			Description: "The settings of the target for the deployment to perform.",
			Elem:        DeplTargetDeploymentSettingsReadOnlyDefinition,
			Computed:    true,
		},
		"replicas": {
			Type:        schema.TypeInt,
			Description: "The number of replicas",
			Computed:    true,
		},
	},
}
View Source
var EXCHANGE_POLICY_TEMPLATE_ALL_VERSIONS = map[string]*schema.Schema{
	"group_id": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The group id.",
	},
	"asset_id": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The asset id.",
	},
	"version": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The version.",
	},
}
View Source
var EXCHANGE_POLICY_TEMPLATE_CONFIG = map[string]*schema.Schema{
	"property_name": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The property name.",
	},
	"name": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The property name.",
	},
	"description": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The property description.",
	},
	"type": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The property type.",
	},
	"options": {
		Type:        schema.TypeList,
		Computed:    true,
		Description: "The property options.",
		Elem: &schema.Schema{
			Type: schema.TypeMap,
		},
	},
	"optional": {
		Type:        schema.TypeBool,
		Computed:    true,
		Description: "Whether the property is optional.",
	},
	"default_value": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The property default value.",
	},
	"sensitive": {
		Type:        schema.TypeBool,
		Computed:    true,
		Description: "Whether the property is sensitive.",
	},
	"allow_multiple": {
		Type:        schema.TypeBool,
		Computed:    true,
		Description: "Whether the property allows multiple values.",
	},
	"configuration": {
		Type:        schema.TypeList,
		Computed:    true,
		Description: "The property configuration.",
		Elem: &schema.Schema{
			Type: schema.TypeMap,
		},
	},
}
View Source
var FabricsFeaturesDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"enhanced_security": {
			Type:        schema.TypeBool,
			Computed:    true,
			Description: "Whether enhanced security feature is active",
		},
		"persistent_store": {
			Type:        schema.TypeBool,
			Computed:    true,
			Description: "Whether peristent store feature is active",
		},
	},
}
View Source
var FabricsHealthStatusDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"healthy": {
			Type:        schema.TypeBool,
			Computed:    true,
			Description: "True if the component is healthy",
		},
		"updated_at": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"probes": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "Probes collected for this health check. Only applicable for Appliance probes.",
		},
		"failed_probes": {
			Type:        schema.TypeList,
			Computed:    true,
			Description: "Probe failures attributing to the result of this health check.",
			Elem: &schema.Resource{
				Schema: map[string]*schema.Schema{
					"name": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"reason": {
						Type:     schema.TypeString,
						Computed: true,
					},
					"last_transition_at": {
						Type:     schema.TypeInt,
						Computed: true,
					},
				},
			},
		},
	},
}
View Source
var FabricsIngressDomainsDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"domains": {
			Type:        schema.TypeList,
			Computed:    true,
			Description: "The list of domains.",
			Elem:        schema.TypeString,
		},
	},
}
View Source
var FabricsUpgradeDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"status": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The upgrade status.",
		},
	},
}
View Source
var NodeCapacityDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"cpu": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"cpu_millis": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"memory": {
			Type:     schema.TypeString,
			Computed: true,
		},
		"memory_mi": {
			Type:     schema.TypeInt,
			Computed: true,
		},
		"pods": {
			Type:     schema.TypeInt,
			Computed: true,
		},
	},
}
View Source
var NodeDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"uid": {
			Type:        schema.TypeString,
			Description: "The node id",
			Computed:    true,
		},
		"name": {
			Type:        schema.TypeString,
			Description: "The node name",
			Computed:    true,
		},
		"kubelet_version": {
			Type:        schema.TypeString,
			Description: "The kubelet version of the node",
			Computed:    true,
		},
		"docker_version": {
			Type:        schema.TypeString,
			Description: "The docker version",
			Computed:    true,
		},
		"role": {
			Type:        schema.TypeString,
			Description: "The role of the node in the cluster",
			Computed:    true,
		},
		"status": {
			Type:        schema.TypeList,
			Description: "The status of the node",
			Computed:    true,
			Elem:        NodeStatusDefinition,
		},
		"capacity": {
			Type:        schema.TypeList,
			Description: "The capacity of the node",
			Computed:    true,
			Elem:        NodeCapacityDefinition,
		},
		"allocated_request_capacity": {
			Type:        schema.TypeList,
			Description: "The allocated request capacity of the node",
			Computed:    true,
			Elem:        NodeCapacityDefinition,
		},
		"allocated_limit_capacity": {
			Type:        schema.TypeList,
			Description: "The allocated limit capacity of the node",
			Computed:    true,
			Elem:        NodeCapacityDefinition,
		},
	},
}
View Source
var NodeStatusDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"is_healthy": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"is_ready": {
			Type:     schema.TypeBool,
			Computed: true,
		},
		"is_schedulable": {
			Type:     schema.TypeBool,
			Computed: true,
		},
	},
}
View Source
var RESOURCES_MAP = map[string]*schema.Resource{
	"anypoint_vpc":                                   resourceVPC(),
	"anypoint_vpn":                                   resourceVPN(),
	"anypoint_bg":                                    resourceBG(),
	"anypoint_rolegroup_roles":                       resourceRoleGroupRoles(),
	"anypoint_rolegroup":                             resourceRoleGroup(),
	"anypoint_env":                                   resourceENV(),
	"anypoint_user":                                  resourceUser(),
	"anypoint_user_rolegroup":                        resourceUserRolegroup(),
	"anypoint_team":                                  resourceTeam(),
	"anypoint_team_roles":                            resourceTeamRoles(),
	"anypoint_team_member":                           resourceTeamMember(),
	"anypoint_team_group_mappings":                   resourceTeamGroupMappings(),
	"anypoint_dlb":                                   resourceDLB(),
	"anypoint_idp_oidc":                              resourceOIDC(),
	"anypoint_idp_saml":                              resourceSAML(),
	"anypoint_connected_app":                         resourceConnectedApp(),
	"anypoint_amq":                                   resourceAMQ(),
	"anypoint_ame":                                   resourceAME(),
	"anypoint_ame_binding":                           resourceAMEBinding(),
	"anypoint_apim_flexgateway":                      resourceApimFlexGateway(),
	"anypoint_apim_mule4":                            resourceApimMule4(),
	"anypoint_apim_policy_client_id_enforcement":     resourceApimInstancePolicyClientIdEnf(),
	"anypoint_apim_policy_jwt_validation":            resourceApimInstancePolicyJwtValidation(),
	"anypoint_apim_policy_rate_limiting":             resourceApimInstancePolicyRateLimiting(),
	"anypoint_apim_policy_basic_auth":                resourceApimInstancePolicyBasicAuth(),
	"anypoint_apim_policy_message_logging":           resourceApimInstancePolicyMessageLogging(),
	"anypoint_apim_policy_custom":                    resourceApimInstancePolicyCustom(),
	"anypoint_secretgroup":                           resourceSecretGroup(),
	"anypoint_secretgroup_keystore":                  resourceSecretGroupKeystore(),
	"anypoint_secretgroup_truststore":                resourceSecretGroupTruststore(),
	"anypoint_secretgroup_certificate":               resourceSecretGroupCertificate(),
	"anypoint_secretgroup_tlscontext_flexgateway":    resourceSecretGroupTlsContextFG(),
	"anypoint_secretgroup_tlscontext_mule":           resourceSecretGroupTlsContextMule(),
	"anypoint_secretgroup_tlscontext_securityfabric": resourceSecretGroupTlsContextSF(),
	"anypoint_secretgroup_crldistrib_cfgs":           resourceSecretGroupCrlDistribCfgs(),
	"anypoint_fabrics":                               resourceFabrics(),
	"anypoint_fabrics_associations":                  resourceFabricsAssociations(),
	"anypoint_cloudhub2_shared_space_deployment":     resourceCloudhub2SharedSpaceDeployment(),
	"anypoint_rtf_deployment":                        resourceRTFDeployment(),
}
View Source
var ReplicasReadOnlyDefinition = &schema.Resource{
	Schema: map[string]*schema.Schema{
		"id": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The unique id of the mule app replica.",
		},
		"state": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The current state of the replica.",
		},
		"deployment_location": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The node id in which the replica is deployed.",
		},
		"current_deployment_version": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "The version deployed in the replica.",
		},
		"reason": {
			Type:        schema.TypeString,
			Computed:    true,
			Description: "In case of an error, it should provide information about the root cause.",
		},
	},
}
View Source
var SG_CERTIFICATE_DETAILS_SCHEMA = map[string]*schema.Schema{
	"issuer": {
		Type:        schema.TypeMap,
		Computed:    true,
		Description: "Details about the entity that issued the certificate.",
	},
	"subject": {
		Type:        schema.TypeMap,
		Computed:    true,
		Description: "Details about the entity to which the certificate is issued.",
	},
	"subject_alternative_name": {
		Type:        schema.TypeList,
		Computed:    true,
		Description: "Collection of subject alternative names from the SubjectAltName x509 extension",
		Elem: &schema.Schema{
			Type: schema.TypeString,
		},
	},
	"version": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "version",
	},
	"serial_number": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "Serial number assigned by the CA to this certificate, in hex format",
	},
	"signature_algorithm": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "Name of the signature algorithm",
	},
	"public_key_algorithm": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The standard algorithm name for the public key of this certificate",
	},
	"is_certificate_authority": {
		Type:        schema.TypeBool,
		Computed:    true,
		Description: "If set to true, indicates that this is a CA certificate.",
	},
	"validity": {
		Type:        schema.TypeMap,
		Computed:    true,
		Description: "Details about validity period of this certificate",
	},
	"key_usage": {
		Type:        schema.TypeList,
		Computed:    true,
		Description: "A list of values defining the purpose of the public key i.e. the key usage extensions from this certificate",
		Elem: &schema.Schema{
			Type: schema.TypeString,
		},
	},
	"extended_key_usage": {
		Type:        schema.TypeList,
		Computed:    true,
		Description: "A list of values providing details about the extended key usage extensions from this certificate.",
		Elem: &schema.Schema{
			Type: schema.TypeString,
		},
	},
	"certificate_type": {
		Type:        schema.TypeString,
		Computed:    true,
		Description: "The type of this certificate",
	},
}
View Source
var SG_TLS_CONTEXT_FG_TARGET = "FlexGateway"
View Source
var SG_TLS_CONTEXT_MULE_TARGET = "Mule"
View Source
var SG_TLS_CONTEXT_SF_TARGET = "SecurityFabric"

Functions

func CalcSha1Digest

func CalcSha1Digest(source string) string

Uses sha1 to calculate digest of the given source string

func ComposeResourceId

func ComposeResourceId(elem []string, separator ...string) string

composes an id by concatenating items of array into one single string

func ConvPrimtiveInterface2String added in v1.6.0

func ConvPrimtiveInterface2String(p interface{}) string

converts a primitive value in a interface{} format to a string

func DecomposeResourceId

func DecomposeResourceId(id string, separator ...string) []string

decomposes a composite resource id

func DiffSuppressFunc4OptionalPrimitives

func DiffSuppressFunc4OptionalPrimitives(k, old, new string, d *schema.ResourceData, initial string) bool

compares diffing for optional values, if the new value is equal to the initial value (that is the default value) returns true if the attribute has the same value as the initial or if the new and old value are the same which needs no updaten false otherwise.

func FilterMapList

func FilterMapList(list []interface{}, filter func(map[string]interface{}) bool) []interface{}

func filters list of map depending on the given filter function returns list of elements satisfying the filter

func FilterStrList added in v1.6.0

func FilterStrList(list []string, filter func(string) bool) []string

filters list of strings depending on the given filter func returns a list of strings

func FloatInSlice added in v1.7.0

func FloatInSlice(expected []float64, v float64) bool

func IsBool

func IsBool(v interface{}) bool

func IsFloat32

func IsFloat32(v interface{}) bool

func IsFloat64

func IsFloat64(v interface{}) bool

func IsInt32

func IsInt32(v interface{}) bool

func IsInt64

func IsInt64(v interface{}) bool

func IsString

func IsString(v interface{}) bool

func JoinStringInterfaceSlice added in v1.6.0

func JoinStringInterfaceSlice(slice []interface{}, sep string) string

same as strings.Join but for a slice of interface{} that are in reality strings

func ListInterface2ListStrings

func ListInterface2ListStrings(array []interface{}) []string

func Provider

func Provider() *schema.Provider

Provider -

func RoundFloat32 added in v1.7.0

func RoundFloat32(val float32, precision int) float32

rounds a float32 value to the specified number of decimal places.

func RoundFloat64 added in v1.7.0

func RoundFloat64(val float64, precision int) float64

rounds a float64 value to the specified number of decimal places.

func SortMapListAl

func SortMapListAl(list []interface{}, sortAttrs []string)

sorts list of maps alphabetically using the given sort attributes (by order)

func SortStrListAl

func SortStrListAl(list []interface{})

sorts list of strings alphabetically

func StringInSlice

func StringInSlice(expected []string, v string, ignoreCase bool) bool

tests if the provided value matches the value of an element in the valid slice. Will test with strings.EqualFold if ignoreCase is true

func VCoresValidatorDiag added in v1.7.0

func VCoresValidatorDiag(v interface{}, p cty.Path) diag.Diagnostics

Types

type ProviderConfOutput

type ProviderConfOutput struct {
	// contains filtered or unexported fields
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL