This resource allows you to configure a trust store for your RabbitMQ instance. The trust store enables RabbitMQ to fetch and use CA certificates from an external source for validating client certificates.
Only available for dedicated subscription plans running RabbitMQ.
Example Usage
Basic trust store configuration
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const trustStore = new cloudamqp.TrustStore("trust_store", {
instanceId: instance.id,
http: {
url: "https://example.com/trust-store-certs",
},
refreshInterval: 30,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
trust_store = cloudamqp.TrustStore("trust_store",
instance_id=instance["id"],
http={
"url": "https://example.com/trust-store-certs",
},
refresh_interval=30)
package main
import (
"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudamqp.NewTrustStore(ctx, "trust_store", &cloudamqp.TrustStoreArgs{
InstanceId: pulumi.Any(instance.Id),
Http: &cloudamqp.TrustStoreHttpArgs{
Url: pulumi.String("https://example.com/trust-store-certs"),
},
RefreshInterval: pulumi.Int(30),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var trustStore = new CloudAmqp.TrustStore("trust_store", new()
{
InstanceId = instance.Id,
Http = new CloudAmqp.Inputs.TrustStoreHttpArgs
{
Url = "https://example.com/trust-store-certs",
},
RefreshInterval = 30,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.TrustStore;
import com.pulumi.cloudamqp.TrustStoreArgs;
import com.pulumi.cloudamqp.inputs.TrustStoreHttpArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var trustStore = new TrustStore("trustStore", TrustStoreArgs.builder()
.instanceId(instance.id())
.http(TrustStoreHttpArgs.builder()
.url("https://example.com/trust-store-certs")
.build())
.refreshInterval(30)
.build());
}
}
resources:
trustStore:
type: cloudamqp:TrustStore
name: trust_store
properties:
instanceId: ${instance.id}
http:
url: https://example.com/trust-store-certs
refreshInterval: 30
Trust store with CA certificate
Create TrustStore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrustStore(name: string, args: TrustStoreArgs, opts?: CustomResourceOptions);@overload
def TrustStore(resource_name: str,
args: TrustStoreArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrustStore(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[int] = None,
http: Optional[TrustStoreHttpArgs] = None,
refresh_interval: Optional[int] = None,
sleep: Optional[int] = None,
timeout: Optional[int] = None,
version: Optional[int] = None)func NewTrustStore(ctx *Context, name string, args TrustStoreArgs, opts ...ResourceOption) (*TrustStore, error)public TrustStore(string name, TrustStoreArgs args, CustomResourceOptions? opts = null)
public TrustStore(String name, TrustStoreArgs args)
public TrustStore(String name, TrustStoreArgs args, CustomResourceOptions options)
type: cloudamqp:TrustStore
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TrustStoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TrustStoreArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TrustStoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrustStoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrustStoreArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var trustStoreResource = new CloudAmqp.TrustStore("trustStoreResource", new()
{
InstanceId = 0,
Http = new CloudAmqp.Inputs.TrustStoreHttpArgs
{
Url = "string",
Cacert = "string",
},
RefreshInterval = 0,
Sleep = 0,
Timeout = 0,
Version = 0,
});
example, err := cloudamqp.NewTrustStore(ctx, "trustStoreResource", &cloudamqp.TrustStoreArgs{
InstanceId: pulumi.Int(0),
Http: &cloudamqp.TrustStoreHttpArgs{
Url: pulumi.String("string"),
Cacert: pulumi.String("string"),
},
RefreshInterval: pulumi.Int(0),
Sleep: pulumi.Int(0),
Timeout: pulumi.Int(0),
Version: pulumi.Int(0),
})
var trustStoreResource = new TrustStore("trustStoreResource", TrustStoreArgs.builder()
.instanceId(0)
.http(TrustStoreHttpArgs.builder()
.url("string")
.cacert("string")
.build())
.refreshInterval(0)
.sleep(0)
.timeout(0)
.version(0)
.build());
trust_store_resource = cloudamqp.TrustStore("trustStoreResource",
instance_id=0,
http={
"url": "string",
"cacert": "string",
},
refresh_interval=0,
sleep=0,
timeout=0,
version=0)
const trustStoreResource = new cloudamqp.TrustStore("trustStoreResource", {
instanceId: 0,
http: {
url: "string",
cacert: "string",
},
refreshInterval: 0,
sleep: 0,
timeout: 0,
version: 0,
});
type: cloudamqp:TrustStore
properties:
http:
cacert: string
url: string
instanceId: 0
refreshInterval: 0
sleep: 0
timeout: 0
version: 0
TrustStore Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TrustStore resource accepts the following input properties:
- Instance
Id int - The CloudAMQP instance ID.
- Http
Pulumi.
Cloud Amqp. Inputs. Trust Store Http - HTTP trust store configuration block. See HTTP Block below.
- Refresh
Interval int - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- Sleep int
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- Timeout int
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- Version int
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- Instance
Id int - The CloudAMQP instance ID.
- Http
Trust
Store Http Args - HTTP trust store configuration block. See HTTP Block below.
- Refresh
Interval int - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- Sleep int
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- Timeout int
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- Version int
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- instance
Id Integer - The CloudAMQP instance ID.
- http
Trust
Store Http - HTTP trust store configuration block. See HTTP Block below.
- refresh
Interval Integer - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep Integer
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout Integer
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version Integer
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- instance
Id number - The CloudAMQP instance ID.
- http
Trust
Store Http - HTTP trust store configuration block. See HTTP Block below.
- refresh
Interval number - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep number
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout number
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version number
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- instance_
id int - The CloudAMQP instance ID.
- http
Trust
Store Http Args - HTTP trust store configuration block. See HTTP Block below.
- refresh_
interval int - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep int
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout int
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version int
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- instance
Id Number - The CloudAMQP instance ID.
- http Property Map
- HTTP trust store configuration block. See HTTP Block below.
- refresh
Interval Number - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep Number
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout Number
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version Number
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrustStore resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TrustStore Resource
Get an existing TrustStore resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TrustStoreState, opts?: CustomResourceOptions): TrustStore@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
http: Optional[TrustStoreHttpArgs] = None,
instance_id: Optional[int] = None,
refresh_interval: Optional[int] = None,
sleep: Optional[int] = None,
timeout: Optional[int] = None,
version: Optional[int] = None) -> TrustStorefunc GetTrustStore(ctx *Context, name string, id IDInput, state *TrustStoreState, opts ...ResourceOption) (*TrustStore, error)public static TrustStore Get(string name, Input<string> id, TrustStoreState? state, CustomResourceOptions? opts = null)public static TrustStore get(String name, Output<String> id, TrustStoreState state, CustomResourceOptions options)resources: _: type: cloudamqp:TrustStore get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Http
Pulumi.
Cloud Amqp. Inputs. Trust Store Http - HTTP trust store configuration block. See HTTP Block below.
- Instance
Id int - The CloudAMQP instance ID.
- Refresh
Interval int - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- Sleep int
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- Timeout int
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- Version int
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- Http
Trust
Store Http Args - HTTP trust store configuration block. See HTTP Block below.
- Instance
Id int - The CloudAMQP instance ID.
- Refresh
Interval int - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- Sleep int
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- Timeout int
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- Version int
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- http
Trust
Store Http - HTTP trust store configuration block. See HTTP Block below.
- instance
Id Integer - The CloudAMQP instance ID.
- refresh
Interval Integer - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep Integer
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout Integer
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version Integer
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- http
Trust
Store Http - HTTP trust store configuration block. See HTTP Block below.
- instance
Id number - The CloudAMQP instance ID.
- refresh
Interval number - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep number
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout number
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version number
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- http
Trust
Store Http Args - HTTP trust store configuration block. See HTTP Block below.
- instance_
id int - The CloudAMQP instance ID.
- refresh_
interval int - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep int
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout int
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version int
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
- http Property Map
- HTTP trust store configuration block. See HTTP Block below.
- instance
Id Number - The CloudAMQP instance ID.
- refresh
Interval Number - Interval in seconds to refresh the trust store certificates. Defaults to 30 seconds. Defaults to 30 seconds.
- sleep Number
- Configurable sleep time in seconds between retries for trust store operations. Defaults to 10 seconds.
- timeout Number
- Configurable timeout time in seconds for trust store operations. Defaults to 1800 seconds (30 minutes).
- version Number
- Version of write-only certificates. Increment this value to force an update of write-only fields like
cacert. Defaults to 1.
Supporting Types
TrustStoreHttp, TrustStoreHttpArgs
- Url string
- URL to fetch trust store certificates from. RabbitMQ will periodically fetch CA certificates from this URL.
- Cacert string
- NOTE: This field is write-only and its value will not be updated in state as part of read operations.
PEM encoded CA certificates used to verify the HTTPS connection to the
trust store URL. This is a write-only field - changes are only applied when
versionis incremented.
- Url string
- URL to fetch trust store certificates from. RabbitMQ will periodically fetch CA certificates from this URL.
- Cacert string
- NOTE: This field is write-only and its value will not be updated in state as part of read operations.
PEM encoded CA certificates used to verify the HTTPS connection to the
trust store URL. This is a write-only field - changes are only applied when
versionis incremented.
- url String
- URL to fetch trust store certificates from. RabbitMQ will periodically fetch CA certificates from this URL.
- cacert String
- NOTE: This field is write-only and its value will not be updated in state as part of read operations.
PEM encoded CA certificates used to verify the HTTPS connection to the
trust store URL. This is a write-only field - changes are only applied when
versionis incremented.
- url string
- URL to fetch trust store certificates from. RabbitMQ will periodically fetch CA certificates from this URL.
- cacert string
- NOTE: This field is write-only and its value will not be updated in state as part of read operations.
PEM encoded CA certificates used to verify the HTTPS connection to the
trust store URL. This is a write-only field - changes are only applied when
versionis incremented.
- url str
- URL to fetch trust store certificates from. RabbitMQ will periodically fetch CA certificates from this URL.
- cacert str
- NOTE: This field is write-only and its value will not be updated in state as part of read operations.
PEM encoded CA certificates used to verify the HTTPS connection to the
trust store URL. This is a write-only field - changes are only applied when
versionis incremented.
- url String
- URL to fetch trust store certificates from. RabbitMQ will periodically fetch CA certificates from this URL.
- cacert String
- NOTE: This field is write-only and its value will not be updated in state as part of read operations.
PEM encoded CA certificates used to verify the HTTPS connection to the
trust store URL. This is a write-only field - changes are only applied when
versionis incremented.
Import
cloudamqp_trust_store can be imported using the CloudAMQP instance identifier.
From Terraform v1.5.0, the import block can be used to import this resource:
hcl
import {
to = cloudamqp_trust_store.trust_store
id = cloudamqp_instance.instance.id
}
Or use Terraform CLI:
$ pulumi import cloudamqp:index/trustStore:TrustStore trust_store <instance_id>`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- CloudAMQP pulumi/pulumi-cloudamqp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudamqpTerraform Provider.
