Skip to content

Conversation

@MFarabi619
Copy link

@MFarabi619 MFarabi619 commented Nov 27, 2025

Proposed changes

The following Go snippet in https://www.pulumi.com/docs/iac/get-started/aws/modify-program/ refuses to compile.

// Bucket ...

// Turn the bucket into a website:
website, err := s3.NewBucketWebsiteConfiguration(ctx, "website", &s3.BucketWebsiteConfigurationArgs{
    Bucket: bucket.ID(),
    IndexDocument: &s3.BucketWebsiteConfigurationIndexDocumentArgs{
        Suffix: pulumi.String("index.html"),
    },
})
if err != nil {
    return err
}

// Permit access control configuration:
ownershipControls, err := s3.NewBucketOwnershipControls(ctx, "ownership-controls", &s3.BucketOwnershipControlsArgs{
    Bucket: bucket.ID(),
    Rule: &s3.BucketOwnershipControlsRuleArgs{
        ObjectOwnership: pulumi.String("ObjectWriter"),
    },
})
if err != nil {
    return err
}

// Enable public access to the website:
publicAccessBlock, err := s3.NewBucketPublicAccessBlock(ctx, "public-access-block", &s3.BucketPublicAccessBlockArgs{
    Bucket:          bucket.ID(),
    BlockPublicAcls: pulumi.Bool(false),
})
if err != nil {
    return err
}
image

Update Go SDK import from v6 -> v7.

image

It works 🥳.

Unreleased product version (optional)

N/A

Related issues (optional)

Closes #16685.

Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619 MFarabi619 marked this pull request as draft November 27, 2025 04:14
@MFarabi619
Copy link
Author

A quick grep through the codebase reveals ten more hits in the codebase for the Go v6 SDK import.

image

… go sdk import v6 -> v7

Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
…mport v6 -> v7

Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
Signed-off-by: Mumtahin Farabi <mfarabi619@gmail.com>
@MFarabi619 MFarabi619 marked this pull request as ready for review November 27, 2025 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Get started with Pulumi and AWS' example in Go fails to compile due to v6 SDK import instead of v7

1 participant