Concept | AWS | Azure | GCP |
---|---|---|---|
Hierarchical Grouping | AWS Organizations | Azure Management Groups | GCP Resource Hierarchy |
Root Level | Root (Master Account) | Root Management Group | Organization |
Tenant Concept | Not Applicable | Azure Active Directory (Azure AD) Tenant | Not Applicable |
Grouping Levels | Organizational Units (OUs) | Management Groups | Folders |
Lowest Level | AWS Accounts (Member Accounts) | Subscriptions | Projects |
Policies | Service Control Policies (SCPs) | Azure Policies | Organization Policies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container { | |
chart { | |
base = chart.languages_base | |
width = 4 | |
type = "donut" | |
title = "language mentions: last 24 hours" | |
query = query.mentions | |
args = [ local.languages, 0, 1440 ] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_calendar_weeks(year, month, grouped_events): | |
cal = calendar.monthcalendar(year, month) | |
calendar_weeks = [] | |
for week in cal: | |
calendar_week = [] | |
for day in week: | |
if day == 0: | |
calendar_week.append((0, [])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connection "all_wordpress" { | |
plugin = "wordpress" | |
type = "aggregator" | |
connections = ["jon", "newstack"] | |
} | |
connection "jon" { | |
plugin = "wordpress" | |
endpoint = "https://blog.jonudell.net/wp-json/" | |
username = "..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func listPosts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { | |
conn, err := connect(ctx, d) | |
if err != nil { | |
return nil, err | |
} | |
plugin.Logger(ctx).Debug("WordPress listPosts author", "author", d.Quals["author"]) | |
plugin.Logger(ctx).Debug("WordPress listPosts date", "date", d.Quals["date"]) | |
options := &wordpress.PostListOptions{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ListFunc func(context.Context, interface{}, int, int) (interface{}, *wordpress.Response, error) | |
func paginate(ctx context.Context, d *plugin.QueryData, listFunc ListFunc, options interface{}) error { | |
perPage := 100 | |
offset := 0 | |
for { | |
plugin.Logger(ctx).Debug("WordPress paginate", "offset", offset) | |
// `listFunc`, the passed-in anonymous function, could call the go SDK's `Posts.List` (which wraps the API's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module github.com/judell/steampipe-plugin-wordpress | |
go 1.21.4 | |
require ( | |
github.com/sogko/go-wordpress v0.0.0-20190616154547-91556a5001c7 | |
github.com/turbot/steampipe-plugin-sdk/v5 v5.8.0 | |
) | |
replace github.com/sogko/go-wordpress => github.com/robbiet480/go-wordpress v0.0.0-20180206201500-3b8369ffcef3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def replace_patterns(content): | |
requests = [] | |
patterns_and_replacements = [ | |
# Pattern 1: Replace underscores with hyphens in filenames | |
( | |
re.compile(r''' | |
\[image: # Literal "[image:" | |
\s* # Zero or more whitespace characters | |
( # Start of capturing group |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
combined_pattern = re.compile(r''' | |
# Image reference | |
^\s* # Start of line, followed by optional whitespace | |
\[image:\s+ # Literal '[image:', followed by at least one whitespace character | |
([^\]]+?) # Capture group 1: Image name - one or more characters that are not ']', non-greedy | |
\s* # Optional whitespace | |
(?: # Start of non-capturing group for optional width | |
(\d+) # Capture group 2: One or more digits for width | |
% # Literal '%' character | |
\s* # Optional whitespace |
Storage Type | AWS | Azure | GCP |
---|---|---|---|
Object Storage | S3 (Simple Storage Service) | Blob Storage (part of Storage Account) | Cloud Storage |
File Storage | EFS (Elastic File System) | File Storage (part of Storage Account) | Filestore |
Block Storage | EBS (Elastic Block Store) | Managed Disks | Persistent Disk |
Queue Storage | SQS (Simple Queue Service) | Queue Storage (part of Storage Account) | Cloud Pub/Sub |