published on Wednesday, Apr 15, 2026 by ionos-cloud
published on Wednesday, Apr 15, 2026 by ionos-cloud
Manages public acccess for Buckets on IonosCloud.
⚠️ Note: The Terraform provider only supports contract-owned buckets. User-owned buckets are not supported, and there are no plans to introduce support for them. As a result, user-owned buckets cannot be created, updated, deleted, read, or imported using this provider.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.objectstorage.PublicAccessBlock("example", {
bucket: exampleIonoscloudS3Bucket.name,
ignorePublicAcls: true,
restrictPublicBuckets: true,
blockPublicPolicy: false,
blockPublicAcls: false,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.objectstorage.PublicAccessBlock("example",
bucket=example_ionoscloud_s3_bucket["name"],
ignore_public_acls=True,
restrict_public_buckets=True,
block_public_policy=False,
block_public_acls=False)
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/objectstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := objectstorage.NewPublicAccessBlock(ctx, "example", &objectstorage.PublicAccessBlockArgs{
Bucket: pulumi.Any(exampleIonoscloudS3Bucket.Name),
IgnorePublicAcls: pulumi.Bool(true),
RestrictPublicBuckets: pulumi.Bool(true),
BlockPublicPolicy: pulumi.Bool(false),
BlockPublicAcls: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Objectstorage.PublicAccessBlock("example", new()
{
Bucket = exampleIonoscloudS3Bucket.Name,
IgnorePublicAcls = true,
RestrictPublicBuckets = true,
BlockPublicPolicy = false,
BlockPublicAcls = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ionoscloud.pulumi.ionoscloud.objectstorage.PublicAccessBlock;
import com.ionoscloud.pulumi.ionoscloud.objectstorage.PublicAccessBlockArgs;
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 example = new PublicAccessBlock("example", PublicAccessBlockArgs.builder()
.bucket(exampleIonoscloudS3Bucket.name())
.ignorePublicAcls(true)
.restrictPublicBuckets(true)
.blockPublicPolicy(false)
.blockPublicAcls(false)
.build());
}
}
resources:
example:
type: ionoscloud:objectstorage:PublicAccessBlock
properties:
bucket: ${exampleIonoscloudS3Bucket.name}
ignorePublicAcls: true
restrictPublicBuckets: true
blockPublicPolicy: false
blockPublicAcls: false
Create PublicAccessBlock Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PublicAccessBlock(name: string, args: PublicAccessBlockArgs, opts?: CustomResourceOptions);@overload
def PublicAccessBlock(resource_name: str,
args: PublicAccessBlockArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PublicAccessBlock(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
block_public_acls: Optional[bool] = None,
block_public_policy: Optional[bool] = None,
ignore_public_acls: Optional[bool] = None,
restrict_public_buckets: Optional[bool] = None)func NewPublicAccessBlock(ctx *Context, name string, args PublicAccessBlockArgs, opts ...ResourceOption) (*PublicAccessBlock, error)public PublicAccessBlock(string name, PublicAccessBlockArgs args, CustomResourceOptions? opts = null)
public PublicAccessBlock(String name, PublicAccessBlockArgs args)
public PublicAccessBlock(String name, PublicAccessBlockArgs args, CustomResourceOptions options)
type: ionoscloud:objectstorage:PublicAccessBlock
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 PublicAccessBlockArgs
- 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 PublicAccessBlockArgs
- 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 PublicAccessBlockArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PublicAccessBlockArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PublicAccessBlockArgs
- 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 publicAccessBlockResource = new Ionoscloud.Objectstorage.PublicAccessBlock("publicAccessBlockResource", new()
{
Bucket = "string",
BlockPublicAcls = false,
BlockPublicPolicy = false,
IgnorePublicAcls = false,
RestrictPublicBuckets = false,
});
example, err := objectstorage.NewPublicAccessBlock(ctx, "publicAccessBlockResource", &objectstorage.PublicAccessBlockArgs{
Bucket: pulumi.String("string"),
BlockPublicAcls: pulumi.Bool(false),
BlockPublicPolicy: pulumi.Bool(false),
IgnorePublicAcls: pulumi.Bool(false),
RestrictPublicBuckets: pulumi.Bool(false),
})
var publicAccessBlockResource = new PublicAccessBlock("publicAccessBlockResource", PublicAccessBlockArgs.builder()
.bucket("string")
.blockPublicAcls(false)
.blockPublicPolicy(false)
.ignorePublicAcls(false)
.restrictPublicBuckets(false)
.build());
public_access_block_resource = ionoscloud.objectstorage.PublicAccessBlock("publicAccessBlockResource",
bucket="string",
block_public_acls=False,
block_public_policy=False,
ignore_public_acls=False,
restrict_public_buckets=False)
const publicAccessBlockResource = new ionoscloud.objectstorage.PublicAccessBlock("publicAccessBlockResource", {
bucket: "string",
blockPublicAcls: false,
blockPublicPolicy: false,
ignorePublicAcls: false,
restrictPublicBuckets: false,
});
type: ionoscloud:objectstorage:PublicAccessBlock
properties:
blockPublicAcls: false
blockPublicPolicy: false
bucket: string
ignorePublicAcls: false
restrictPublicBuckets: false
PublicAccessBlock 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 PublicAccessBlock resource accepts the following input properties:
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket String
- [string] The name of the bucket where the object will be stored.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket string
- [string] The name of the bucket where the object will be stored.
- block
Public booleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public booleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore
Public booleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public booleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket str
- [string] The name of the bucket where the object will be stored.
- block_
public_ boolacls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block_
public_ boolpolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore_
public_ boolacls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict_
public_ boolbuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket String
- [string] The name of the bucket where the object will be stored.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
Outputs
All input properties are implicitly available as output properties. Additionally, the PublicAccessBlock 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 PublicAccessBlock Resource
Get an existing PublicAccessBlock 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?: PublicAccessBlockState, opts?: CustomResourceOptions): PublicAccessBlock@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
block_public_acls: Optional[bool] = None,
block_public_policy: Optional[bool] = None,
bucket: Optional[str] = None,
ignore_public_acls: Optional[bool] = None,
restrict_public_buckets: Optional[bool] = None) -> PublicAccessBlockfunc GetPublicAccessBlock(ctx *Context, name string, id IDInput, state *PublicAccessBlockState, opts ...ResourceOption) (*PublicAccessBlock, error)public static PublicAccessBlock Get(string name, Input<string> id, PublicAccessBlockState? state, CustomResourceOptions? opts = null)public static PublicAccessBlock get(String name, Output<String> id, PublicAccessBlockState state, CustomResourceOptions options)resources: _: type: ionoscloud:objectstorage:PublicAccessBlock 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.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket String
- [string] The name of the bucket where the object will be stored.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block
Public booleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public booleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket string
- [string] The name of the bucket where the object will be stored.
- ignore
Public booleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public booleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block_
public_ boolacls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block_
public_ boolpolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket str
- [string] The name of the bucket where the object will be stored.
- ignore_
public_ boolacls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict_
public_ boolbuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket String
- [string] The name of the bucket where the object will be stored.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
Import
Resource Bucket access block can be imported using the bucket name
$ pulumi import ionoscloud:objectstorage/publicAccessBlock:PublicAccessBlock example example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloudTerraform Provider.
published on Wednesday, Apr 15, 2026 by ionos-cloud
